evolution r34775 - in trunk: mail plugins/groupwise-features
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r34775 - in trunk: mail plugins/groupwise-features
- Date: Mon, 7 Jan 2008 12:12:13 +0000 (GMT)
Author: mcrha
Date: Mon Jan 7 12:12:13 2008
New Revision: 34775
URL: http://svn.gnome.org/viewvc/evolution?rev=34775&view=rev
Log:
2008-01-07 Milan Crha <mcrha redhat com>
** Fix for bug #300336
* plugins/groupwise-features/share-folder-common.c: (users_dialog_response):
Ensure vfolder is running.
* mail/mail-vfolder.h: (vfolder_loaded):
* mail/mail-vfolder.c: (vfolder_loaded): New helper function.
* mail/em-folder-utils.c: (emfu_popup_new_folder_response):
* mail/mail-vfolder.c: (vfolder_gui_add_rule),
(vfolder_gui_add_from_message), (vfolder_gui_add_from_address):
* mail/em-folder-browser.c: (emfb_search_menu_activated):
* mail/em-folder-view.c: (emp_uri_popup_vfolder_sender),
(emp_uri_popup_vfolder_recipient), (vfolder_type_current):
Ensure vfolder is running.
* mail/mail-component.c: (mc_startup): Do not start vfolder when
disabled by option '/apps/evolution/mail/display/enable_vfolders'.
* mail/evolution-mail.schemas.in: Added schema for new option.
* mail/mail-config.glade:
* mail/em-mailer-prefs.h:
* mail/em-mailer-prefs.c: Added checkbox for "Enable Search Folders" option.
Note: if your schema failed to install, then the search folders will be hidden. Enable by hand then.
Modified:
trunk/mail/ChangeLog
trunk/mail/em-folder-browser.c
trunk/mail/em-folder-utils.c
trunk/mail/em-folder-view.c
trunk/mail/em-mailer-prefs.c
trunk/mail/em-mailer-prefs.h
trunk/mail/evolution-mail.schemas.in
trunk/mail/mail-component.c
trunk/mail/mail-config.glade
trunk/mail/mail-vfolder.c
trunk/mail/mail-vfolder.h
trunk/plugins/groupwise-features/ChangeLog
trunk/plugins/groupwise-features/share-folder-common.c
Modified: trunk/mail/ChangeLog
==============================================================================
--- trunk/mail/ChangeLog (original)
+++ trunk/mail/ChangeLog Mon Jan 7 12:12:13 2008
@@ -1,3 +1,23 @@
+2008-01-07 Milan Crha <mcrha redhat com>
+
+ ** Fix for bug #300336
+
+ * mail-vfolder.h: (vfolder_loaded):
+ * mail-vfolder.c: (vfolder_loaded): New helper function.
+ * em-folder-utils.c: (emfu_popup_new_folder_response):
+ * mail-vfolder.c: (vfolder_gui_add_rule),
+ (vfolder_gui_add_from_message), (vfolder_gui_add_from_address):
+ * em-folder-browser.c: (emfb_search_menu_activated):
+ * em-folder-view.c: (emp_uri_popup_vfolder_sender),
+ (emp_uri_popup_vfolder_recipient), (vfolder_type_current):
+ Ensure vfolder is running.
+ * mail-component.c: (mc_startup): Do not start vfolder when
+ disabled by option '/apps/evolution/mail/display/enable_vfolders'.
+ * evolution-mail.schemas.in: Added schema for new option.
+ * mail-config.glade:
+ * em-mailer-prefs.h:
+ * em-mailer-prefs.c: Added checkbox for "Enable Search Folders" option.
+
2008-01-06 Gilles Dartiguelongue <gdartigu svn gnome org>
** Fix bug #497914
Modified: trunk/mail/em-folder-browser.c
==============================================================================
--- trunk/mail/em-folder-browser.c (original)
+++ trunk/mail/em-folder-browser.c Mon Jan 7 12:12:13 2008
@@ -757,9 +757,14 @@
case ESB_SAVE:
d(printf("Save vfolder\n"));
if (efb->current_query) {
- FilterRule *rule = vfolder_clone_rule(efb->current_query);
+ FilterRule *rule;
char *name, *text;
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
+ rule = vfolder_clone_rule (efb->current_query);
text = e_search_bar_get_text(esb);
name = g_strdup_printf("%s %s", rule->name, (text&&text[0])?text:"''");
g_free (text);
Modified: trunk/mail/em-folder-utils.c
==============================================================================
--- trunk/mail/em-folder-utils.c (original)
+++ trunk/mail/em-folder-utils.c Mon Jan 7 12:12:13 2008
@@ -707,6 +707,10 @@
if (CAMEL_IS_VEE_STORE(store)) {
EMVFolderRule *rule;
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
rule = em_vfolder_rule_new();
filter_rule_set_name((FilterRule *)rule, path);
vfolder_gui_add_rule(rule);
Modified: trunk/mail/em-folder-view.c
==============================================================================
--- trunk/mail/em-folder-view.c (original)
+++ trunk/mail/em-folder-view.c Mon Jan 7 12:12:13 2008
@@ -1940,6 +1940,10 @@
}
if (url->path && url->path[0]) {
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
addr = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (addr), url->path);
vfolder_gui_add_from_address (addr, AUTO_FROM, emfv->folder_uri);
@@ -1966,6 +1970,10 @@
}
if (url->path && url->path[0]) {
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
addr = camel_internet_address_new ();
camel_address_decode (CAMEL_ADDRESS (addr), url->path);
vfolder_gui_add_from_address (addr, AUTO_TO, emfv->folder_uri);
@@ -1994,8 +2002,13 @@
uids = message_list_get_selected (emfv->list);
- if (uids->len == 1)
+ if (uids->len == 1) {
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
vfolder_type_uid (emfv->folder, (char *) uids->pdata[0], emfv->folder_uri, type);
+ }
em_utils_uids_free (uids);
}
Modified: trunk/mail/em-mailer-prefs.c
==============================================================================
--- trunk/mail/em-mailer-prefs.c (original)
+++ trunk/mail/em-mailer-prefs.c Mon Jan 7 12:12:13 2008
@@ -1128,6 +1128,11 @@
gtk_widget_set_sensitive ((GtkWidget *) prefs->citation_color, FALSE);
g_free (buf);
+ prefs->enable_search_folders = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEnableSearchFolders"));
+ toggle_button_init (prefs, prefs->enable_search_folders, FALSE,
+ "/apps/evolution/mail/display/enable_vfolders",
+ G_CALLBACK (toggle_button_toggled));
+
/* Deleting Mail */
prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
prefs->empty_trash_days = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuEmptyTrashDays"));
Modified: trunk/mail/em-mailer-prefs.h
==============================================================================
--- trunk/mail/em-mailer-prefs.h (original)
+++ trunk/mail/em-mailer-prefs.h Mon Jan 7 12:12:13 2008
@@ -80,6 +80,7 @@
struct _GtkOptionMenu *charset;
struct _GtkToggleButton *citation_highlight;
struct _GtkColorButton *citation_color;
+ struct _GtkToggleButton *enable_search_folders;
struct _GtkToggleButton *magic_spacebar;
/* Deleting Mail */
Modified: trunk/mail/evolution-mail.schemas.in
==============================================================================
--- trunk/mail/evolution-mail.schemas.in (original)
+++ trunk/mail/evolution-mail.schemas.in Mon Jan 7 12:12:13 2008
@@ -428,6 +428,20 @@
</schema>
<schema>
+ <key>/schemas/apps/evolution/mail/display/enable_vfolders</key>
+ <applyto>/apps/evolution/mail/display/enable_vfolders</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Enable Search Folders</short>
+ <long>
+ Enable Search Folders on startup.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/mail/display/safe_list</key>
<applyto>/apps/evolution/mail/display/safe_list</applyto>
<owner>evolution-mail</owner>
Modified: trunk/mail/mail-component.c
==============================================================================
--- trunk/mail/mail-component.c (original)
+++ trunk/mail/mail-component.c Mon Jan 7 12:12:13 2008
@@ -368,6 +368,7 @@
mc_startup(MailComponent *mc)
{
static int started = 0;
+ GConfClient *gconf;
if (started)
return;
@@ -375,7 +376,11 @@
mc_setup_local_store(mc);
load_accounts(mc, mail_config_get_accounts());
- vfolder_load_storage();
+
+ gconf = mail_config_get_gconf_client();
+
+ if (gconf_client_get_bool (gconf, "/apps/evolution/mail/display/enable_vfolders", NULL))
+ vfolder_load_storage();
}
static void
Modified: trunk/mail/mail-config.glade
==============================================================================
--- trunk/mail/mail-config.glade (original)
+++ trunk/mail/mail-config.glade Mon Jan 7 12:12:13 2008
@@ -5268,6 +5268,62 @@
<property name="fill">True</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hboxEnableSearchFolders">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">6</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="chkEnableSearchFolders">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enable Sea_rch Folders</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">True</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="lblEnableSFRestart">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">(Note: Requires restart)</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="left_attach">0</property>
Modified: trunk/mail/mail-vfolder.c
==============================================================================
--- trunk/mail/mail-vfolder.c (original)
+++ trunk/mail/mail-vfolder.c Mon Jan 7 12:12:13 2008
@@ -948,6 +948,17 @@
g_free(storeuri);
}
+/**
+ * vfolder_loaded
+ * Test if we have vfolder already inited or not.
+ * @return Whether was vfolder inited or not (by call of @ref vfolder_load_storage).
+ **/
+gboolean
+vfolder_loaded (void)
+{
+ return vfolder_hash != NULL;
+}
+
void
vfolder_revert(void)
{
@@ -1113,6 +1124,10 @@
GtkWidget *w;
GtkDialog *gd;
+ /* this should be done before we call this function */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
w = filter_rule_get_widget((FilterRule *)rule, (RuleContext *)context);
gd = (GtkDialog *)gtk_dialog_new_with_buttons(_("New Search Folder"),
@@ -1142,6 +1157,10 @@
g_return_if_fail (msg != NULL);
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
rule = (EMVFolderRule*)em_vfolder_rule_from_message(context, msg, flags, source);
vfolder_gui_add_rule(rule);
}
@@ -1153,6 +1172,10 @@
g_return_if_fail (addr != NULL);
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
rule = (EMVFolderRule*)em_vfolder_rule_from_address(context, addr, flags, source);
vfolder_gui_add_rule(rule);
}
Modified: trunk/mail/mail-vfolder.h
==============================================================================
--- trunk/mail/mail-vfolder.h (original)
+++ trunk/mail/mail-vfolder.h Mon Jan 7 12:12:13 2008
@@ -10,6 +10,7 @@
struct _CamelInternetAddress;
void vfolder_load_storage(void);
+gboolean vfolder_loaded (void);
void vfolder_revert(void);
void vfolder_edit (void);
Modified: trunk/plugins/groupwise-features/ChangeLog
==============================================================================
--- trunk/plugins/groupwise-features/ChangeLog (original)
+++ trunk/plugins/groupwise-features/ChangeLog Mon Jan 7 12:12:13 2008
@@ -1,3 +1,10 @@
+2008-01-07 Milan Crha <mcrha redhat com>
+
+ ** Fix for bug #300336
+
+ * share-folder-common.c: (users_dialog_response):
+ Ensure vfolder is running.
+
2007-12-06 Alex Kloss <alexkloss att net>
** Fix for bug #347328
Modified: trunk/plugins/groupwise-features/share-folder-common.c
==============================================================================
--- trunk/plugins/groupwise-features/share-folder-common.c (original)
+++ trunk/plugins/groupwise-features/share-folder-common.c Mon Jan 7 12:12:13 2008
@@ -273,6 +273,10 @@
if (CAMEL_IS_VEE_STORE(store)) {
EMVFolderRule *rule;
+ /* ensures vfolder is running */
+ if (!vfolder_loaded ())
+ vfolder_load_storage ();
+
rule = em_vfolder_rule_new();
filter_rule_set_name((FilterRule *)rule, path);
vfolder_gui_add_rule(rule);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]