[gnome-commander] Options: use cfg for referencing to GnomeCmdData in create_format_tab()



commit 565c19d3e5150205a070750c54911de40fc37136
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Nov 6 13:37:05 2011 +0100

    Options: use cfg for referencing to GnomeCmdData in create_format_tab()

 src/gnome-cmd-options-dialog.cc |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gnome-cmd-options-dialog.cc b/src/gnome-cmd-options-dialog.cc
index 2ebaf26..1820be2 100644
--- a/src/gnome-cmd-options-dialog.cc
+++ b/src/gnome-cmd-options-dialog.cc
@@ -241,7 +241,7 @@ static void on_date_format_update (GtkEditable *editable, GtkWidget *options_dia
 }
 
 
-static GtkWidget *create_format_tab (GtkWidget *parent)
+static GtkWidget *create_format_tab (GtkWidget *parent, GnomeCmdData &cfg)
 {
     GtkWidget *frame, *hbox, *vbox, *cat, *cat_box, *table;
     GtkWidget *radio, *label, *entry;
@@ -260,23 +260,23 @@ static GtkWidget *create_format_tab (GtkWidget *parent)
     // Translators: 'Powered' refers to the mode of file size display (here - display using units of data: kB, MB, GB, ...)
     radio = create_radio (parent, NULL, _("Powered"), "size_powered_radio");
     gtk_container_add (GTK_CONTAINER (cat_box), radio);
-    if (gnome_cmd_data.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_POWERED)
+    if (cfg.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_POWERED)
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
 
     // Translators: '<locale>' refers to the mode of file size display (here - use current locale settings)
     radio = create_radio (parent, get_radio_group (radio), _("<locale>"), "size_locale_radio");
     gtk_container_add (GTK_CONTAINER (cat_box), radio);
-    if (gnome_cmd_data.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_LOCALE)
+    if (cfg.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_LOCALE)
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
 
     radio = create_radio (parent, get_radio_group (radio), _("Grouped"), "size_grouped_radio");
     gtk_container_add (GTK_CONTAINER (cat_box), radio);
-    if (gnome_cmd_data.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_GROUPED)
+    if (cfg.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_GROUPED)
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
 
     radio = create_radio (parent, get_radio_group (radio), _("Plain"), "size_plain_radio");
     gtk_container_add (GTK_CONTAINER (cat_box), radio);
-    if (gnome_cmd_data.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_PLAIN)
+    if (cfg.size_disp_mode == GNOME_CMD_SIZE_DISP_MODE_PLAIN)
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
 
 
@@ -287,12 +287,12 @@ static GtkWidget *create_format_tab (GtkWidget *parent)
 
     radio = create_radio (parent, NULL, _("Text (rw-r--r--)"), "perm_text_radio");
     gtk_container_add (GTK_CONTAINER (cat_box), radio);
-    if (gnome_cmd_data.perm_disp_mode == GNOME_CMD_PERM_DISP_MODE_TEXT)
+    if (cfg.perm_disp_mode == GNOME_CMD_PERM_DISP_MODE_TEXT)
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
 
     radio = create_radio (parent, get_radio_group (radio), _("Number (644)"), "perm_num_radio");
     gtk_container_add (GTK_CONTAINER (cat_box), radio);
-    if (gnome_cmd_data.perm_disp_mode == GNOME_CMD_PERM_DISP_MODE_NUMBER)
+    if (cfg.perm_disp_mode == GNOME_CMD_PERM_DISP_MODE_NUMBER)
         gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio), TRUE);
 
 
@@ -2009,7 +2009,7 @@ gboolean gnome_cmd_options_dialog (GtkWindow *parent, GnomeCmdData &cfg)
 #endif
 
     notebook->append_page(create_general_tab (dialog, cfg), _("General"));
-    notebook->append_page(create_format_tab (dialog), _("Format"));
+    notebook->append_page(create_format_tab (dialog, cfg), _("Format"));
     notebook->append_page(create_layout_tab (dialog), _("Layout"));
     notebook->append_page(create_tabs_tab (dialog), _("Tabs"));
     notebook->append_page(create_confirmation_tab (dialog), _("Confirmation"));



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