aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-23 12:57:41 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-23 12:57:41 +0000
commitc899957c38939452961cfddb216c0836d98f9b76 (patch)
tree3db565de8c9087ee1be429186ee5bbcde626381b
parentea07967aba4c0dfba8f2804f2a313c77803b6bb5 (diff)
downloadgnunet-gtk-c899957c38939452961cfddb216c0836d98f9b76.tar.gz
gnunet-gtk-c899957c38939452961cfddb216c0836d98f9b76.zip
-LRN: delete handlers for dialogs
-rw-r--r--contrib/gnunet_fs_gtk_main_window.glade23
-rw-r--r--src/fs/gnunet-fs-gtk-edit_publish_dialog.c14
-rw-r--r--src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c8
-rw-r--r--src/fs/gnunet-fs-gtk-main_window_file_download.c11
4 files changed, 46 insertions, 10 deletions
diff --git a/contrib/gnunet_fs_gtk_main_window.glade b/contrib/gnunet_fs_gtk_main_window.glade
index 69420841..9ce0bd95 100644
--- a/contrib/gnunet_fs_gtk_main_window.glade
+++ b/contrib/gnunet_fs_gtk_main_window.glade
@@ -23,6 +23,7 @@
23 <property name="deletable">False</property> 23 <property name="deletable">False</property>
24 <property name="transient_for">GNUNET_GTK_main_window</property> 24 <property name="transient_for">GNUNET_GTK_main_window</property>
25 <signal name="realize" handler="GNUNET_GTK_edit_publication_window_realize_cb" swapped="no"/> 25 <signal name="realize" handler="GNUNET_GTK_edit_publication_window_realize_cb" swapped="no"/>
26 <signal name="delete-event" handler="GNUNET_GTK_edit_publication_window_delete_event_cb" swapped="no"/>
26 <child> 27 <child>
27 <object class="GtkVBox" id="GNUNET_GTK_edit_publication_master_vbox"> 28 <object class="GtkVBox" id="GNUNET_GTK_edit_publication_master_vbox">
28 <property name="visible">True</property> 29 <property name="visible">True</property>
@@ -1905,6 +1906,7 @@
1905 <property name="skip_pager_hint">True</property> 1906 <property name="skip_pager_hint">True</property>
1906 <property name="deletable">False</property> 1907 <property name="deletable">False</property>
1907 <property name="transient_for">GNUNET_GTK_main_window</property> 1908 <property name="transient_for">GNUNET_GTK_main_window</property>
1909 <signal name="delete-event" handler="GNUNET_GTK_open_url_window_delete_event_cb" swapped="no"/>
1908 <child> 1910 <child>
1909 <object class="GtkVBox" id="GNUNET_GTK_open_url_dialog_main_vbox"> 1911 <object class="GtkVBox" id="GNUNET_GTK_open_url_dialog_main_vbox">
1910 <property name="visible">True</property> 1912 <property name="visible">True</property>
@@ -2663,16 +2665,6 @@
2663 <column type="gpointer"/> 2665 <column type="gpointer"/>
2664 </columns> 2666 </columns>
2665 </object> 2667 </object>
2666 <object class="GtkAdjustment" id="adjustment3">
2667 <property name="upper">100</property>
2668 <property name="step_increment">1</property>
2669 <property name="page_increment">10</property>
2670 </object>
2671 <object class="GtkAdjustment" id="adjustment4">
2672 <property name="upper">100</property>
2673 <property name="step_increment">1</property>
2674 <property name="page_increment">10</property>
2675 </object>
2676 <object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog"> 2668 <object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog">
2677 <property name="can_focus">False</property> 2669 <property name="can_focus">False</property>
2678 <property name="border_width">5</property> 2670 <property name="border_width">5</property>
@@ -2683,6 +2675,7 @@
2683 <property name="destroy_with_parent">True</property> 2675 <property name="destroy_with_parent">True</property>
2684 <property name="type_hint">normal</property> 2676 <property name="type_hint">normal</property>
2685 <signal name="realize" handler="GNUNET_GTK_select_pseudonym_dialog_realize_cb" swapped="no"/> 2677 <signal name="realize" handler="GNUNET_GTK_select_pseudonym_dialog_realize_cb" swapped="no"/>
2678 <signal name="delete-event" handler="GNUNET_GTK_select_pseudonym_dialog_delete_event_cb" swapped="no"/>
2686 <signal name="response" handler="GNUNET_GTK_select_pseudonym_dialog_response_cb" swapped="no"/> 2679 <signal name="response" handler="GNUNET_GTK_select_pseudonym_dialog_response_cb" swapped="no"/>
2687 <child internal-child="vbox"> 2680 <child internal-child="vbox">
2688 <object class="GtkVBox" id="dialog-vbox3"> 2681 <object class="GtkVBox" id="dialog-vbox3">
@@ -2802,6 +2795,16 @@
2802 <property name="page_increment">10</property> 2795 <property name="page_increment">10</property>
2803 <property name="page_size">10</property> 2796 <property name="page_size">10</property>
2804 </object> 2797 </object>
2798 <object class="GtkAdjustment" id="adjustment3">
2799 <property name="upper">100</property>
2800 <property name="step_increment">1</property>
2801 <property name="page_increment">10</property>
2802 </object>
2803 <object class="GtkAdjustment" id="adjustment4">
2804 <property name="upper">100</property>
2805 <property name="step_increment">1</property>
2806 <property name="page_increment">10</property>
2807 </object>
2805 <object class="GtkAdjustment" id="adjustment5"> 2808 <object class="GtkAdjustment" id="adjustment5">
2806 <property name="upper">100</property> 2809 <property name="upper">100</property>
2807 <property name="step_increment">1</property> 2810 <property name="step_increment">1</property>
diff --git a/src/fs/gnunet-fs-gtk-edit_publish_dialog.c b/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
index 80336aed..9106cde1 100644
--- a/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
+++ b/src/fs/gnunet-fs-gtk-edit_publish_dialog.c
@@ -902,6 +902,20 @@ GNUNET_GTK_edit_publication_confirm_button_clicked_cb (GtkButton *button, gpoint
902 gtk_widget_hide (GTK_WIDGET (pubwindow)); 902 gtk_widget_hide (GTK_WIDGET (pubwindow));
903} 903}
904 904
905gboolean
906GNUNET_GTK_edit_publication_window_delete_event_cb (GtkWidget *widget,
907 GdkEvent *event, gpointer user_data)
908{
909 GtkBuilder *builder;
910 GtkButton *button;
911 builder = GTK_BUILDER (user_data);
912
913 button = GTK_BUTTON (gtk_builder_get_object (builder,
914 "GNUNET_GTK_edit_publication_cancel_button"));
915
916 GNUNET_GTK_edit_publication_cancel_button_clicked_cb (button, user_data);
917 return TRUE;
918}
905 919
906/** 920/**
907 * Add each of the keywords to the keyword list store. 921 * Add each of the keywords to the keyword list store.
diff --git a/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c b/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c
index 77ae7353..b15060ba 100644
--- a/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c
+++ b/src/fs/gnunet-fs-gtk-main_window_adv_pseudonym.c
@@ -26,6 +26,14 @@
26#include "gnunet-fs-gtk.h" 26#include "gnunet-fs-gtk.h"
27#include "gnunet-fs-gtk-edit_publish_dialog.h" 27#include "gnunet-fs-gtk-edit_publish_dialog.h"
28 28
29gboolean
30GNUNET_GTK_select_pseudonym_dialog_delete_event_cb (GtkWidget *widget,
31 GdkEvent *event, gpointer user_Data)
32{
33 gtk_widget_hide (widget);
34 return TRUE;
35}
36
29/** 37/**
30 * Callback with information about local (!) namespaces. 38 * Callback with information about local (!) namespaces.
31 * Contains the names of the local namespace and the global 39 * Contains the names of the local namespace and the global
diff --git a/src/fs/gnunet-fs-gtk-main_window_file_download.c b/src/fs/gnunet-fs-gtk-main_window_file_download.c
index 4f79329f..cc3b7f8f 100644
--- a/src/fs/gnunet-fs-gtk-main_window_file_download.c
+++ b/src/fs/gnunet-fs-gtk-main_window_file_download.c
@@ -126,6 +126,17 @@ GNUNET_GTK_open_url_dialog_cancel_button_clicked_cb (GtkButton *button,
126 return; 126 return;
127} 127}
128 128
129gboolean
130GNUNET_GTK_open_url_window_delete_event_cb (GtkWidget *widget,
131 GdkEvent *event, gpointer user_data)
132{
133 GtkBuilder *builder;
134 builder = GTK_BUILDER (user_data);
135
136 gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (builder, "GNUNET_GTK_open_url_window")));
137 return TRUE;
138}
139
129#ifndef GDK_KEY_Return 140#ifndef GDK_KEY_Return
130#define GDK_KEY_Return GDK_Return 141#define GDK_KEY_Return GDK_Return
131#endif 142#endif