Fixed dimming rules for moving/deleting messages
[modest] / src / modest-ui-actions.c
index eeb8c14..ccd14e6 100644 (file)
@@ -743,10 +743,11 @@ modest_ui_actions_compose_msg(ModestWindow *win,
                gchar *gray_color_markup = NULL, *color_begin = NULL, *color_end = NULL;
                GdkColor color;
 
-               if (gtk_style_lookup_color (GTK_WIDGET (win)->style, "SecondaryTextColor", &color))
+               if (win && gtk_style_lookup_color (gtk_widget_get_style ((GtkWidget *) win),
+                                                  "SecondaryTextColor", &color))
                        gray_color_markup = modest_text_utils_get_color_string (&color);
                if (!gray_color_markup)
-                       gray_color_markup = g_strdup ("#999999");
+                       gray_color_markup = g_strdup ("#babababababa");
 
                color_begin = g_strdup_printf ("<font color=\"%s\">", gray_color_markup);
                color_end = "</font>";
@@ -1298,6 +1299,12 @@ open_msg_performer(gboolean canceled,
        gboolean can_open;
        gchar *account_name = get_info_from_header (helper->header, &is_draft, &can_open);
 
+       if (!g_strcmp0 (account_name, MODEST_LOCAL_FOLDERS_ACCOUNT_ID) ||
+           !g_strcmp0 (account_name, MODEST_MMC_ACCOUNT_ID)) {
+               g_free (account_name);
+               account_name = g_strdup (modest_window_get_active_account (MODEST_WINDOW (parent_window)));
+       }
+
        if (!can_open) {
                modest_window_mgr_unregister_header (modest_runtime_get_window_mgr (), helper->header);
                g_free (account_name);
@@ -4517,8 +4524,6 @@ create_move_to_dialog (GtkWindow *win,
 
                modest_folder_view_set_style (MODEST_FOLDER_VIEW (tree_view),
                                              MODEST_FOLDER_VIEW_STYLE_SHOW_ALL);
-               /* modest_folder_view_update_model (MODEST_FOLDER_VIEW (tree_view), */
-               /*                               TNY_ACCOUNT_STORE (modest_runtime_get_account_store ())); */
 
                active_account_name = modest_window_get_active_account (MODEST_WINDOW (win));
                mgr = modest_runtime_get_account_mgr ();
@@ -5152,8 +5157,8 @@ modest_ui_actions_on_edit_mode_move_to (ModestWindow *win)
        }
 
        /* Create and run the dialog */
+       dialog = create_move_to_dialog (win, NULL, list_to_move);
        toplevel = (GtkWindow *) gtk_widget_get_toplevel ((GtkWidget *) win);
-       dialog = create_move_to_dialog (toplevel, NULL, list_to_move);
        modest_window_mgr_set_modal (modest_runtime_get_window_mgr (),
                                     GTK_WINDOW (dialog),
                                     toplevel);