* Emission of progress-changed signal is not alowed, because hang on
authorJavier Fernandez Garcia-Boente <jfernandez@igalia.com>
Tue, 14 Aug 2007 09:57:49 +0000 (09:57 +0000)
committerJavier Fernandez Garcia-Boente <jfernandez@igalia.com>
Tue, 14 Aug 2007 09:57:49 +0000 (09:57 +0000)
folder_copy_asunc was fixed.
* Set the correct path for mcc_mapping file (Fixes NB#61072)
* Fixed some bugs on dimming rules, to allow copy/cut/paste
of folders.

pmo-trunk-r2980

src/maemo/easysetup/modest-easysetup-country-combo-box.c
src/modest-mail-operation.c
src/modest-ui-dimming-rules.c

index ce9f823..895d54a 100644 (file)
@@ -191,7 +191,7 @@ static void load_from_file (EasysetupCountryComboBox *self)
        EasysetupCountryComboBoxPrivate *priv = COUNTRY_COMBO_BOX_GET_PRIVATE (self);
        
        /* Load the file one line at a time: */
-#ifndef MODEST_HILDON_VERSION_0
+#ifdef MODEST_HILDON_VERSION_0
        const gchar* filepath = PROVIDER_DATA_DIR "/mcc_mapping";
 #else
        /* This is the official version, in the 'operator-wizard-settings' package */
index e7ff1e7..02835cc 100644 (file)
@@ -1678,15 +1678,7 @@ transfer_folder_status_cb (GObject *obj,
 
        /* no gdk_threads_enter (), CHECKED */
 
-       /* * Bugfix by PVH
-        * 
-        * Javier: if I remove this one, tny_folder_copy_async does not hang anymore
-        *
-        * g_signal_emit (G_OBJECT (self), signals[PROGRESS_CHANGED_SIGNAL], 0, state, NULL); 
-        * 
-        * https://projects.maemo.org/bugzilla/show_bug.cgi?id=63060
-        *
-        * */
+       g_signal_emit (G_OBJECT (self), signals[PROGRESS_CHANGED_SIGNAL], 0, state, NULL); 
 
        /* no gdk_threads_leave (), CHECKED */
 
index c780c34..b5eb830 100644 (file)
@@ -1181,18 +1181,23 @@ modest_ui_dimming_rules_on_cut (ModestWindow *win, gpointer user_data)
 
        /* Check window specific dimming rules */
        if (MODEST_IS_MAIN_WINDOW (win)) {
-               if (!dimmed) { 
-                       dimmed = _selected_folder_is_empty (MODEST_MAIN_WINDOW(win));                   
-                       if (dimmed)
-                               modest_dimming_rule_set_notification (rule, "");
-               }
-               if (!dimmed) {
-                       dimmed = _selected_msg_sent_in_progress (win);
-                       if (dimmed)
+               /* Get focused widget */
+               GtkWidget *focused = gtk_window_get_focus (GTK_WINDOW (win));
+               
+               if (MODEST_IS_HEADER_VIEW (focused)) {
+                       if (!dimmed) { 
+                               dimmed = _selected_folder_is_empty (MODEST_MAIN_WINDOW(win));                   
+                               if (dimmed)
+                                       modest_dimming_rule_set_notification (rule, "");
+                       }
+                       if (!dimmed) {
+                               dimmed = _selected_msg_sent_in_progress (win);
+                               if (dimmed)
                                modest_dimming_rule_set_notification (rule, _("mcen_ib_unable_to_cut_mess"));
+                       }
                }
        }
-       
+
        return dimmed;
 }
 
@@ -1212,15 +1217,20 @@ modest_ui_dimming_rules_on_copy (ModestWindow *win, gpointer user_data)
        
        /* Check window specific dimming rules */
        if (MODEST_IS_MAIN_WINDOW (win)) {
-               if (!dimmed) {
-                       dimmed = _selected_folder_is_empty (MODEST_MAIN_WINDOW(win));                   
-                       if (dimmed)
-                               modest_dimming_rule_set_notification (rule, "");
-               }               
-               if (!dimmed) {
-                       dimmed = _selected_msg_sent_in_progress (win);
-                       if (dimmed)
-                               modest_dimming_rule_set_notification (rule, _("mcen_ib_unable_to_cut_mess"));
+               /* Get focused widget */
+               GtkWidget *focused = gtk_window_get_focus (GTK_WINDOW (win));
+               
+               if (MODEST_IS_HEADER_VIEW (focused)) {
+                       if (!dimmed) {
+                               dimmed = _selected_folder_is_empty (MODEST_MAIN_WINDOW(win));                   
+                               if (dimmed)
+                                       modest_dimming_rule_set_notification (rule, "");
+                       }               
+                       if (!dimmed) {
+                               dimmed = _selected_msg_sent_in_progress (win);
+                               if (dimmed)
+                                       modest_dimming_rule_set_notification (rule, _("mcen_ib_unable_to_cut_mess"));
+                       }
                }
        }