[Xfce4-commits] <xfce4-panel:devel> Drop support for the hour interval, minutes are idle enough.
Nick Schermer
noreply at xfce.org
Mon Sep 28 15:28:05 CEST 2009
Updating branch refs/heads/devel
to ed0b56f8e7b8c1e8a2e2901beecced29f74e92c6 (commit)
from db04e849bbcbc730562250a3df29d6704a251180 (commit)
commit ed0b56f8e7b8c1e8a2e2901beecced29f74e92c6
Author: Nick Schermer <nick at xfce.org>
Date: Mon Sep 28 13:11:42 2009 +0200
Drop support for the hour interval, minutes are idle enough.
plugins/clock/clock.c | 15 ++++-----------
plugins/clock/clock.h | 1 -
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
index 74df604..8ba980f 100644
--- a/plugins/clock/clock.c
+++ b/plugins/clock/clock.c
@@ -638,6 +638,7 @@ clock_plugin_timeout_sync (gpointer user_data)
}
+
ClockPluginTimeout *
clock_plugin_timeout_new (guint interval,
GSourceFunc function,
@@ -687,9 +688,7 @@ clock_plugin_timeout_set_interval (ClockPluginTimeout *timeout,
/* get the seconds to the next internal (+ 1 second)*/
g_get_current_time (&timeval);
- if (interval == CLOCK_INTERVAL_HOUR)
- next_interval = 3600 - timeval.tv_sec % 3600;
- else if (interval == CLOCK_INTERVAL_MINUTE)
+ if (interval == CLOCK_INTERVAL_MINUTE)
next_interval = 60 - timeval.tv_sec % 60;
else
next_interval = 0;
@@ -778,10 +777,9 @@ guint
clock_plugin_interval_from_format (const gchar *format)
{
const gchar *p;
- guint interval = CLOCK_INTERVAL_HOUR;
if (G_UNLIKELY (!IS_STRING (format)))
- return 0;
+ return CLOCK_INTERVAL_MINUTE;
for (p = format; *p != '\0'; ++p)
{
@@ -797,14 +795,9 @@ clock_plugin_interval_from_format (const gchar *format)
case 'T':
case 'X':
return CLOCK_INTERVAL_SECOND;
-
- case 'M':
- case 'R':
- interval = CLOCK_INTERVAL_MINUTE;
- break;
}
}
}
- return interval;
+ return CLOCK_INTERVAL_MINUTE;
}
diff --git a/plugins/clock/clock.h b/plugins/clock/clock.h
index 077fccf..cb2c3d0 100644
--- a/plugins/clock/clock.h
+++ b/plugins/clock/clock.h
@@ -28,7 +28,6 @@ G_BEGIN_DECLS
#define CLOCK_INTERVAL_SECOND (1)
#define CLOCK_INTERVAL_MINUTE (60)
-#define CLOCK_INTERVAL_HOUR (3600)
typedef struct _ClockPlugin ClockPlugin;
typedef struct _ClockPluginClass ClockPluginClass;
More information about the Xfce4-commits
mailing list