network-manager-applet r1066 - in branches/NETWORKMANAGER_APPLET_0_7: . src



Author: dcbw
Date: Tue Dec  9 16:58:27 2008
New Revision: 1066
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=1066&view=rev

Log:
2008-12-09  Dan Williams  <dcbw redhat com>

	* src/applet-device-wifi.c
		- (other_wireless_activate_cb, new_network_activate_cb,
		   wireless_get_more_info, wireless_get_secrets): really fix focus
			stealing prevention; the window needs to be visible before trying
			to present it with an updated time, otherwise GTK just calls
			gtk_window_show() instead of setting the timestamp



Modified:
   branches/NETWORKMANAGER_APPLET_0_7/ChangeLog
   branches/NETWORKMANAGER_APPLET_0_7/src/applet-device-wifi.c

Modified: branches/NETWORKMANAGER_APPLET_0_7/src/applet-device-wifi.c
==============================================================================
--- branches/NETWORKMANAGER_APPLET_0_7/src/applet-device-wifi.c	(original)
+++ branches/NETWORKMANAGER_APPLET_0_7/src/applet-device-wifi.c	Tue Dec  9 16:58:27 2008
@@ -60,6 +60,14 @@
 static NMAccessPoint *update_active_ap (NMDevice *device, NMDeviceState state, NMApplet *applet);
 
 static void
+show_ignore_focus_stealing_prevention (GtkWidget *widget)
+{
+	gtk_widget_realize (widget);
+	gtk_widget_show (widget);
+	gtk_window_present_with_time (GTK_WINDOW (widget), gdk_x11_get_server_time (widget->window));
+}
+
+static void
 other_wireless_activate_cb (GtkWidget *menu_item,
                             NMApplet *applet)
 {
@@ -73,8 +81,7 @@
 	                  G_CALLBACK (wireless_dialog_response_cb),
 	                  applet);
 
-	gtk_widget_realize (dialog);
-	gtk_window_present_with_time (GTK_WINDOW (dialog), gdk_x11_get_server_time (dialog->window));
+	show_ignore_focus_stealing_prevention (dialog);
 }
 
 void
@@ -105,8 +112,7 @@
 	                  G_CALLBACK (wireless_dialog_response_cb),
 	                  applet);
 
-	gtk_widget_realize (dialog);
-	gtk_window_present_with_time (GTK_WINDOW (dialog), gdk_x11_get_server_time (dialog->window));
+	show_ignore_focus_stealing_prevention (dialog);
 }
 
 void
@@ -1444,8 +1450,7 @@
 	                  G_CALLBACK (wireless_dialog_response_cb),
 	                  applet);
 
-	gtk_widget_realize (dialog);
-	gtk_window_present_with_time (GTK_WINDOW (dialog), gdk_x11_get_server_time (dialog->window));
+	show_ignore_focus_stealing_prevention (dialog);
 }
 
 static gboolean
@@ -1687,10 +1692,7 @@
 	 */
 	g_object_weak_ref (G_OBJECT (active_connection), destroy_wifi_dialog, info);
 
-	gtk_widget_realize (info->dialog);
-	gtk_window_present_with_time (GTK_WINDOW (info->dialog),
-	                              gdk_x11_get_server_time (info->dialog->window));
-
+	show_ignore_focus_stealing_prevention (info->dialog);
 	return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]