[gnome-commander] Options: removal Test button for date format checking



commit 7ab0049bb40c93ff16ca5963e3fa0d1c4e72e76a
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Wed Jan 26 18:19:45 2011 +0100

    Options: removal Test button for date format checking

 src/gnome-cmd-options-dialog.cc |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-cmd-options-dialog.cc b/src/gnome-cmd-options-dialog.cc
index d605d7c..6f2c755 100644
--- a/src/gnome-cmd-options-dialog.cc
+++ b/src/gnome-cmd-options-dialog.cc
@@ -237,7 +237,7 @@ inline void store_general_options (GtkWidget *dialog)
  *
  **********************************************************************/
 
-static void on_date_format_update (GtkButton *button, GtkWidget *options_dialog)
+static void on_date_format_update (GtkEditable *editable, GtkWidget *options_dialog)
 {
     GtkWidget *format_entry = lookup_widget (options_dialog, "date_format_entry");
     GtkWidget *test_label = lookup_widget (options_dialog, "date_format_test_label");
@@ -323,17 +323,15 @@ static GtkWidget *create_format_tab (GtkWidget *parent)
     entry = create_entry (parent, "date_format_entry", utf8_date_format);
     g_free (utf8_date_format);
     gtk_widget_grab_focus (entry);
+    g_signal_connect (entry, "realize", G_CALLBACK (on_date_format_update), parent);
+    g_signal_connect (entry, "changed", G_CALLBACK (on_date_format_update), parent);
     table_add (table, entry, 1, 0, GTK_FILL);
 
-    button = create_button (parent, _("_Test"), GTK_SIGNAL_FUNC (on_date_format_update));
-    table_add (table, button, 2, 0, GTK_FILL);
-
     label = create_label (parent, _("Test result:"));
     table_add (table, label, 0, 1, GTK_FILL);
 
     label = create_label (parent, "");
     g_object_set_data (G_OBJECT (parent), "date_format_test_label", label);
-    g_signal_connect (label, "realize", G_CALLBACK (on_date_format_update), parent);
     table_add (table, label, 1, 1, (GtkAttachOptions) (GTK_EXPAND|GTK_FILL));
 
     label = create_label (parent, _("See the manual page for \"strftime\" for help on how to set the format string."));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]