-- Merging patches from evolution-1-0-branch.

* e-shell-about-box.c: Add Michael MacDonald.

[Fixes #17377, Evolution doesn't work on multi-depth displays.]

* main.c (main): Push GdkRGB visual and colormap.

[Fix #16693.  What happens there is that the user closed the
dialog before the async operation was completed, so when the
notification was received the shell crashed.]

* e-shell-folder-creation-dialog.c: New member
`creation_in_progress' in `DialogData'.
(e_shell_show_folder_creation_dialog): Init to %FALSE.
(async_create_cb): Set to %FALSE.  Also, if the
dialog_data->dialog is %NULL, free the dialog_data before
returning.
(dialog_clicked_cb): Set to %TRUE.
(dialog_destroy_cb): If a creation is in progress, just set the
widget pointers in the DialogData struct to %NULL instead of
freeing the whole struct.
(async_create_cb): Make the OK and Cancel buttons sensitive.
(dialog_clicked_cb): Make them insensitive here.

svn path=/trunk/; revision=15192
This commit is contained in:
Ettore Perazzoli
2001-12-20 06:05:51 +00:00
parent 6cfbc6f4d9
commit a33720dba7
4 changed files with 81 additions and 5 deletions

View File

@ -1,4 +1,33 @@
2001-12-14 Ettore Perazzoli <ettore@ximian.com> 2001-12-17 Ettore Perazzoli <ettore@ximian.com>
* e-shell-about-box.c: Add Michael MacDonald.
2001-12-17 Ettore Perazzoli <ettore@ximian.com>
[Fix #17377, Evolution doesn't work on multi-depth displays.]
* main.c (main): Push GdkRGB visual and colormap.
2001-12-17 Ettore Perazzoli <ettore@ximian.com>
[Fix #16693. What happens there is that the user closed the
dialog before the async operation was completed, so when the
notification was received the shell crashed.]
* e-shell-folder-creation-dialog.c: New member
`creation_in_progress' in `DialogData'.
(e_shell_show_folder_creation_dialog): Init to %FALSE.
(async_create_cb): Set to %FALSE. Also, if the
dialog_data->dialog is %NULL, free the dialog_data before
returning.
(dialog_clicked_cb): Set to %TRUE.
(dialog_destroy_cb): If a creation is in progress, just set the
widget pointers in the DialogData struct to %NULL instead of
freeing the whole struct.
(async_create_cb): Make the OK and Cancel buttons sensitive.
(dialog_clicked_cb): Make them insensitive here.
2001-12-12 Ettore Perazzoli <ettore@ximian.com>
[Fix #17258, shell displays splash even if Evolution is already [Fix #17258, shell displays splash even if Evolution is already
running.] running.]
@ -6,7 +35,7 @@
* e-shell.c (e_shell_construct): Display the splash screen only if * e-shell.c (e_shell_construct): Display the splash screen only if
the registration succeeds. the registration succeeds.
2001-12-12 Ettore Perazzoli <ettore@ximian.com> 2001-12-10 Ettore Perazzoli <ettore@ximian.com>
[Fix #14838, saving passwords doesn't work. It is actually a [Fix #14838, saving passwords doesn't work. It is actually a
workaround for some obscure Bonobo-conf bug.] workaround for some obscure Bonobo-conf bug.]
@ -15,10 +44,15 @@
function to create the `~/evolution/private' directory. function to create the `~/evolution/private' directory.
(e_setup): Call it. (e_setup): Call it.
2001-12-05 Ettore Perazzoli <ettore@ximian.com> 2001-12-07 Iain Holmes <iain@ximian.com>
* e-shell-about-box.c: Add missing comma. [Trying to fix #14701, importing locks up Evolution.]
* e-shell-importer.c (show_error): Show an error message, but not
modally.
(start_import): Use above function so none of the errors are modal.
(folder_selected): Hide the folder dialog.
2001-12-04 Ettore Perazzoli <ettore@ximian.com> 2001-12-04 Ettore Perazzoli <ettore@ximian.com>
[Fix #7827, Switching desktops leaves the folder bar popped up.] [Fix #7827, Switching desktops leaves the folder bar popped up.]

View File

@ -64,6 +64,7 @@ static const char *text[] = {
"Miles Lane", "Miles Lane",
"Jason Leach", "Jason Leach",
"Matthew Loper", "Matthew Loper",
"Michael MacDonald",
"Kjartan Maraas", "Kjartan Maraas",
"Michael Meeks", "Michael Meeks",
"Federico Mena", "Federico Mena",

View File

@ -61,6 +61,8 @@ struct _DialogData {
EShellFolderCreationDialogCallback result_callback; EShellFolderCreationDialogCallback result_callback;
void *result_callback_data; void *result_callback_data;
gboolean creation_in_progress;
}; };
typedef struct _DialogData DialogData; typedef struct _DialogData DialogData;
@ -85,6 +87,11 @@ async_create_cb (EStorageSet *storage_set,
dialog_data = (DialogData *) data; dialog_data = (DialogData *) data;
dialog_data->creation_in_progress = FALSE;
gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 0, TRUE);
gnome_dialog_set_sensitive (GNOME_DIALOG (dialog_data->dialog), 1, TRUE);
if (result == E_STORAGE_OK) { if (result == E_STORAGE_OK) {
/* Success! Tell the callback of this, then return */ /* Success! Tell the callback of this, then return */
if (dialog_data->result_callback != NULL) if (dialog_data->result_callback != NULL)
@ -92,7 +99,14 @@ async_create_cb (EStorageSet *storage_set,
E_SHELL_FOLDER_CREATION_DIALOG_RESULT_SUCCESS, E_SHELL_FOLDER_CREATION_DIALOG_RESULT_SUCCESS,
dialog_data->folder_path, dialog_data->folder_path,
dialog_data->result_callback_data); dialog_data->result_callback_data);
gtk_widget_destroy (dialog_data->dialog); if (dialog_data->dialog != NULL) {
gtk_widget_destroy (dialog_data->dialog);
} else {
/* If dialog_data->dialog is NULL, it means that the
dialog has been destroyed before we were done, so we
have to free the dialog_data ourselves. */
dialog_data_destroy (dialog_data);
}
return; return;
} else if (result == E_STORAGE_EXISTS) { } else if (result == E_STORAGE_EXISTS) {
e_storage_set_view_set_current_folder (E_STORAGE_SET_VIEW (dialog_data->storage_set_view), e_storage_set_view_set_current_folder (E_STORAGE_SET_VIEW (dialog_data->storage_set_view),
@ -110,6 +124,12 @@ async_create_cb (EStorageSet *storage_set,
e_notice (GTK_WINDOW (dialog_data->dialog), GNOME_MESSAGE_BOX_ERROR, e_notice (GTK_WINDOW (dialog_data->dialog), GNOME_MESSAGE_BOX_ERROR,
_("Cannot create the specified folder:\n%s"), _("Cannot create the specified folder:\n%s"),
e_storage_result_to_string (result)); e_storage_result_to_string (result));
/* If dialog_data->dialog is NULL, it means that the dialog has been
destroyed before we were done, so we have to free the dialog_data
ourselves. */
if (dialog_data->dialog == NULL)
dialog_data_destroy (dialog_data);
} }
@ -177,6 +197,11 @@ dialog_clicked_cb (GnomeDialog *dialog,
g_free (dialog_data->folder_path); g_free (dialog_data->folder_path);
dialog_data->folder_path = path; dialog_data->folder_path = path;
gnome_dialog_set_sensitive (dialog, 0, FALSE);
gnome_dialog_set_sensitive (dialog, 1, FALSE);
dialog_data->creation_in_progress = TRUE;
e_storage_set_async_create_folder (storage_set, e_storage_set_async_create_folder (storage_set,
path, path,
folder_type, folder_type,
@ -191,6 +216,18 @@ dialog_destroy_cb (GtkObject *object,
DialogData *dialog_data; DialogData *dialog_data;
dialog_data = (DialogData *) data; dialog_data = (DialogData *) data;
if (dialog_data->creation_in_progress) {
/* If the dialog has been closed before we are done creating
the folder, the dialog_data will be freed after the creation
is completed. */
dialog_data->dialog = NULL;
dialog_data->folder_name_entry = NULL;
dialog_data->storage_set_view = NULL;
dialog_data->folder_type_option_menu = NULL;
return;
}
dialog_data_destroy (dialog_data); dialog_data_destroy (dialog_data);
} }
@ -500,6 +537,7 @@ e_shell_show_folder_creation_dialog (EShell *shell,
dialog_data->folder_path = NULL; dialog_data->folder_path = NULL;
dialog_data->result_callback = result_callback; dialog_data->result_callback = result_callback;
dialog_data->result_callback_data = result_callback_data; dialog_data->result_callback_data = result_callback_data;
dialog_data->creation_in_progress = FALSE;
gtk_signal_connect (GTK_OBJECT (dialog), "clicked", gtk_signal_connect (GTK_OBJECT (dialog), "clicked",
GTK_SIGNAL_FUNC (dialog_clicked_cb), dialog_data); GTK_SIGNAL_FUNC (dialog_clicked_cb), dialog_data);

View File

@ -351,6 +351,9 @@ main (int argc, char **argv)
gtk_idle_add (idle_cb, uri_list); gtk_idle_add (idle_cb, uri_list);
gtk_widget_push_visual (gdk_rgb_get_visual ());
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
bonobo_main (); bonobo_main ();
return 0; return 0;