gnome-panel r11090 - trunk/applets/clock
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11090 - trunk/applets/clock
- Date: Thu, 8 May 2008 23:56:00 +0100 (BST)
Author: federico
Date: Thu May 8 22:56:00 2008
New Revision: 11090
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11090&view=rev
Log:
Pass an XID for the transient parent to PolicyKit's ShowDialog method
2008-05-08 Federico Mena Quintero <federico novell com>
When calling the (obsolete) org.gnome.PolicyKit.Manager.ShowDialog
method through PolicyKit, pass an XID for the transient parent
window of what will be the auth dialog. This prevents the window
manager from thinking that the auth dialog is a rogue dialog with
no parent.
* set-timezone.c (SetTimeCallbackData): Add a transient_parent_xid
field.
(do_auth_async): Pass the transient_parent_xid to the ShowDialog
method, instead of 0.
(set_system_time_async): g_new() for safety. Take in a transient_parent_xid argument.
(set_system_timezone_async): Likewise.
* clock.c (set_time): For now, pass 0 for the transient_parent_xid.
* clock-location.c (clock_location_make_current): Likewise.
Signed-off-by: Federico Mena Quintero <federico gnu org>
Modified:
trunk/applets/clock/ChangeLog
trunk/applets/clock/clock-location.c
trunk/applets/clock/clock.c
trunk/applets/clock/set-timezone.c
trunk/applets/clock/set-timezone.h
Modified: trunk/applets/clock/clock-location.c
==============================================================================
--- trunk/applets/clock/clock-location.c (original)
+++ trunk/applets/clock/clock-location.c Thu May 8 22:56:00 2008
@@ -525,7 +525,8 @@
mcdata->destroy = destroy;
filename = g_build_filename (SYSTEM_ZONEINFODIR, priv->timezone, NULL);
- set_system_timezone_async (filename,
+ set_system_timezone_async (filename,
+ 0,
(GFunc)make_current_cb,
mcdata,
free_make_current_data);
Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c (original)
+++ trunk/applets/clock/clock.c Thu May 8 22:56:00 2008
@@ -1743,7 +1743,7 @@
tim = mktime (&t);
- set_system_time_async (tim, (GFunc)set_time_callback, cd, NULL);
+ set_system_time_async (tim, 0, (GFunc)set_time_callback, cd, NULL);
}
static void
Modified: trunk/applets/clock/set-timezone.c
==============================================================================
--- trunk/applets/clock/set-timezone.c (original)
+++ trunk/applets/clock/set-timezone.c Thu May 8 22:56:00 2008
@@ -226,6 +226,7 @@
gchar *call;
gint64 time;
gchar *filename;
+ guint transient_parent_xid;
GFunc callback;
gpointer data;
GDestroyNotify notify;
@@ -296,7 +297,7 @@
data, free_data,
INT_MAX,
G_TYPE_STRING, action,
- G_TYPE_UINT, 0,
+ G_TYPE_UINT, data->transient_parent_xid,
G_TYPE_INVALID);
}
@@ -384,7 +385,8 @@
}
void
-set_system_time_async (gint64 time,
+set_system_time_async (gint64 time,
+ guint transient_parent_xid,
GFunc callback,
gpointer d,
GDestroyNotify notify)
@@ -394,11 +396,12 @@
if (time == -1)
return;
- data = g_new (SetTimeCallbackData, 1);
+ data = g_new0 (SetTimeCallbackData, 1);
data->ref_count = 1;
data->call = "SetTime";
data->time = time;
data->filename = NULL;
+ data->transient_parent_xid = transient_parent_xid;
data->callback = callback;
data->data = d;
data->notify = notify;
@@ -409,6 +412,7 @@
void
set_system_timezone_async (const gchar *filename,
+ guint transient_parent_xid,
GFunc callback,
gpointer d,
GDestroyNotify notify)
@@ -418,11 +422,12 @@
if (filename == NULL)
return;
- data = g_new (SetTimeCallbackData, 1);
+ data = g_new0 (SetTimeCallbackData, 1);
data->ref_count = 1;
data->call = "SetTimezone";
data->time = -1;
data->filename = g_strdup (filename);
+ data->transient_parent_xid = transient_parent_xid;
data->callback = callback;
data->data = d;
data->notify = notify;
Modified: trunk/applets/clock/set-timezone.h
==============================================================================
--- trunk/applets/clock/set-timezone.h (original)
+++ trunk/applets/clock/set-timezone.h Thu May 8 22:56:00 2008
@@ -28,11 +28,13 @@
gint can_set_system_time (void);
void set_system_time_async (gint64 time,
+ guint transient_parent_xid,
GFunc callback,
gpointer data,
GDestroyNotify notify);
void set_system_timezone_async (const gchar *filename,
+ guint transient_parent_xid,
GFunc callback,
gpointer data,
GDestroyNotify notify);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]