diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c index e07c17b..b5cbb32 100644 --- a/plugins/clock/clock.c +++ b/plugins/clock/clock.c @@ -167,21 +167,22 @@ typedef struct } ClockPluginDialog; -static const gchar *tooltip_formats[] = +static const gchar *tooltip_formats[4][2] = { - DEFAULT_TOOLTIP_FORMAT, - "%x", - N_("Week %V"), - NULL + { DEFAULT_TOOLTIP_FORMAT, DEFAULT_TOOLTIP_FORMAT }, + { "%x", "%x" }, + { N_("Week %V"), N_("Week %V") }, + { NULL, NULL} }; -static const gchar *digital_formats[] = +static const gchar *digital_formats[6][2] = { - DEFAULT_DIGITAL_FORMAT, - "%T", - "%r", - "%I:%M %p", - NULL + { DEFAULT_DIGITAL_FORMAT, DEFAULT_DIGITAL_FORMAT }, + { "%T", "%T" }, + { "%r", "%r" }, + { "%I:%M %p", "%I:%M %p" }, + { "%R", "Large red clock" }, + { NULL, NULL } }; enum @@ -761,7 +762,7 @@ static void clock_plugin_configure_plugin_chooser_fill (ClockPlugin *plugin, GtkComboBox *combo, GtkEntry *entry, - const gchar *formats[]) + const gchar *formats[][2]) { guint i; GtkListStore *store; @@ -782,17 +783,17 @@ clock_plugin_configure_plugin_chooser_fill (ClockPlugin *plugin, active_format = gtk_entry_get_text (entry); - for (i = 0; formats[i] != NULL; i++) + for (i = 0; formats[i][0] != NULL; i++) { - preview = clock_time_strdup_strftime (plugin->time, _(formats[i])); + preview = clock_time_strdup_strftime (plugin->time, _(formats[i][1])); gtk_list_store_insert_with_values (store, &iter, i, - COLUMN_FORMAT, _(formats[i]), + COLUMN_FORMAT, _(formats[i][0]), COLUMN_TEXT, preview, -1); g_free (preview); if (has_active == FALSE && !exo_str_is_empty (active_format) - && strcmp (active_format, formats[i]) == 0) + && strcmp (active_format, formats[i][0]) == 0) { gtk_combo_box_set_active_iter (combo, &iter); gtk_widget_hide (GTK_WIDGET (entry));