diff options
author | Milan Crha <mcrha@redhat.com> | 2009-03-19 18:02:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2009-03-19 18:02:36 +0800 |
commit | dc3b372304b8b83bd335f8871755ad15154c7f25 (patch) | |
tree | f0a11e9e5e6b2904144f8c522d286f1ba69dcf64 /mail | |
parent | 1af389e5c8c4e8ec6b3479e8d70379826d075576 (diff) | |
download | gsoc2013-evolution-dc3b372304b8b83bd335f8871755ad15154c7f25.tar gsoc2013-evolution-dc3b372304b8b83bd335f8871755ad15154c7f25.tar.gz gsoc2013-evolution-dc3b372304b8b83bd335f8871755ad15154c7f25.tar.bz2 gsoc2013-evolution-dc3b372304b8b83bd335f8871755ad15154c7f25.tar.lz gsoc2013-evolution-dc3b372304b8b83bd335f8871755ad15154c7f25.tar.xz gsoc2013-evolution-dc3b372304b8b83bd335f8871755ad15154c7f25.tar.zst gsoc2013-evolution-dc3b372304b8b83bd335f8871755ad15154c7f25.zip |
** Fix for bug #504767
2009-03-19 Milan Crha <mcrha@redhat.com>
** Fix for bug #504767
* em-folder-utils.h: (em_folder_utils_create_folder):
* em-folder-utils.c: (em_folder_utils_create_folder):
* em-folder-selector.c: (emfs_response):
Inherit modality from a parent's window, if any.
* em-folder-browser.c: (emfb_folder_create):
* em-folder-tree.c: (emft_popup_new_folder):
* mail-component.c: (create_item):
Propagate changes in function prototype.
svn path=/trunk/; revision=37461
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 13 | ||||
-rw-r--r-- | mail/em-folder-browser.c | 4 | ||||
-rw-r--r-- | mail/em-folder-selector.c | 2 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 2 | ||||
-rw-r--r-- | mail/em-folder-utils.c | 9 | ||||
-rw-r--r-- | mail/em-folder-utils.h | 4 | ||||
-rw-r--r-- | mail/mail-component.c | 2 |
7 files changed, 29 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 302e91ee82..bf2478462c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,16 @@ +2009-03-19 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #504767 + + * em-folder-utils.h: (em_folder_utils_create_folder): + * em-folder-utils.c: (em_folder_utils_create_folder): + * em-folder-selector.c: (emfs_response): + Inherit modality from a parent's window, if any. + * em-folder-browser.c: (emfb_folder_create): + * em-folder-tree.c: (emft_popup_new_folder): + * mail-component.c: (create_item): + Propagate changes in function prototype. + 2009-03-08 David Planella <david.planella@gmail.com> Added Catalan translation of the Evolution welcome e-mail diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index 39eae48266..58e42a5834 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -1612,11 +1612,11 @@ emfb_folder_create(BonoboUIComponent *uid, void *data, const char *path) FIXME: This interface should NOT use a folderinfo */ if (emfb->view.folder) { if ((fi = em_folder_tree_get_selected_folder_info (tree)) != NULL) { - em_folder_utils_create_folder(fi, tree); + em_folder_utils_create_folder (fi, tree, NULL); camel_folder_info_free(fi); } } else { - em_folder_utils_create_folder(NULL, tree); + em_folder_utils_create_folder (NULL, tree, NULL); } return; diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c index ff935674e2..3762e05bf2 100644 --- a/mail/em-folder-selector.c +++ b/mail/em-folder-selector.c @@ -132,7 +132,7 @@ emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs) return; g_object_set_data ((GObject *)emfs->emft, "select", GUINT_TO_POINTER (1)); - em_folder_utils_create_folder(NULL, emfs->emft); + em_folder_utils_create_folder (NULL, emfs->emft, GTK_WINDOW (dialog)); g_signal_stop_emission_by_name (emfs, "response"); } diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 54173a5e51..6b3e792809 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -2000,7 +2000,7 @@ emft_popup_new_folder (EPopup *ep, EPopupItem *pitem, void *data) CamelFolderInfo *fi; if ((fi = em_folder_tree_get_selected_folder_info (emft)) != NULL) { - em_folder_utils_create_folder(fi, emft); + em_folder_utils_create_folder (fi, emft, NULL); camel_folder_info_free(fi); } } diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 195b66a815..f3a839f926 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -679,7 +679,8 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, int response, gpointer d /* FIXME: these functions must be documented */ void -em_folder_utils_create_folder (CamelFolderInfo *folderinfo, EMFolderTree *emft) { +em_folder_utils_create_folder (CamelFolderInfo *folderinfo, EMFolderTree *emft, GtkWindow *parent) +{ EMFolderTree *folder_tree; EMFolderTreeModel *model; GtkWidget *dialog; @@ -690,6 +691,12 @@ em_folder_utils_create_folder (CamelFolderInfo *folderinfo, EMFolderTree *emft) dialog = em_folder_selector_create_new (folder_tree, 0, _("Create folder"), _("Specify where to create the folder:")); if (folderinfo != NULL) em_folder_selector_set_selected ((EMFolderSelector *) dialog, folderinfo->uri); + if (parent) { + gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); + gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); + if (gtk_window_get_modal (parent)) + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + } g_signal_connect (dialog, "response", G_CALLBACK (emfu_popup_new_folder_response), emft); gtk_widget_show (dialog); } diff --git a/mail/em-folder-utils.h b/mail/em-folder-utils.h index 19bedd46a3..73b7bc96b2 100644 --- a/mail/em-folder-utils.h +++ b/mail/em-folder-utils.h @@ -24,6 +24,8 @@ #ifndef _EM_FOLDER_UTILS_H #define _EM_FOLDER_UTILS_H +struct _GtkWindow; + int em_folder_utils_copy_folders(CamelStore *fromstore, const char *frombase, CamelStore *tostore, const char *tobase, int delete); /* FIXME: These api's are really busted, there is no consistency and most rely on the wrong data */ @@ -33,6 +35,6 @@ void em_folder_utils_copy_folder (struct _CamelFolderInfo *folderinfo, int delet void em_folder_utils_delete_folder (struct _CamelFolder *folder); void em_folder_utils_rename_folder (struct _CamelFolder *folder); -void em_folder_utils_create_folder (struct _CamelFolderInfo *folderinfo, EMFolderTree * emft); +void em_folder_utils_create_folder (struct _CamelFolderInfo *folderinfo, EMFolderTree * emft, struct _GtkWindow *parent); #endif diff --git a/mail/mail-component.c b/mail/mail-component.c index 12b4019429..3b67c43ad4 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -951,7 +951,7 @@ create_item(const char *type, EMFolderTreeModel *model, const char *uri, gpointe em_utils_compose_new_message(uri); } else if (strcmp(type, "folder") == 0) { - em_folder_utils_create_folder(NULL, tree); + em_folder_utils_create_folder (NULL, tree, NULL); } else return -1; |