aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-timezone-dialog/e-timezone-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-timezone-dialog/e-timezone-dialog.c')
-rw-r--r--widgets/e-timezone-dialog/e-timezone-dialog.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c
index f0879a41ae..80a4485739 100644
--- a/widgets/e-timezone-dialog/e-timezone-dialog.c
+++ b/widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -10,7 +10,7 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
*
*
* Authors:
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#include <time.h>
#include <string.h>
#include <glib/gi18n.h>
#include <glade/glade.h>
@@ -75,14 +76,6 @@ struct _ETimezoneDialogPrivate {
GtkWidget *preview_label;
};
-#ifndef G_OS_WIN32 /* Declared properly in time.h already */
-extern char *tzname[2];
-extern long timezone;
-extern int daylight;
-#endif
-
-static void e_timezone_dialog_class_init (ETimezoneDialogClass *class);
-static void e_timezone_dialog_init (ETimezoneDialog *etd);
static void e_timezone_dialog_dispose (GObject *object);
static void e_timezone_dialog_finalize (GObject *object);
@@ -108,9 +101,9 @@ static void set_map_timezone (ETimezoneDialog *etd,
static void on_combo_changed (GtkComboBox *combo,
ETimezoneDialog *etd);
-static void timezone_combo_get_active_text (GtkComboBox *combo,
+static void timezone_combo_get_active_text (GtkComboBox *combo,
const char **zone_name);
-static gboolean timezone_combo_set_active_text (GtkComboBox *combo,
+static gboolean timezone_combo_set_active_text (GtkComboBox *combo,
const char *zone_name);
static void map_destroy_cb (gpointer data,
@@ -406,7 +399,7 @@ static void
format_utc_offset (int utc_offset,
char *buffer)
{
- char *sign = "+";
+ const gchar *sign = "+";
int hours, minutes, seconds;
if (utc_offset < 0) {
@@ -800,7 +793,7 @@ on_combo_changed (GtkComboBox *combo_box, ETimezoneDialog *etd)
set_map_timezone (etd, map_zone);
}
-static void
+static void
timezone_combo_get_active_text (GtkComboBox *combo, const char **zone_name)
{
GtkTreeModel *list_store;
@@ -809,13 +802,13 @@ timezone_combo_get_active_text (GtkComboBox *combo, const char **zone_name)
list_store = gtk_combo_box_get_model (combo);
/* Get the active iter in the list */
- if (gtk_combo_box_get_active_iter (combo, &iter))
+ if (gtk_combo_box_get_active_iter (combo, &iter))
gtk_tree_model_get (list_store, &iter, 0, zone_name, -1);
- else
+ else
*zone_name = "";
}
-static gboolean
+static gboolean
timezone_combo_set_active_text (GtkComboBox *combo, const char *zone_name)
{
GtkTreeModel *list_store;
@@ -825,7 +818,7 @@ timezone_combo_set_active_text (GtkComboBox *combo, const char *zone_name)
list_store = gtk_combo_box_get_model (combo);
index = (GHashTable *) g_object_get_data (G_OBJECT (list_store), "index");
- if (zone_name && *zone_name)
+ if (zone_name && *zone_name)
id = g_hash_table_lookup (index, zone_name);
gtk_combo_box_set_active (combo, GPOINTER_TO_INT (id));