aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-datetime.c
diff options
context:
space:
mode:
authorMichael Terry <mike@mterry.name>2011-02-17 14:30:43 -0500
committerMichael Terry <mike@mterry.name>2011-02-17 14:30:43 -0500
commita10f207618976b59a0cc43c01befbf67128c92a5 (patch)
treede34a6202fd5bb2a42e7871c4c026ec583b6ae98 /src/indicator-datetime.c
parent37fc0a3158e5ff5f8cf9096de49451379c2d11f1 (diff)
downloadayatana-indicator-datetime-a10f207618976b59a0cc43c01befbf67128c92a5.tar.gz
ayatana-indicator-datetime-a10f207618976b59a0cc43c01befbf67128c92a5.tar.bz2
ayatana-indicator-datetime-a10f207618976b59a0cc43c01befbf67128c92a5.zip
first pass at preferences dialog
Diffstat (limited to 'src/indicator-datetime.c')
-rw-r--r--src/indicator-datetime.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 0f60428..e27158c 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -23,10 +23,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config.h"
#endif
-#include <locale.h>
-#include <langinfo.h>
-#include <string.h>
-
/* GStuff */
#include <glib.h>
#include <glib-object.h>
@@ -43,7 +39,9 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
#include <libido/idocalendarmenuitem.h>
#include <libdbusmenu-gtk/menuitem.h>
+#include "utils.h"
#include "dbus-shared.h"
+#include "settings-shared.h"
#define INDICATOR_DATETIME_TYPE (indicator_datetime_get_type ())
@@ -117,13 +115,6 @@ struct _indicator_item_t {
#define PROP_SHOW_DATE_S "show-date"
#define PROP_CUSTOM_TIME_FORMAT_S "custom-time-format"
-#define SETTINGS_INTERFACE "com.canonical.indicator.datetime"
-#define SETTINGS_TIME_FORMAT_S "time-format"
-#define SETTINGS_SHOW_SECONDS_S "show-seconds"
-#define SETTINGS_SHOW_DAY_S "show-day"
-#define SETTINGS_SHOW_DATE_S "show-date"
-#define SETTINGS_CUSTOM_TIME_FORMAT_S "custom-time-format"
-
enum {
SETTINGS_TIME_LOCALE = 0,
SETTINGS_TIME_12_HOUR = 1,
@@ -964,24 +955,6 @@ T_(const char *msg)
return rv;
}
-/* Check the system locale setting to see if the format is 24-hour
- time or 12-hour time */
-static gboolean
-is_locale_12h()
-{
- static const char *formats_24h[] = {"%H", "%R", "%T", "%OH", "%k", NULL};
- const char *t_fmt = nl_langinfo(T_FMT);
- int i;
-
- for (i = 0; formats_24h[i]; ++i) {
- if (strstr(t_fmt, formats_24h[i])) {
- return FALSE;
- }
- }
-
- return TRUE;
-}
-
/* Respond to changes in the screen to update the text gravity */
static void
update_text_gravity (GtkWidget *widget, GdkScreen *previous_screen, gpointer data)