evolution r37461 - trunk/mail
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r37461 - trunk/mail
- Date: Thu, 19 Mar 2009 10:02:37 +0000 (UTC)
Author: mcrha
Date: Thu Mar 19 10:02:36 2009
New Revision: 37461
URL: http://svn.gnome.org/viewvc/evolution?rev=37461&view=rev
Log:
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.
Modified:
trunk/mail/ChangeLog
trunk/mail/em-folder-browser.c
trunk/mail/em-folder-selector.c
trunk/mail/em-folder-tree.c
trunk/mail/em-folder-utils.c
trunk/mail/em-folder-utils.h
trunk/mail/mail-component.c
Modified: trunk/mail/em-folder-browser.c
==============================================================================
--- trunk/mail/em-folder-browser.c (original)
+++ trunk/mail/em-folder-browser.c Thu Mar 19 10:02:36 2009
@@ -1612,11 +1612,11 @@
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;
Modified: trunk/mail/em-folder-selector.c
==============================================================================
--- trunk/mail/em-folder-selector.c (original)
+++ trunk/mail/em-folder-selector.c Thu Mar 19 10:02:36 2009
@@ -132,7 +132,7 @@
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");
}
Modified: trunk/mail/em-folder-tree.c
==============================================================================
--- trunk/mail/em-folder-tree.c (original)
+++ trunk/mail/em-folder-tree.c Thu Mar 19 10:02:36 2009
@@ -2000,7 +2000,7 @@
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);
}
}
Modified: trunk/mail/em-folder-utils.c
==============================================================================
--- trunk/mail/em-folder-utils.c (original)
+++ trunk/mail/em-folder-utils.c Thu Mar 19 10:02:36 2009
@@ -679,7 +679,8 @@
/* 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 @@
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);
}
Modified: trunk/mail/em-folder-utils.h
==============================================================================
--- trunk/mail/em-folder-utils.h (original)
+++ trunk/mail/em-folder-utils.h Thu Mar 19 10:02:36 2009
@@ -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_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
Modified: trunk/mail/mail-component.c
==============================================================================
--- trunk/mail/mail-component.c (original)
+++ trunk/mail/mail-component.c Thu Mar 19 10:02:36 2009
@@ -951,7 +951,7 @@
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]