[gnome-calendar] date-selector: completely drop the format_24h flag
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] date-selector: completely drop the format_24h flag
- Date: Tue, 23 Dec 2014 17:07:13 +0000 (UTC)
commit 5cec73ab436f8b18ce377504bce068ddd5b5931e
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Dec 22 13:15:49 2014 -0200
date-selector: completely drop the format_24h flag
Dates do not depend on the time format, so it shouldn't be cached here.
src/gcal-date-selector.c | 27 ---------------------------
src/gcal-date-selector.h | 3 ---
2 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/src/gcal-date-selector.c b/src/gcal-date-selector.c
index 581460e..6d340b5 100644
--- a/src/gcal-date-selector.c
+++ b/src/gcal-date-selector.c
@@ -51,8 +51,6 @@ struct _GcalDateSelectorPrivate
guint month_pos;
guint year_pos;
gboolean have_long_year;
-
- gboolean format_24h;
};
enum
@@ -340,8 +338,6 @@ gcal_date_selector_constructed (GObject *object)
GtkWidget *label;
GtkBuilder *builder;
- GSettings *settings;
- gchar *clock_format;
gchar *entry_name;
priv = gcal_date_selector_get_instance_private (GCAL_DATE_SELECTOR (object));
@@ -349,14 +345,6 @@ gcal_date_selector_constructed (GObject *object)
/* chaining up */
G_OBJECT_CLASS (gcal_date_selector_parent_class)->constructed (object);
- /* 24h setting */
- settings = g_settings_new ("org.gnome.desktop.interface");
- clock_format = g_settings_get_string (settings, "clock-format");
- priv->format_24h = (g_strcmp0 (clock_format, "24h") == 0);
-
- g_free (clock_format);
- g_object_unref (settings);
-
/* date label */
priv->date_label = gtk_label_new (NULL);
gtk_widget_show (priv->date_label);
@@ -447,21 +435,6 @@ gcal_date_selector_new (void)
}
void
-gcal_date_selector_use_24h_format (GcalDateSelector *selector,
- gboolean use_24h_format)
-{
- GcalDateSelectorPrivate *priv;
-
- g_return_if_fail (GCAL_IS_DATE_SELECTOR (selector));
- priv = gcal_date_selector_get_instance_private (selector);
-
- priv->format_24h = use_24h_format;
-
- /* update values */
- gcal_date_selector_set_date (selector, priv->day, priv->month, priv->year);
-}
-
-void
gcal_date_selector_set_date (GcalDateSelector *selector,
gint day,
gint month,
diff --git a/src/gcal-date-selector.h b/src/gcal-date-selector.h
index a335215..99762cd 100644
--- a/src/gcal-date-selector.h
+++ b/src/gcal-date-selector.h
@@ -54,9 +54,6 @@ GType gcal_date_selector_get_type (void);
GtkWidget* gcal_date_selector_new (void);
-void gcal_date_selector_use_24h_format (GcalDateSelector *selector,
- gboolean use_24h_format);
-
void gcal_date_selector_set_date (GcalDateSelector *selector,
gint day,
gint month,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]