2012-11-18 [colin] 3.9.0cvs6-stable
authorColin Leroy <colin@colino.net>
Sun, 18 Nov 2012 16:40:41 +0000 (16:40 +0000)
committerColin Leroy <colin@colino.net>
Sun, 18 Nov 2012 16:40:41 +0000 (16:40 +0000)
* src/foldersel.c
* src/prefs_actions.c
* src/prefs_filtering_action.c
* src/prefs_matcher.c
* src/quote_fmt.c
* src/gtk/description_window.c
* src/gtk/description_window.h
* src/gtk/inputdialog.c
* src/gtk/manage_window.c
* src/gtk/quicksearch.c
Backport 3.9.0cvs10:
Try to better fix focus problems. Should address:
Bug #2774
Bug #2624
Bug #1963
Please check using your favorite WM that the following works:
Information button (Quicksearch, Templates, 'Test' filtering
condition)
Folder selection (Move/Copy contextual menu,
various preferences, including 'New folder').
Tested with XFCE, Gnome Shell and Windows.

13 files changed:
ChangeLog
PATCHSETS
configure.ac
src/foldersel.c
src/gtk/description_window.c
src/gtk/description_window.h
src/gtk/inputdialog.c
src/gtk/manage_window.c
src/gtk/quicksearch.c
src/prefs_actions.c
src/prefs_filtering_action.c
src/prefs_matcher.c
src/quote_fmt.c

index 044ab94d86e253654774fc04348b153b5c473c2f..53d60ec56d59a95c26d2091cf338780581cba899 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2012-11-18 [colin]     3.9.0cvs6-stable
+
+       * src/foldersel.c
+       * src/prefs_actions.c
+       * src/prefs_filtering_action.c
+       * src/prefs_matcher.c
+       * src/quote_fmt.c
+       * src/gtk/description_window.c
+       * src/gtk/description_window.h
+       * src/gtk/inputdialog.c
+       * src/gtk/manage_window.c
+       * src/gtk/quicksearch.c
+               Backport 3.9.0cvs10:
+               Try to better fix focus problems. Should address:
+               Bug #2774
+               Bug #2624
+               Bug #1963
+               Please check using your favorite WM that the following works:
+               Information button (Quicksearch, Templates, 'Test' filtering 
+               condition)
+               Folder selection (Move/Copy contextual menu,
+               various preferences, including 'New folder').
+               Tested with XFCE, Gnome Shell and Windows.
+
 2012-11-18 [colin]     3.9.0cvs5-stable
 
        * src/advsearch.c
index 3da15c988cfd923aed4fe1382187475ebc15af39..79124557dc62921be8391baf026a68cc8ccd7c97 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.456 -r 1.395.2.457 src/summaryview.c;  ) > 3.9.0cvs3-stable.patchset
 ( cvs diff -u -r 1.58.2.51 -r 1.58.2.52 po/de.po;  ) > 3.9.0cvs4-stable.patchset
 ( cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/advsearch.c;  ) > 3.9.0cvs5-stable.patchset
+( cvs diff -u -r 1.26.2.49 -r 1.26.2.50 src/foldersel.c;  cvs diff -u -r 1.60.2.83 -r 1.60.2.84 src/prefs_actions.c;  cvs diff -u -r 1.1.4.79 -r 1.1.4.80 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.96 -r 1.43.2.97 src/prefs_matcher.c;  cvs diff -u -r 1.8.2.47 -r 1.8.2.48 src/quote_fmt.c;  cvs diff -u -r 1.5.2.36 -r 1.5.2.37 src/gtk/description_window.c;  cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/gtk/description_window.h;  cvs diff -u -r 1.2.2.48 -r 1.2.2.49 src/gtk/inputdialog.c;  cvs diff -u -r 1.1.4.11 -r 1.1.4.12 src/gtk/manage_window.c;  cvs diff -u -r 1.1.2.119 -r 1.1.2.120 src/gtk/quicksearch.c;  ) > 3.9.0cvs6-stable.patchset
index ab2edd48aebbf7080b6a8711bc10cfecd637c8eb..7ed27b0700542df2c07b93a111b422f3d6eacad8 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=-stable
 
index 018bd4006d9f9d4ce776ddcaa6e919b9b22b6ade..2ac11e1c5981ac22eb64f5a3b67b9f7348f89664 100644 (file)
@@ -178,7 +178,7 @@ FolderItem *foldersel_folder_sel(Folder *cur_folder, FolderSelectionType type,
        gtk_widget_grab_focus(ok_button);
        gtk_widget_grab_focus(treeview);
 
-       gtk_widget_show(window);
+       gtk_window_present(window);
        gtk_window_set_modal(GTK_WINDOW(window), TRUE);
        manage_window_set_transient(GTK_WINDOW(window));
 
@@ -187,10 +187,8 @@ FolderItem *foldersel_folder_sel(Folder *cur_folder, FolderSelectionType type,
        while (finished == FALSE)
                gtk_main_iteration();
 
-       gtk_widget_hide(window);
-       gtk_window_set_modal(GTK_WINDOW(window), FALSE);
-       gtk_entry_set_text(GTK_ENTRY(entry), "");
-       gtk_tree_store_clear(tree_store);
+       gtk_widget_destroy(window);
+       window = NULL;
 
        if (!cancelled &&
            selected_item && (selected_item->path || root_selectable)) {
index 71b6e51db331b166e294facc5bbb67125b2ebee9..9e7d66cf5a1802f49d8a553ec13a984d16118202 100644 (file)
@@ -52,7 +52,12 @@ void description_window_create(DescriptionWindow *dwindow)
                description_create(dwindow);
        
                gtk_window_set_transient_for(GTK_WINDOW(dwindow->window), GTK_WINDOW(dwindow->parent));
+               dwindow->parent_modal = gtk_window_get_modal(GTK_WINDOW(dwindow->parent));
+#ifndef G_OS_WIN32
                gtk_window_set_modal(GTK_WINDOW(dwindow->parent), TRUE);
+#else
+               gtk_window_set_modal(GTK_WINDOW(dwindow->window), TRUE);
+#endif
                gtk_window_set_destroy_with_parent(GTK_WINDOW(dwindow->window), TRUE);
                gtk_widget_show(dwindow->window);
 
@@ -228,7 +233,10 @@ static void description_window_destroy (GtkWidget *widget, gpointer data)
                dwindow->window = NULL;
        }
        
-       if(dwindow->parent)
+       if(dwindow->parent) {
+               if (GTK_IS_WINDOW(dwindow->parent))
+                       gtk_window_set_modal(GTK_WINDOW(dwindow->parent), dwindow->parent_modal);
                g_signal_handlers_disconnect_by_func(G_OBJECT(dwindow->parent), 
                                        description_window_destroy, dwindow->parent);
+       }
 }
index 064333437c1b3331d9494d847f0f5ec76099bb45..7d43080b4d1470c56b524fc739ea351e158bc0a6 100644 (file)
@@ -26,6 +26,7 @@ struct _DescriptionWindow
 {
        GtkWidget       * window;
        GtkWidget       * parent;
+       gboolean        parent_modal;
        /** Number of columns for each line of data **/
        int               columns;
        /** title of the window **/
index 09b6046ff305eb05a8c696155c7968f372730044..119718959f4cec4914dd1203882510d7f1da2552 100644 (file)
@@ -430,7 +430,7 @@ static gchar *input_dialog_open(const gchar *title, const gchar *message,
                gtk_button_set_label(GTK_BUTTON(remember_checkbtn), _("Remember this"));
 
        input_dialog_set(title, message, default_string);
-       gtk_widget_show(dialog);
+       gtk_window_present(GTK_WINDOW(dialog));
 
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(remember_checkbtn),
                                     default_checkbtn_state);
@@ -448,7 +448,6 @@ static gchar *input_dialog_open(const gchar *title, const gchar *message,
                gtk_main_iteration();
 
        manage_window_focus_out(dialog, NULL, NULL);
-       gtk_widget_hide(dialog);
 
        if (ack) {
                GtkEditable *editable;
@@ -471,6 +470,10 @@ static gchar *input_dialog_open(const gchar *title, const gchar *message,
        if (remember) {
                *remember = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(remember_checkbtn));
        }
+
+       gtk_widget_destroy(dialog);
+       dialog = NULL;
+
        if (is_pass)
                debug_print("return string = %s\n", str ? "********": ("none"));
        else
index 409a2ac8659e64d33e21910b224f1b1ea21f21a3..7a53f087244a9ebf46ebd0fbc9060a429de18de4 100644 (file)
 #include <gtk/gtk.h>
 
 #include "manage_window.h"
-/* #include "utils.h" */
+#include "utils.h"
 
 GtkWidget *focus_window;
 
 gint manage_window_focus_in(GtkWidget *widget, GdkEventFocus *event,
                            gpointer data)
 {
-       /* debug_print("Focus in event: window: %p\n", widget); */
+       const gchar *title = NULL;
+
+       if (!GTK_IS_WINDOW(widget))
+               return FALSE;
+       
+       title = gtk_window_get_title(GTK_WINDOW(widget));
+       debug_print("Focus in event: window: %p - %s\n", widget,
+                   title ? title : "no title");
 
        focus_window = widget;
 
@@ -38,8 +45,14 @@ gint manage_window_focus_in(GtkWidget *widget, GdkEventFocus *event,
 gint manage_window_focus_out(GtkWidget *widget, GdkEventFocus *event,
                             gpointer data)
 {
-       /* debug_print("Focused window: %p\n", focus_window); */
-       /* debug_print("Focus out event: window: %p\n", widget); */
+       const gchar *title = NULL;
+
+       if (!GTK_IS_WINDOW(widget))
+               return FALSE;
+
+       title = gtk_window_get_title(GTK_WINDOW(widget));
+       debug_print("Focus out event: window: %p - %s\n", widget,
+                   title ? title : "no title");
 
        if (focus_window == widget)
                focus_window = NULL;
@@ -49,7 +62,9 @@ gint manage_window_focus_out(GtkWidget *widget, GdkEventFocus *event,
 
 gint manage_window_unmap(GtkWidget *widget, GdkEventAny *event, gpointer data)
 {
-       /* debug_print("unmap event: %p\n", widget); */
+       const gchar *title = gtk_window_get_title(GTK_WINDOW(widget));
+       debug_print("Unmap event: window: %p - %s\n", widget,
+                   title ? title : "no title");
 
        if (focus_window == widget)
                focus_window = NULL;
@@ -59,7 +74,10 @@ gint manage_window_unmap(GtkWidget *widget, GdkEventAny *event, gpointer data)
 
 void manage_window_destroy(GtkWidget *widget, gpointer data)
 {
-       /* debug_print("destroy event: %p\n", widget); */
+       const gchar *title = gtk_window_get_title(GTK_WINDOW(widget));
+       debug_print("Destroy event: window: %p - %s\n", widget,
+                   title ? title : "no title");
+
 
        if (focus_window == widget)
                focus_window = NULL;
index e6bd7af5458ea2c2d22ac453d1db7e55502e382c..527ea53e2259bc3c506ae6af0819957f06f4cbca 100644 (file)
@@ -483,6 +483,7 @@ static gchar *search_descr_strings[] = {
 static DescriptionWindow search_descr = {
        NULL,
        NULL,
+       FALSE,
        2,
        N_("Extended Search"),
        N_("Extended Search allows the user to define criteria that messages must "
index fa9a65f939382c6e4c260290a8ab3cabfc83748b..f32cd4c11ccdd6bc54466f775cee74e02753b511 100644 (file)
@@ -995,6 +995,7 @@ static gchar *actions_desc_strings[] = {
 static DescriptionWindow actions_desc_win = { 
        NULL,
        NULL,
+       TRUE,
        2,
        N_("Actions"),
        N_("The Actions feature is a way for the user to launch "
index 597b9b94c2ccb887c681dae63691d081c158c047..86cc619df0a30c9660446f1002c28117505789ac 100644 (file)
@@ -1247,7 +1247,8 @@ static gchar *exec_desc_strings[] = {
 
 static DescriptionWindow exec_desc_win = { 
        NULL,
-        NULL, 
+        NULL,
+       TRUE,
         2,
         N_("Filtering Action: 'Execute'"),
        N_("'Execute' allows you to send a message or message element "
index 5de48d5f1080ee1b1e1ab62838c2acdbeb293205..0dbc25257711d4365e1092fc19c3dcb3163be596 100644 (file)
@@ -2131,6 +2131,7 @@ static gchar *test_desc_strings[] = {
 static DescriptionWindow test_desc_win = { 
        NULL,
         NULL, 
+       TRUE,
         2,
         N_("Match Type: 'Test'"),
        N_("'Test' allows you to test a message or message element "
index 2b20b2b715cbf208b9e948fe26e265046483115f..d8c9450ed545d5d9dd72707b6d7e45df544edb5c 100644 (file)
@@ -104,6 +104,7 @@ static gchar *quote_desc_strings[] = {
 static DescriptionWindow quote_desc_win = { 
         NULL,
        NULL,
+       TRUE,
         2,
         N_("Description of symbols"),
        N_("The following symbols and commands can be used:"),