[Commits] description_window.c 1.5.2.36 1.5.2.37 description_window.h 1.1.4.10 1.1.4.11 inputdialog.c 1.2.2.49 1.2.2.50 manage_window.c 1.1.4.11 1.1.4.12 quicksearch.c 1.1.2.120 1.1.2.121

colin at claws-mail.org colin at claws-mail.org
Fri Nov 16 17:10:11 CET 2012


Update of /home/claws-mail/claws/src/gtk
In directory srv:/tmp/cvs-serv1507/src/gtk

Modified Files:
      Tag: gtk2
	description_window.c description_window.h inputdialog.c 
	manage_window.c quicksearch.c 
Log Message:
2012-11-16 [colin]	3.9.0cvs10

	* 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
		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.
		

Index: inputdialog.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/inputdialog.c,v
retrieving revision 1.2.2.49
retrieving revision 1.2.2.50
diff -u -d -r1.2.2.49 -r1.2.2.50
--- inputdialog.c	15 Nov 2012 13:41:06 -0000	1.2.2.49
+++ inputdialog.c	16 Nov 2012 16:10:09 -0000	1.2.2.50
@@ -434,7 +434,7 @@
 		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);
@@ -452,7 +452,6 @@
 		gtk_main_iteration();
 
 	manage_window_focus_out(dialog, NULL, NULL);
-	gtk_widget_hide(dialog);
 
 	if (ack) {
 		GtkEditable *editable;
@@ -475,6 +474,10 @@
 	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: manage_window.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/manage_window.c,v
retrieving revision 1.1.4.11
retrieving revision 1.1.4.12
diff -u -d -r1.1.4.11 -r1.1.4.12
--- manage_window.c	27 May 2012 17:31:06 -0000	1.1.4.11
+++ manage_window.c	16 Nov 2012 16:10:09 -0000	1.1.4.12
@@ -21,14 +21,21 @@
 #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_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_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 @@
 
 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: description_window.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/description_window.c,v
retrieving revision 1.5.2.36
retrieving revision 1.5.2.37
diff -u -d -r1.5.2.36 -r1.5.2.37
--- description_window.c	8 Sep 2012 20:23:12 -0000	1.5.2.36
+++ description_window.c	16 Nov 2012 16:10:09 -0000	1.5.2.37
@@ -52,7 +52,12 @@
 		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 @@
 		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: quicksearch.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/quicksearch.c,v
retrieving revision 1.1.2.120
retrieving revision 1.1.2.121
diff -u -d -r1.1.2.120 -r1.1.2.121
--- quicksearch.c	15 Nov 2012 13:41:06 -0000	1.1.2.120
+++ quicksearch.c	16 Nov 2012 16:10:09 -0000	1.1.2.121
@@ -483,6 +483,7 @@
 static DescriptionWindow search_descr = {
 	NULL,
 	NULL,
+	FALSE,
 	2,
 	N_("Extended Search"),
 	N_("Extended Search allows the user to define criteria that messages must "

Index: description_window.h
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/description_window.h,v
retrieving revision 1.1.4.10
retrieving revision 1.1.4.11
diff -u -d -r1.1.4.10 -r1.1.4.11
--- description_window.h	27 May 2012 17:31:06 -0000	1.1.4.10
+++ description_window.h	16 Nov 2012 16:10:09 -0000	1.1.4.11
@@ -26,6 +26,7 @@
 {
 	GtkWidget 	* window;
 	GtkWidget	* parent;
+	gboolean	parent_modal;
 	/** Number of columns for each line of data **/
 	int		  columns;
 	/** title of the window **/



More information about the Commits mailing list