[Goodies-commits] r2356 - xfce4-datetime-plugin/branches/enhanced_configdialog/panel-plugin
Remco den Breeje
stacium at xfce.org
Sat Jan 13 22:56:41 CET 2007
Author: stacium
Date: 2007-01-13 21:56:41 +0000 (Sat, 13 Jan 2007)
New Revision: 2356
Modified:
xfce4-datetime-plugin/branches/enhanced_configdialog/panel-plugin/datetime-dialog.c
Log:
datetime-plugin: It makes more sense if the date-options are showed above the
time-options.
Modified: xfce4-datetime-plugin/branches/enhanced_configdialog/panel-plugin/datetime-dialog.c
===================================================================
--- xfce4-datetime-plugin/branches/enhanced_configdialog/panel-plugin/datetime-dialog.c 2007-01-13 21:45:06 UTC (rev 2355)
+++ xfce4-datetime-plugin/branches/enhanced_configdialog/panel-plugin/datetime-dialog.c 2007-01-13 21:56:41 UTC (rev 2356)
@@ -352,9 +352,9 @@
gtk_widget_show_all(frame);
/*
- * time frame
+ * Date frame
*/
- frame = xfce_create_framebox(_("Time"), &bin);
+ frame = xfce_create_framebox(_("Date"), &bin);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame,
FALSE, FALSE, 0);
gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
@@ -374,11 +374,11 @@
gtk_size_group_add_widget(sg, label);
/* font button */
- button = gtk_button_new_with_label(datetime->time_font);
+ button = gtk_button_new_with_label(datetime->date_font);
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(datetime_font_selection_cb), datetime);
- datetime->time_font_selector = button;
+ datetime->date_font_selector = button;
/* hbox */
hbox = gtk_hbox_new(FALSE, 2);
@@ -389,32 +389,32 @@
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_size_group_add_widget(sg, label);
-
+
/* format combobox */
- time_combobox = gtk_combo_box_new_text();
- gtk_box_pack_start(GTK_BOX(hbox), time_combobox, TRUE, TRUE, 0);
+ date_combobox = gtk_combo_box_new_text();
+ gtk_box_pack_start(GTK_BOX(hbox), date_combobox, TRUE, TRUE, 0);
exampletm = gmtime(&example_time_t);
- for(i=0; i < TIME_FORMAT_COUNT; i++)
- {
- utf8str = datetime_do_utf8strftime(time_format[i], exampletm);
- gtk_combo_box_append_text(GTK_COMBO_BOX(time_combobox), utf8str);
+ for(i=0; i < DATE_FORMAT_COUNT; i++)
+ {
+ utf8str = datetime_do_utf8strftime(date_format[i], exampletm);
+ gtk_combo_box_append_text(GTK_COMBO_BOX(date_combobox), utf8str);
g_free(utf8str);
/* set active
* strcmp isn't fast, but it is done only once while opening the dialog
*/
- if(strcmp(datetime->time_format,time_format[i]) == 0)
- gtk_combo_box_set_active(GTK_COMBO_BOX(time_combobox), i);
+ if(strcmp(datetime->date_format,date_format[i]) == 0)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(date_combobox), i);
}
/* if no field selected -> select custom field */
- if(gtk_combo_box_get_active(GTK_COMBO_BOX(time_combobox)) < 0)
- gtk_combo_box_set_active(GTK_COMBO_BOX(time_combobox), TIME_FORMAT_COUNT-1);
- gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(time_combobox),
+ if(gtk_combo_box_get_active(GTK_COMBO_BOX(date_combobox)) < 0)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(date_combobox), DATE_FORMAT_COUNT-1);
+ gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(date_combobox),
combo_box_row_separator,
NULL, NULL);
- g_signal_connect(G_OBJECT(time_combobox), "changed",
- G_CALLBACK(time_format_changed), datetime);
- datetime->time_format_combobox = time_combobox;
+ g_signal_connect(G_OBJECT(date_combobox), "changed",
+ G_CALLBACK(date_format_changed), datetime);
+ datetime->date_format_combobox = date_combobox;
/* hbox */
hbox = gtk_hbox_new(FALSE, 2);
@@ -422,18 +422,18 @@
/* format entry */
entry = gtk_entry_new();
- gtk_entry_set_text(GTK_ENTRY(entry), datetime->time_format);
+ gtk_entry_set_text(GTK_ENTRY(entry), datetime->date_format);
gtk_box_pack_end(GTK_BOX(hbox), entry, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT(entry), "focus-out-event",
G_CALLBACK (datetime_entry_change_cb), datetime);
- datetime->time_format_entry = entry;
+ datetime->date_format_entry = entry;
gtk_widget_show_all(frame);
/*
- * Date frame
+ * time frame
*/
- frame = xfce_create_framebox(_("Date"), &bin);
+ frame = xfce_create_framebox(_("Time"), &bin);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame,
FALSE, FALSE, 0);
gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
@@ -453,11 +453,11 @@
gtk_size_group_add_widget(sg, label);
/* font button */
- button = gtk_button_new_with_label(datetime->date_font);
+ button = gtk_button_new_with_label(datetime->time_font);
gtk_box_pack_start(GTK_BOX(hbox), button, TRUE, TRUE, 0);
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(datetime_font_selection_cb), datetime);
- datetime->date_font_selector = button;
+ datetime->time_font_selector = button;
/* hbox */
hbox = gtk_hbox_new(FALSE, 2);
@@ -468,32 +468,32 @@
gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
gtk_size_group_add_widget(sg, label);
-
+
/* format combobox */
- date_combobox = gtk_combo_box_new_text();
- gtk_box_pack_start(GTK_BOX(hbox), date_combobox, TRUE, TRUE, 0);
+ time_combobox = gtk_combo_box_new_text();
+ gtk_box_pack_start(GTK_BOX(hbox), time_combobox, TRUE, TRUE, 0);
exampletm = gmtime(&example_time_t);
- for(i=0; i < DATE_FORMAT_COUNT; i++)
- {
- utf8str = datetime_do_utf8strftime(date_format[i], exampletm);
- gtk_combo_box_append_text(GTK_COMBO_BOX(date_combobox), utf8str);
+ for(i=0; i < TIME_FORMAT_COUNT; i++)
+ {
+ utf8str = datetime_do_utf8strftime(time_format[i], exampletm);
+ gtk_combo_box_append_text(GTK_COMBO_BOX(time_combobox), utf8str);
g_free(utf8str);
/* set active
* strcmp isn't fast, but it is done only once while opening the dialog
*/
- if(strcmp(datetime->date_format,date_format[i]) == 0)
- gtk_combo_box_set_active(GTK_COMBO_BOX(date_combobox), i);
+ if(strcmp(datetime->time_format,time_format[i]) == 0)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(time_combobox), i);
}
/* if no field selected -> select custom field */
- if(gtk_combo_box_get_active(GTK_COMBO_BOX(date_combobox)) < 0)
- gtk_combo_box_set_active(GTK_COMBO_BOX(date_combobox), DATE_FORMAT_COUNT-1);
- gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(date_combobox),
+ if(gtk_combo_box_get_active(GTK_COMBO_BOX(time_combobox)) < 0)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(time_combobox), TIME_FORMAT_COUNT-1);
+ gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(time_combobox),
combo_box_row_separator,
NULL, NULL);
- g_signal_connect(G_OBJECT(date_combobox), "changed",
- G_CALLBACK(date_format_changed), datetime);
- datetime->date_format_combobox = date_combobox;
+ g_signal_connect(G_OBJECT(time_combobox), "changed",
+ G_CALLBACK(time_format_changed), datetime);
+ datetime->time_format_combobox = time_combobox;
/* hbox */
hbox = gtk_hbox_new(FALSE, 2);
@@ -501,11 +501,11 @@
/* format entry */
entry = gtk_entry_new();
- gtk_entry_set_text(GTK_ENTRY(entry), datetime->date_format);
+ gtk_entry_set_text(GTK_ENTRY(entry), datetime->time_format);
gtk_box_pack_end(GTK_BOX(hbox), entry, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT(entry), "focus-out-event",
G_CALLBACK (datetime_entry_change_cb), datetime);
- datetime->date_format_entry = entry;
+ datetime->time_format_entry = entry;
gtk_widget_show_all(frame);
More information about the Goodies-commits
mailing list