From 74ada04fb25609778e9cc42f4c7a4cccca152861 Mon Sep 17 00:00:00 2001 From: Michael Zucchi Date: Tue, 27 Jun 2000 03:43:17 +0000 Subject: Close the dialog when done. Dont do anything if 'new' was pressed, and 2000-06-27 Michael Zucchi * e-shell.c (folder_selection_dialog_clicked_cb): Close the dialog when done. Dont do anything if 'new' was pressed, and always return empty strings if 'cancel' was pressed. 2000-06-27 Michael Zucchi * e-shell.c (impl_Shell_user_select_folder): Set the listener as the corba_listener data, not the shell. svn path=/trunk/; revision=3747 --- shell/e-shell.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'shell/e-shell.c') diff --git a/shell/e-shell.c b/shell/e-shell.c index 7e5400d7e3..85c76d20c1 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -103,6 +103,9 @@ folder_selection_dialog_clicked_cb (GnomeDialog *dialog, char *uri; const char *physical_uri; + if (button_number == 2) + return; + folder_selection_dialog = E_SHELL_FOLDER_SELECTION_DIALOG (dialog); shell = E_SHELL (data); listener = gtk_object_get_data (GTK_OBJECT (dialog), "corba_listener"); @@ -113,7 +116,7 @@ folder_selection_dialog_clicked_cb (GnomeDialog *dialog, uri = g_strconcat (E_SHELL_URI_PREFIX, path, NULL); - if (folder == NULL) /* Uh? */ + if (folder == NULL || button_number == 1) /* Uh? */ physical_uri = ""; else physical_uri = e_folder_get_physical_uri (folder); @@ -127,6 +130,9 @@ folder_selection_dialog_clicked_cb (GnomeDialog *dialog, CORBA_exception_free (&ev); g_free (uri); + + if (button_number != -1) + gnome_dialog_close(dialog); } @@ -203,7 +209,7 @@ impl_Shell_user_select_folder (PortableServer_Servant servant, folder_selection_dialog = e_shell_folder_selection_dialog_new (shell, title, default_folder); listener_duplicate = CORBA_Object_duplicate (listener, ev); - gtk_object_set_data (GTK_OBJECT (folder_selection_dialog), "corba_listener", shell); + gtk_object_set_data (GTK_OBJECT (folder_selection_dialog), "corba_listener", listener_duplicate); gtk_signal_connect (GTK_OBJECT (folder_selection_dialog), "clicked", GTK_SIGNAL_FUNC (folder_selection_dialog_clicked_cb), shell); -- cgit v1.2.3