aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-02-17 20:42:27 +0100
committerChristian Grothoff <christian@grothoff.org>2019-02-17 20:42:27 +0100
commit3fa634ec903aa256336e00682dde9da18a40dc3e (patch)
treefc3e1688e09196d033f13c90f6db630a1744df26 /src/fs
parent3411062e7e442c7f176980009e21c5aa2948fbcb (diff)
downloadgnunet-gtk-3fa634ec903aa256336e00682dde9da18a40dc3e.tar.gz
gnunet-gtk-3fa634ec903aa256336e00682dde9da18a40dc3e.zip
eliminate gdk_beep deprecation by finding the display properly
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-fs-gtk_main-window-search.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/fs/gnunet-fs-gtk_main-window-search.c b/src/fs/gnunet-fs-gtk_main-window-search.c
index 1a869fdd..e2970743 100644
--- a/src/fs/gnunet-fs-gtk_main-window-search.c
+++ b/src/fs/gnunet-fs-gtk_main-window-search.c
@@ -34,6 +34,21 @@
34 */ 34 */
35#define LOOKUP_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2) 35#define LOOKUP_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2)
36 36
37
38/**
39 * Emits a beep using the display of the screen of the main file sharing window.
40 */
41static void
42beep ()
43{
44 gdk_display_beep
45 (gdk_screen_get_display
46 (gdk_window_get_screen
47 (gtk_widget_get_parent_window
48 (GTK_WIDGET (GNUNET_FS_GTK_get_main_window_object ("GNUNET_GTK_main_window"))))));
49}
50
51
37/** 52/**
38 * Start a search. 53 * Start a search.
39 * 54 *
@@ -379,7 +394,7 @@ store_continuation (void *cls,
379 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 394 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
380 _("Failed to save record: %s\n"), 395 _("Failed to save record: %s\n"),
381 emsg); 396 emsg);
382 gdk_beep (); 397 beep ();
383 } 398 }
384 abort_pseu_lookup (lctx); 399 abort_pseu_lookup (lctx);
385} 400}
@@ -609,7 +624,7 @@ GNUNET_GTK_enter_nick_window_delete_event_cb (GtkWidget *widget,
609 void *cls) 624 void *cls)
610{ 625{
611 /* Don't allow GTK to kill the window, user must click execute or cancel */ 626 /* Don't allow GTK to kill the window, user must click execute or cancel */
612 gdk_beep (); 627 beep ();
613 return TRUE; 628 return TRUE;
614} 629}
615 630
@@ -628,7 +643,7 @@ GNUNET_FS_GTK_pseu_progress_dialog_delete_event_cb (GtkWidget *widget,
628 void *cls) 643 void *cls)
629{ 644{
630 /* Don't allow GTK to kill the window, until the search is finished */ 645 /* Don't allow GTK to kill the window, until the search is finished */
631 gdk_beep (); 646 beep ();
632 return TRUE; 647 return TRUE;
633} 648}
634 649