[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19662 - in gnunet-gtk: contrib src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19662 - in gnunet-gtk: contrib src/fs |
Date: |
Fri, 3 Feb 2012 00:53:25 +0100 |
Author: grothoff
Date: 2012-02-03 00:53:25 +0100 (Fri, 03 Feb 2012)
New Revision: 19662
Modified:
gnunet-gtk/contrib/gnunet_fs_gtk_download_as_dialog.glade
gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade
gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c
gnunet-gtk/src/fs/gnunet-fs-gtk_open-uri.c
gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
Log:
-fixing delete event handlers
Modified: gnunet-gtk/contrib/gnunet_fs_gtk_download_as_dialog.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_download_as_dialog.glade 2012-02-02
23:52:15 UTC (rev 19661)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_download_as_dialog.glade 2012-02-02
23:53:25 UTC (rev 19662)
@@ -1,15 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.20"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkAdjustment" id="GNUNET_GTK_anonymity_adjustment">
- <property name="upper">100000</property>
<property name="value">1</property>
+ <property name="upper">100000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkFileChooserDialog" id="GNUNET_GTK_save_as_dialog">
- <property name="can_focus">False</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="border_width">5</property>
@@ -18,76 +17,28 @@
<property name="destroy_with_parent">True</property>
<property name="icon_name">document-save-as</property>
<property name="type_hint">dialog</property>
- <property name="action">save</property>
<property name="preview_widget_active">False</property>
+ <property name="action">save</property>
<property name="use_preview_label">False</property>
- <signal name="response" handler="GNUNET_GTK_save_as_dialog_response_cb"
swapped="no"/>
+ <signal name="response" handler="GNUNET_GTK_save_as_dialog_response_cb"/>
+ <signal name="delete_event"
handler="GNUNET_GTK_save_as_dialog_delete_event_cb"/>
<child internal-child="vbox">
<object class="GtkVBox" id="dialog-vbox4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton"
id="GNUNET_GTK_save_as_dialog_cancel_button">
- <property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton"
id="GNUNET_GTK_save_as_dialog_ok_button">
- <property name="label">gtk-save</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
<object class="GtkLabel"
id="GNUNET_GTK_save_as_dialog_anonymity_label">
<property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="label"
translatable="yes">_Anonymity:</property>
<property name="use_underline">True</property>
<property name="selectable">True</property>
<property
name="mnemonic_widget">GNUNET_GTK_save_as_dialog_anonymity_spin_button</property>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -95,15 +46,13 @@
<object class="GtkSpinButton"
id="GNUNET_GTK_save_as_dialog_anonymity_spin_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</property>
+ <property name="invisible_char">●</property>
<property name="caps_lock_warning">False</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property
name="adjustment">GNUNET_GTK_anonymity_adjustment</property>
<property name="numeric">True</property>
- <signal name="value-changed"
handler="GNUNET_GTK_anonymity_spin_button_value_changed_cb" after="yes"
swapped="no"/>
+ <signal name="value_changed"
handler="GNUNET_GTK_anonymity_spin_button_value_changed_cb" after="yes"/>
</object>
<packing>
<property name="expand">False</property>
@@ -114,7 +63,6 @@
<child>
<object class="GtkCheckButton"
id="GNUNET_GTK_save_as_recursive_check_button">
<property name="label" translatable="yes">_recursive</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
@@ -136,6 +84,47 @@
<property name="position">2</property>
</packing>
</child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area5">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton"
id="GNUNET_GTK_save_as_dialog_cancel_button">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton"
id="GNUNET_GTK_save_as_dialog_ok_button">
+ <property name="label">gtk-save</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
</object>
</child>
<action-widgets>
Modified: gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade
2012-02-02 23:52:15 UTC (rev 19661)
+++ gnunet-gtk/contrib/gnunet_fs_gtk_select_pseudonym_dialog.glade
2012-02-02 23:53:25 UTC (rev 19662)
@@ -1,6 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
<interface>
<requires lib="gtk+" version="2.20"/>
+ <!-- interface-naming-policy toplevel-contextual -->
<object class="GtkListStore" id="GNUNET_GTK_select_pseudonym_liststore">
<columns>
<!-- column-name namespace_name -->
@@ -22,31 +23,63 @@
<property name="page_size">10</property>
</object>
<object class="GtkDialog" id="GNUNET_GTK_select_pseudonym_dialog">
- <property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Select pseudonym...</property>
<property name="modal">True</property>
<property name="type_hint">normal</property>
- <signal name="response"
handler="GNUNET_GTK_select_pseudonym_dialog_response_cb" swapped="no"/>
+ <signal name="response"
handler="GNUNET_GTK_select_pseudonym_dialog_response_cb"/>
+ <signal name="delete_event"
handler="GNUNET_GTK_select_pseudonym_dialog_delete_event_cb"/>
<child internal-child="vbox">
- <object class="GtkBox" id="GNUNET_GTK_select_pseudonym_dialog_vbox">
+ <object class="GtkVBox" id="GNUNET_GTK_select_pseudonym_dialog_vbox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
+ <child>
+ <object class="GtkScrolledWindow"
id="GNUNET_GTK_select_pseudonym_scrolledwindow">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hadjustment">adjustment1</property>
+ <property name="vadjustment">adjustment2</property>
+ <child>
+ <object class="GtkTreeView"
id="GNUNET_GTK_select_pseudonym_tree_view">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="model">GNUNET_GTK_select_pseudonym_liststore</property>
+ <property name="hadjustment">adjustment1</property>
+ <property name="vadjustment">adjustment2</property>
+ <child>
+ <object class="GtkTreeViewColumn"
id="GNUNET_GTK_select_pseudonym_tree_view_column">
+ <property name="title">Name</property>
+ <property name="expand">True</property>
+ <property name="clickable">True</property>
+ <property name="reorderable">True</property>
+ <property name="sort_indicator">True</property>
+ <property name="sort_column_id">0</property>
+ <child>
+ <object class="GtkCellRendererText"
id="GNUNET_GTK_select_pseudonym_name_renderer"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child internal-child="action_area">
- <object class="GtkButtonBox"
id="GNUNET_GTK_select_pseudonym_dialog_action_area">
+ <object class="GtkHButtonBox"
id="GNUNET_GTK_select_pseudonym_dialog_action_area">
<property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton"
id="GNUNET_GTK_select_pseudonym_cancel_button">
<property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -58,12 +91,10 @@
<child>
<object class="GtkButton"
id="GNUNET_GTK_select_pseudonym_ok_button">
<property name="label">gtk-ok</property>
- <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
@@ -75,52 +106,10 @@
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkScrolledWindow"
id="GNUNET_GTK_select_pseudonym_scrolledwindow">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hadjustment">adjustment1</property>
- <property name="vadjustment">adjustment2</property>
- <child>
- <object class="GtkTreeView"
id="GNUNET_GTK_select_pseudonym_tree_view">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hadjustment">adjustment1</property>
- <property name="vadjustment">adjustment2</property>
- <property
name="model">GNUNET_GTK_select_pseudonym_liststore</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="treeview-selection1"/>
- </child>
- <child>
- <object class="GtkTreeViewColumn"
id="GNUNET_GTK_select_pseudonym_tree_view_column">
- <property name="title" translatable="yes">Name</property>
- <property name="expand">True</property>
- <property name="clickable">True</property>
- <property name="reorderable">True</property>
- <property name="sort_indicator">True</property>
- <property name="sort_column_id">0</property>
- <child>
- <object class="GtkCellRendererText"
id="GNUNET_GTK_select_pseudonym_name_renderer"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
<action-widgets>
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c 2012-02-02
23:52:15 UTC (rev 19661)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_advertise-pseudonym.c 2012-02-02
23:53:25 UTC (rev 19662)
@@ -199,7 +199,7 @@
* @param widget the dialog
* @param event the destroying event
* @param user_data the builder of the dialog
- * @return TRUE (allow destruction)
+ * @return FALSE (allow destruction)
*/
gboolean
GNUNET_GTK_select_pseudonym_dialog_delete_event_cb (GtkWidget *widget,
@@ -210,7 +210,6 @@
GtkTreeModel *tm;
GtkTreeIter iter;
- fprintf (stderr, "DELETE!\n");
tm = GTK_TREE_MODEL (gtk_builder_get_object (builder,
"GNUNET_GTK_select_pseudonym_liststore"));
if (gtk_tree_model_get_iter_first (tm, &iter))
@@ -225,7 +224,7 @@
while (gtk_tree_model_iter_next (tm, &iter));
}
g_object_unref (G_OBJECT (builder));
- return TRUE;
+ return FALSE;
}
@@ -314,7 +313,7 @@
&add_to_list,
ls);
- /* FIXME-UNCLEAN: this signal can be connected by (modern) Glade
automatically */
+ /* FIXME-GTK3: this signal can be connected by (modern) Glade automatically
*/
tv = GTK_TREE_VIEW (gtk_builder_get_object
(builder, "GNUNET_GTK_select_pseudonym_tree_view"));
sel = gtk_tree_view_get_selection (tv);
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c 2012-02-02 23:52:15 UTC
(rev 19661)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_download-save-as.c 2012-02-02 23:53:25 UTC
(rev 19662)
@@ -84,7 +84,7 @@
* @param widget the dialog object
* @param event the deletion event
* @param user_data the 'structDownloadAsDialogContext' of the dialog
- * @return always FALSE
+ * @return always FALSE (destroy the window)
*/
gboolean
GNUNET_GTK_save_as_dialog_delete_event_cb (GtkWidget * widget, GdkEvent *
event,
@@ -106,6 +106,7 @@
GNUNET_free (dlc);
return FALSE;
}
+ /* FIXME-UGLY: this code should be in the 'save_as_dialog_response_cb'
instead */
GNUNET_free_non_null (dc->filename);
dc->filename =
GNUNET_GTK_filechooser_get_filename_utf8 (GTK_FILE_CHOOSER
(dlc->dialog));
@@ -143,6 +144,8 @@
dlc->response = response_id;
/* dialogs don't get delete-event the way normal windows do,
call the handler manually */
+ /* FIXME-UGLY: this is a bit ugly; instead, move the code
+ to close the dialog nicely into here! */
GNUNET_GTK_save_as_dialog_delete_event_cb (GTK_WIDGET (dialog), NULL,
user_data);
gtk_widget_destroy (GTK_WIDGET (dialog));
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_open-uri.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_open-uri.c 2012-02-02 23:52:15 UTC (rev
19661)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_open-uri.c 2012-02-02 23:53:25 UTC (rev
19662)
@@ -138,7 +138,7 @@
* @param widget the window
* @param event the deletion event
* @param user_data the 'GtkBuilder' of the URI dialog
- * @return TRUE (allow destruction)
+ * @return FALSE (allow destruction)
*/
gboolean
GNUNET_GTK_open_url_window_delete_event_cb (GtkWidget * widget,
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2012-02-02 23:52:15 UTC
(rev 19661)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-dialog.c 2012-02-02 23:53:25 UTC
(rev 19662)
@@ -904,7 +904,7 @@
* @param widget the widget emitting the event
* @param event the event
* @param user_data progress dialog context of our window
- * @return FALSE to refuse to close
+ * @return TRUE to refuse to close
*/
gboolean
GNUNET_FS_GTK_progress_dialog_delete_event_cb (GtkWidget *widget,
@@ -912,7 +912,7 @@
void *cls)
{
/* Don't allow GTK to kill the window, until the scan is finished */
- return FALSE;
+ return TRUE;
}
@@ -1982,7 +1982,7 @@
ctx->pseudonym_selection = gtk_tree_view_get_selection (pseudonym_treeview);
ctx->pseudonym_treemodel = gtk_tree_view_get_model (pseudonym_treeview);
- /* connect signals; FIXME-UNCLEAN: these could be connected with (modern)
Glade */
+ /* connect signals; FIXME-GTK3: these could be connected with (modern) Glade
*/
g_signal_connect (G_OBJECT (ctx->file_info_selection), "changed",
G_CALLBACK (selection_changed_cb), ctx);
g_signal_connect (G_OBJECT (ctx->pseudonym_selection), "changed",
Modified: gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c
===================================================================
--- gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c 2012-02-02
23:52:15 UTC (rev 19661)
+++ gnunet-gtk/src/fs/gnunet-fs-gtk_publish-edit-dialog.c 2012-02-02
23:53:25 UTC (rev 19662)
@@ -253,7 +253,7 @@
* @param ts the tree selection object
* @param user_data the 'struct EditPublicationDialogContext'
*/
-/* FIXME-UNCLEAN: connect this signal via glade (modern versions of Glade
support this) */
+/* FIXME-GTK3: connect this signal via glade (modern versions of Glade support
this) */
static void
metadata_selection_changed_cb (GtkTreeSelection *ts,
gpointer user_data)
@@ -502,7 +502,7 @@
* @param ts the tree selection object
* @param user_data the 'struct EditPublicationDialogContext'
*/
-/* FIXME-UNCLEAN: connect this signal via glade (modern versions of Glade
support this) */
+/* FIXME-GTK3: connect this signal via glade (modern versions of Glade support
this) */
static void
keywords_selection_changed_cb (GtkTreeSelection *ts,
gpointer user_data)
@@ -1152,7 +1152,7 @@
gtk_widget_set_visible (GTK_WIDGET (root_label),
is_namespace_edit ? TRUE : FALSE);
- /* FIXME-UNCLEAN: these signal handlers can be set by (modern) versions of
Glade */
+ /* FIXME-GTK3: these signal handlers can be set by (modern) versions of
Glade */
keywords_selection = gtk_tree_view_get_selection (ctx->keywords_treeview);
g_signal_connect (G_OBJECT (keywords_selection), "changed",
G_CALLBACK (keywords_selection_changed_cb), ctx);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19662 - in gnunet-gtk: contrib src/fs,
gnunet <=