rpms/gnome-panel/devel intlclock-changes-20071014.patch, NONE, 1.1 gnome-panel.spec, 1.230, 1.231 intlclock-changes-20071005.patch, 1.1, NONE intlclock-changes-20071009.patch, 1.1, NONE intlclock-changes-20071013.patch, 1.1, NONE

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Sun Oct 14 06:16:30 UTC 2007


Author: mclasen

Update of /cvs/extras/rpms/gnome-panel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20298

Modified Files:
	gnome-panel.spec 
Added Files:
	intlclock-changes-20071014.patch 
Removed Files:
	intlclock-changes-20071005.patch 
	intlclock-changes-20071009.patch 
	intlclock-changes-20071013.patch 
Log Message:
Add network monitoring to intlclock


intlclock-changes-20071014.patch:

--- NEW FILE intlclock-changes-20071014.patch ---
diff --git a/configure.in b/configure.in
index 4e818da..6c75db1 100644
--- a/configure.in
+++ b/configure.in
@@ -59,7 +59,7 @@ if test -n "$LIBECAL_REQUIREMENT"; then
 fi
 AM_CONDITIONAL(HAVE_LIBECAL, test -n "$LIBECAL_REQUIREMENT")
 
-PKG_CHECK_MODULES(INTLCLOCK, [ glib-2.0 gobject-2.0 gtk+-2.0 gdk-2.0 librsvg-2.0 libpanelapplet-2.0 libgnome-2.0 gconf-2.0 $LIBECAL_REQUIREMENT ])
+PKG_CHECK_MODULES(INTLCLOCK, [ glib-2.0 gobject-2.0 gtk+-2.0 gdk-2.0 librsvg-2.0 libpanelapplet-2.0 libgnome-2.0 gconf-2.0 $LIBECAL_REQUIREMENT dbus-glib-1 gweather libxml-2.0 polkit polkit-dbus ])
 
 AC_SUBST(INTLCLOCK_CFLAGS)
 AC_SUBST(INTLCLOCK_LIBS)
diff --git a/data/GNOME_IntlClockApplet.xml b/data/GNOME_IntlClockApplet.xml
index dd2e8b8..a88dc3d 100644
--- a/data/GNOME_IntlClockApplet.xml
+++ b/data/GNOME_IntlClockApplet.xml
@@ -1,9 +1,14 @@
 <Root>
   <popups>
     <popup name="button3">
+     <menuitem name="Clock Copy Time Item" verb="ClockCopyTime" _label="Copy _Time"
+                    pixtype="stock" pixname="gtk-copy"/>
+      <menuitem name="Clock Copy Date Item" verb="ClockCopyDate" _label="Copy _Date"
+                    pixtype="stock" pixname="gtk-copy"/>
+      <separator/>
       <menuitem name="Clock Configure Item" verb="IntlClockConfig"
-                _label="Cha_nge Date or Time"
-		pixtype="stock" pixname="gtk-preferences"/>
+                _label="Ad_just Date & Time"
+                pixtype="stock" pixname="gtk-preferences"/>
       <menuitem name="Clock Preferences Item" verb="IntlClockPreferences" _label="_Preferences"
     		    pixtype="stock" pixname="gtk-properties"/>
     </popup>
diff --git a/data/GNOME_IntlClockApplet_Factory.server.in.in b/data/GNOME_IntlClockApplet_Factory.server.in.in
index 1446822..705fb76 100644
--- a/data/GNOME_IntlClockApplet_Factory.server.in.in
+++ b/data/GNOME_IntlClockApplet_Factory.server.in.in
@@ -20,7 +20,7 @@
         </oaf_attribute>
         <oaf_attribute name="name" type="string" value="International Clock"/>
         <oaf_attribute name="description" type="string" value="International Clock applet for the GNOME panel"/>
-        <oaf_attribute name="panel:icon" type="string" value="clock.png"/>
+        <oaf_attribute name="panel:icon" type="string" value="gnome-panel-clock"/>
 </oaf_server>
 
 <oaf_server iid="OAFIID:GNOME_ClockApplet"
diff --git a/data/intlclock.glade b/data/intlclock.glade
index e7b8c01..626d835 100644
--- a/data/intlclock.glade
+++ b/data/intlclock.glade
@@ -21,12 +21,13 @@
 
   <child>
     <widget class="GtkVBox" id="vbox1">
+      <property name="border_width">6</property>
       <property name="visible">True</property>
       <property name="homogeneous">False</property>
       <property name="spacing">0</property>
 
       <child>
-	<widget class="GtkNotebook" id="notebook1">
+	<widget class="GtkNotebook" id="notebook">
 	  <property name="border_width">6</property>
 	  <property name="visible">True</property>
 	  <property name="can_focus">True</property>
@@ -37,194 +38,35 @@
 	  <property name="enable_popup">False</property>
 
 	  <child>
-	    <widget class="GtkTable" id="table1">
-	      <property name="border_width">6</property>
+	    <widget class="GtkVBox" id="vbox17">
+	      <property name="border_width">12</property>
 	      <property name="visible">True</property>
-	      <property name="n_rows">4</property>
-	      <property name="n_columns">3</property>
 	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">6</property>
-	      <property name="column_spacing">6</property>
+	      <property name="spacing">18</property>
 
 	      <child>
-		<widget class="GtkLabel" id="label11">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Clock options:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label12">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"></property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label13">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"></property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label14">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"></property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-		  <property name="width_chars">-1</property>
-		  <property name="single_line_mode">False</property>
-		  <property name="angle">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label15">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes"></property>
-		  <property name="use_underline">False</property>
[...11909 lines suppressed...]
+	gint ref_count;
+	gint64 time;
+	GFunc callback;
+	gpointer data;
+	GDestroyNotify notify;
+} SetTimeCallbackData;
+
+static void
+free_data (gpointer d)
+{
+	SetTimeCallbackData *data = d;
+
+	data->ref_count--;
+	if (data->ref_count == 0) {
+		if (data->notify)
+			data->notify (data->data);
+		g_free (data);
+	}
+}
+
+static void set_time_async (SetTimeCallbackData *data);
+
+static void 
+auth_notify (DBusGProxy     *proxy,
+             DBusGProxyCall *call,
+             void           *user_data)
+{
+	SetTimeCallbackData *data = user_data;
+	GError *error = NULL;
+	gboolean gained_privilege;
+
+	if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_BOOLEAN, &gained_privilege, G_TYPE_INVALID)) {
+		if (gained_privilege)
+			set_time_async (data);
+	}
+	else {
+		if (data->callback) 
+			data->callback (data->data, error);
+		else
+			g_error_free (error);
+	}
+}
+
+static void
+do_auth_async (const gchar         *action, 
+               const gchar         *result, 
+               SetTimeCallbackData *data)
+{
+        DBusGConnection *bus;
+	DBusGProxy *proxy;
+
+	g_debug ("helper refused; returned polkit_result='%s' and polkit_action='%s'",
+		 result, action);
+
+	/* Now ask the user for auth... */
+        bus = get_session_bus ();
+	if (bus == NULL)
+		return;
+
+	proxy = dbus_g_proxy_new_for_name (bus,
+					"org.gnome.PolicyKit",
+					"/org/gnome/PolicyKit/Manager",
+					"org.gnome.PolicyKit.Manager");
+	
+	data->ref_count++;
+	dbus_g_proxy_begin_call_with_timeout (proxy,
+					      "ShowDialog",
+					      auth_notify,
+					      data, free_data,
+					      INT_MAX,
+					      G_TYPE_STRING, action,
+					      G_TYPE_UINT, 0,
+					      G_TYPE_INVALID);
+}
+
+static void
+set_time_notify (DBusGProxy     *proxy,
+		 DBusGProxyCall *call,
+		 void           *user_data)
+{
+	SetTimeCallbackData *data = user_data;
+	GError *error = NULL;
+
+	if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID)) {
+		if (data->callback) 
+			data->callback (data->data, NULL);
+	}
+	else {
+		if (dbus_g_error_has_name (error, "org.gnome.ClockApplet.Mechanism.NotPrivileged")) {
+			gchar **tokens;
+
+			tokens = g_strsplit (error->message, " ", 2);
+			g_error_free (error);                            
+			if (g_strv_length (tokens) == 2) 
+				do_auth_async (tokens[0], tokens[1], data);
+			else
+				g_warning ("helper return string malformed");
+			g_strfreev (tokens);
+		}
+		else {
+			if (data->callback)
+				data->callback (data->data, error);
+			else
+				g_error_free (error);
+		}		
+	}
+}
+
+static void
+set_time_async (SetTimeCallbackData *data)
+{
+        DBusGConnection *bus;
+        DBusGProxy      *proxy;
+	DBusGProxyCall  *call;
+
+        bus = get_system_bus ();
+        if (bus == NULL)
+                return;
+
+	proxy = dbus_g_proxy_new_for_name (bus,
+					   "org.gnome.ClockApplet.Mechanism",
+					   "/",
+					   "org.gnome.ClockApplet.Mechanism");
+
+	data->ref_count++;
+	dbus_g_proxy_begin_call_with_timeout (proxy, 
+					      "SetTime",
+					      set_time_notify,
+					      data, free_data,
+					      INT_MAX,
+					      /* parameters: */
+					      G_TYPE_INT64, data->time,
+					      G_TYPE_INVALID,
+					      /* return values: */
+					      G_TYPE_INVALID);
+}
+
+void
+set_system_time_async (gint64         time, 
+		       GFunc          callback, 
+		       gpointer       d, 
+		       GDestroyNotify notify)
+{
+	SetTimeCallbackData *data;
+
+	if (time == -1)
+		return;
+
+	data = g_new (SetTimeCallbackData, 1);
+	data->ref_count = 1;
+	data->time = time;
+	data->callback = callback;
+	data->data = d;
+	data->notify = notify;
+
+	set_time_async (data);
+	free_data (data);
+}
diff --git a/src/set-timezone.h b/src/set-timezone.h
new file mode 100644
index 0000000..c71622c
--- /dev/null
+++ b/src/set-timezone.h
@@ -0,0 +1,36 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2007 David Zeuthen <david at fubar.dk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef __SET_SYSTEM_TIMEZONE_H__
+
+#include <time.h>
+
+gboolean set_system_timezone     (const char  *filename, 
+                                  GError     **err);
+gint     can_set_system_timezone (void);
+
+gint     can_set_system_time     (void);
+
+void     set_system_time_async   (gint64         time,
+                                  GFunc          callback,
+                                  gpointer       data,
+                                  GDestroyNotify notify);
+
+#endif


Index: gnome-panel.spec
===================================================================
RCS file: /cvs/extras/rpms/gnome-panel/devel/gnome-panel.spec,v
retrieving revision 1.230
retrieving revision 1.231
diff -u -r1.230 -r1.231
--- gnome-panel.spec	14 Oct 2007 03:08:46 -0000	1.230
+++ gnome-panel.spec	14 Oct 2007 06:15:56 -0000	1.231
@@ -22,7 +22,7 @@
 Summary: GNOME panel
 Name: gnome-panel
 Version: 2.20.0.1
-Release: 7%{?dist} 
+Release: 8%{?dist} 
 URL: http://www.gnome.org
 Source0: http://download.gnome.org/sources/gnome-panel/2.20/%{name}-%{version}.tar.bz2
 # we are upstream for this
@@ -30,7 +30,7 @@
 # Novell intlclock, I don't think this has a canonical upstream location
 Source2: intlclock-1.0.tar.gz
 Patch98: timezone-changes.patch
-Patch99: intlclock-changes-20071009.patch
+Patch99: intlclock-changes-20071014.patch
 Patch100: dont-build-clock.patch
 Patch101: intlclock-build-fixes.patch
 
@@ -94,6 +94,7 @@
 BuildRequires: PolicyKit-devel
 BuildRequires: gnome-applets-devel 
 BuildRequires: librsvg2-devel
+BuildRequires: NetworkManager-devel
 
 Patch0: gnome-panel-2.19.5-vendor.patch
 Patch1: gnome-panel-2.10.1-speak-to-us-ye-old-wise-fish.patch
@@ -380,6 +381,9 @@
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Sun Oct 14 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.0.1-8
+- Add network monitoring to the intlclock
+
 * Sat Oct 13 2007 Matthias Clasen <mclasen at redhat.com> - 2.20.0.1-7
 - Another round of intlclock updates
   * show offsets in popup


--- intlclock-changes-20071005.patch DELETED ---


--- intlclock-changes-20071009.patch DELETED ---


--- intlclock-changes-20071013.patch DELETED ---




More information about the fedora-extras-commits mailing list