gnome-panel r11162 - trunk/applets/clock
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11162 - trunk/applets/clock
- Date: Mon, 30 Jun 2008 16:58:49 +0000 (UTC)
Author: vuntz
Date: Mon Jun 30 16:58:48 2008
New Revision: 11162
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11162&view=rev
Log:
2008-06-30 Vincent Untz <vuntz gnome org>
Fix compiler warnings. Patch by Kjartan Maraas <kmaraas gnome org>.
Part of bug #521409.
* calendar-client.c: (calendar_client_select_month), (filter_task),
(calendar_client_foreach_appointment_day):
* calendar-window.c: (set_renderer_pixbuf_pixmap_for_bday):
* clock-face.c:
* clock-map.c: (clock_map_update_time):
* clock.c: (applet_change_orient), (loc_to_string):
* gnome-clock-applet-mechanism-main.c: (get_system_bus), (main):
* gnome-clock-applet-mechanism.c:
(gnome_clock_applet_mechanism_constructor),
(_check_polkit_for_action):
* set-timezone.c: (can_do):
Modified:
trunk/applets/clock/ChangeLog
trunk/applets/clock/calendar-client.c
trunk/applets/clock/calendar-window.c
trunk/applets/clock/clock-face.c
trunk/applets/clock/clock-map.c
trunk/applets/clock/clock.c
trunk/applets/clock/gnome-clock-applet-mechanism-main.c
trunk/applets/clock/gnome-clock-applet-mechanism.c
trunk/applets/clock/set-timezone.c
Modified: trunk/applets/clock/calendar-client.c
==============================================================================
--- trunk/applets/clock/calendar-client.c (original)
+++ trunk/applets/clock/calendar-client.c Mon Jun 30 16:58:48 2008
@@ -1803,7 +1803,7 @@
guint year)
{
g_return_if_fail (CALENDAR_IS_CLIENT (client));
- g_return_if_fail (month >= 0 && month <= 11);
+ g_return_if_fail (month <= 11);
if (client->priv->year != year || client->priv->month != month)
{
@@ -1897,14 +1897,16 @@
CalendarEvent *event,
FilterData *filter_data)
{
+#ifdef FIX_BROKEN_TASKS_QUERY
CalendarTask *task;
+#endif
if (event->type != CALENDAR_EVENT_TASK)
return;
+#ifdef FIX_BROKEN_TASKS_QUERY
task = CALENDAR_TASK (event);
-#ifdef FIX_BROKEN_TASKS_QUERY
if (task->start_time && task->start_time > filter_data->start_time)
return;
@@ -2058,12 +2060,12 @@
/* mark the days for the appointment, no need to add an extra one when duration is a multiple of 86400 */
for (day_offset = 1; day_offset <= duration / 86400 && duration != day_offset * 86400; day_offset++)
{
- GTime day_time = appointment->start_time + day_offset * 86400;
+ GTime day_tm = appointment->start_time + day_offset * 86400;
- if (day_time > month_end)
+ if (day_tm > month_end)
break;
- if (day_time >= month_begin)
- marked_days [day_from_time_t (day_time)] = TRUE;
+ if (day_tm >= month_begin)
+ marked_days [day_from_time_t (day_tm)] = TRUE;
}
}
}
Modified: trunk/applets/clock/calendar-window.c
==============================================================================
--- trunk/applets/clock/calendar-window.c (original)
+++ trunk/applets/clock/calendar-window.c Mon Jun 30 16:58:48 2008
@@ -108,7 +108,7 @@
#endif /* HAVE_LIBECAL */
};
-G_DEFINE_TYPE (CalendarWindow, calendar_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE (CalendarWindow, calendar_window, GTK_TYPE_WINDOW)
enum {
PROP_0,
@@ -589,9 +589,9 @@
* pas-id-41112AF900000003-birthday
* ...
*/
- if (g_strrstr (type, "birthday") != 0)
+ if (g_strrstr (type, "birthday") != NULL)
path = CLOCK_EDS_ICONDIR G_DIR_SEPARATOR_S "category_birthday_16.png";
- else if (g_strrstr (type, "anniversary") != 0)
+ else if (g_strrstr (type, "anniversary") != NULL)
path = CLOCK_EDS_ICONDIR G_DIR_SEPARATOR_S "category_gifts_16.png";
else
path = CLOCK_EDS_ICONDIR G_DIR_SEPARATOR_S "category_miscellaneous_16.png";
Modified: trunk/applets/clock/clock-face.c
==============================================================================
--- trunk/applets/clock/clock-face.c (original)
+++ trunk/applets/clock/clock-face.c Mon Jun 30 16:58:48 2008
@@ -24,7 +24,7 @@
#define CLOCK_FACE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), INTL_TYPE_CLOCK_FACE, ClockFacePrivate))
-G_DEFINE_TYPE (ClockFace, clock_face, GTK_TYPE_WIDGET);
+G_DEFINE_TYPE (ClockFace, clock_face, GTK_TYPE_WIDGET)
static void clock_face_finalize (GObject *);
static gboolean clock_face_expose (GtkWidget *clock, GdkEventExpose *event);
Modified: trunk/applets/clock/clock-map.c
==============================================================================
--- trunk/applets/clock/clock-map.c (original)
+++ trunk/applets/clock/clock-map.c Mon Jun 30 16:58:48 2008
@@ -670,12 +670,9 @@
void
clock_map_update_time (ClockMap *this)
{
- ClockMapPrivate *priv;
g_return_if_fail (IS_CLOCK_MAP (this));
- priv = PRIVATE (this);
-
if (!clock_map_needs_refresh (this)) {
return;
}
Modified: trunk/applets/clock/clock.c
==============================================================================
--- trunk/applets/clock/clock.c (original)
+++ trunk/applets/clock/clock.c Mon Jun 30 16:58:48 2008
@@ -1080,15 +1080,6 @@
g_object_unref (loc);
}
-static void
-location_tile_weather_updated_cb (ClockLocationTile *tile, GdkPixbuf *weather_icon, const char *temperature, gpointer data)
-{
- ClockData *cd = data;
-
- gtk_image_set_from_pixbuf (GTK_IMAGE (cd->panel_weather_icon), weather_icon);
- gtk_label_set_text (GTK_LABEL (cd->panel_temperature_label), temperature);
-}
-
static ClockFormat
location_tile_need_clock_format_cb(ClockLocationTile *tile, gpointer data)
{
@@ -1450,7 +1441,6 @@
PanelAppletOrient orient,
ClockData *cd)
{
- GtkArrowType a;
GtkOrientation o;
if (orient == cd->orient)
@@ -1460,19 +1450,15 @@
switch (cd->orient) {
case PANEL_APPLET_ORIENT_RIGHT:
- a = GTK_ARROW_RIGHT;
o = GTK_ORIENTATION_VERTICAL;
break;
case PANEL_APPLET_ORIENT_LEFT:
- a = GTK_ARROW_LEFT;
o = GTK_ORIENTATION_VERTICAL;
break;
case PANEL_APPLET_ORIENT_DOWN:
- a = GTK_ARROW_DOWN;
o = GTK_ORIENTATION_HORIZONTAL;
break;
case PANEL_APPLET_ORIENT_UP:
- a = GTK_ARROW_UP;
o = GTK_ORIENTATION_HORIZONTAL;
break;
default:
@@ -1602,6 +1588,8 @@
g_free (utf8);
}
+/* FIXME old clock applet */
+#if 0
static void
on_config_tool_exited (GPid pid,
gint status,
@@ -1677,6 +1665,7 @@
return TRUE;
}
+#endif
static void
update_set_time_button (ClockData *cd)
@@ -2789,6 +2778,8 @@
return TRUE;
}
+/* FIXME old clock applet */
+#if 0
static void
setup_writability_sensitivity (ClockData *clock, GtkWidget *w, GtkWidget *label, const char *key)
{
@@ -2816,6 +2807,7 @@
g_object_unref (G_OBJECT (client));
}
+#endif
static void
update_properties_for_format (ClockData *cd,
@@ -2876,6 +2868,8 @@
}
}
+/* FIXME old clock applet */
+#if 0
static void
set_format_cb (GtkComboBox *combo,
ClockData *cd)
@@ -2897,6 +2891,7 @@
gconf_enum_to_string (format_type_enum_map, format),
NULL);
}
+#endif
static void
set_show_seconds_cb (GtkWidget *w,
@@ -2950,6 +2945,8 @@
}
#endif
+/* FIXME old clock applet */
+#if 0
static void
set_custom_format_cb (GtkEntry *entry,
ClockData *cd)
@@ -2961,6 +2958,7 @@
panel_applet_gconf_set_string (PANEL_APPLET (cd->applet),
KEY_CUSTOM_FORMAT, custom_format, NULL);
}
+#endif
static void
prefs_locations_changed (GtkTreeSelection *selection, ClockData *cd)
@@ -2976,12 +2974,11 @@
loc_to_string (ClockLocation *loc)
{
gfloat latitude, longitude;
- gchar *prev_locale;
gchar *ret;
clock_location_get_coords (loc, &latitude, &longitude);
- prev_locale = setlocale (LC_NUMERIC, "POSIX");
+ setlocale (LC_NUMERIC, "POSIX");
ret = g_markup_printf_escaped
("<location name=\"%s\" timezone=\"%s\" latitude=\"%f\" longitude=\"%f\" code=\"%s\" current=\"%s\"/>",
@@ -4454,12 +4451,12 @@
PANEL_TYPE_APPLET,
"ClockApplet",
clock_factory,
- NULL);
+ NULL)
#else
PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_ClockApplet_Factory",
PANEL_TYPE_APPLET,
"ClockApplet",
"0",
clock_factory,
- NULL);
+ NULL)
#endif
Modified: trunk/applets/clock/gnome-clock-applet-mechanism-main.c
==============================================================================
--- trunk/applets/clock/gnome-clock-applet-mechanism-main.c (original)
+++ trunk/applets/clock/gnome-clock-applet-mechanism-main.c Mon Jun 30 16:58:48 2008
@@ -109,18 +109,13 @@
{
GError *error;
DBusGConnection *bus;
- DBusConnection *connection;
error = NULL;
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (bus == NULL) {
g_warning ("Couldn't connect to system bus: %s", error->message);
g_error_free (error);
- goto out;
}
-
- connection = dbus_g_connection_get_connection (bus);
- out:
return bus;
}
@@ -129,7 +124,6 @@
{
GMainLoop *loop;
GnomeClockAppletMechanism *mechanism;
- GOptionContext *context;
DBusGProxy *bus_proxy;
DBusGConnection *connection;
int ret;
Modified: trunk/applets/clock/gnome-clock-applet-mechanism.c
==============================================================================
--- trunk/applets/clock/gnome-clock-applet-mechanism.c (original)
+++ trunk/applets/clock/gnome-clock-applet-mechanism.c Mon Jun 30 16:58:48 2008
@@ -122,9 +122,6 @@
GObjectConstructParam *construct_properties)
{
GnomeClockAppletMechanism *mechanism;
- GnomeClockAppletMechanismClass *klass;
-
- klass = GNOME_CLOCK_APPLET_MECHANISM_CLASS (g_type_class_peek (GNOME_CLOCK_APPLET_TYPE_MECHANISM));
mechanism = GNOME_CLOCK_APPLET_MECHANISM (G_OBJECT_CLASS (gnome_clock_applet_mechanism_parent_class)->constructor (
type,
@@ -296,7 +293,7 @@
pk_action = polkit_action_new ();
polkit_action_set_action_id (pk_action, action);
- pk_result = polkit_context_can_caller_do_action (mechanism->priv->pol_ctx, pk_action, pk_caller);
+ pk_result = polkit_context_is_caller_authorized (mechanism->priv->pol_ctx, pk_action, pk_caller, FALSE, NULL);
polkit_caller_unref (pk_caller);
polkit_action_unref (pk_action);
Modified: trunk/applets/clock/set-timezone.c
==============================================================================
--- trunk/applets/clock/set-timezone.c (original)
+++ trunk/applets/clock/set-timezone.c Mon Jun 30 16:58:48 2008
@@ -162,7 +162,7 @@
goto out;
}
- pk_result = polkit_context_can_caller_do_action (pk_context, pk_action, pk_caller);
+ pk_result = polkit_context_is_caller_authorized (pk_context, pk_action, pk_caller, FALSE, NULL);
switch (pk_result) {
case POLKIT_RESULT_UNKNOWN:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]