summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-10-27 06:14:17 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:45:51 +0200
commit337155137426e1a07049f59f8a7ec63ec4b94c80 (patch)
tree2d2a1cc22f869054cbd7e0fa697d2c03f907868f /src
parent2218501731180797c5e29ce677f31fd2b2d3ecea (diff)
downloadcaja-337155137426e1a07049f59f8a7ec63ec4b94c80.tar.bz2
caja-337155137426e1a07049f59f8a7ec63ec4b94c80.tar.xz
[connect-dialog] fixes for the handling of iconized entries
http://git.gnome.org/browse/nautilus/commit/?id=1c826ed78bde5f34fd4a0f72d788b8d0824d6099
Diffstat (limited to 'src')
-rw-r--r--src/caja-connect-server-dialog.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index ee5416bf..1c759820 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -227,17 +227,19 @@ static void
iconize_entry (CajaConnectServerDialog *dialog,
GtkWidget *entry)
{
- dialog->details->iconized_entries =
- g_list_prepend (dialog->details->iconized_entries, entry);
+ if (!g_list_find (dialog->details->iconized_entries, entry)) {
+ dialog->details->iconized_entries =
+ g_list_prepend (dialog->details->iconized_entries, entry);
- gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_SECONDARY,
- GTK_STOCK_DIALOG_WARNING);
+ gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
+ GTK_ENTRY_ICON_SECONDARY,
+ GTK_STOCK_DIALOG_WARNING);
- gtk_widget_grab_focus (entry);
+ gtk_widget_grab_focus (entry);
- g_signal_connect (entry, "changed",
- G_CALLBACK (iconized_entry_changed_cb), dialog);
+ g_signal_connect (entry, "changed",
+ G_CALLBACK (iconized_entry_changed_cb), dialog);
+ }
}
static void
@@ -709,10 +711,10 @@ caja_connect_server_dialog_finalize (GObject *object)
abort_mount_operation (dialog);
- g_list_foreach (dialog->details->iconized_entries,
- (GFunc) iconized_entry_restore, dialog);
- g_list_free (dialog->details->iconized_entries);
- dialog->details->iconized_entries = NULL;
+ if (dialog->details->iconized_entries != NULL) {
+ g_list_free (dialog->details->iconized_entries);
+ dialog->details->iconized_entries = NULL;
+ }
G_OBJECT_CLASS (caja_connect_server_dialog_parent_class)->finalize (object);
}