[gnome-commander] Replacing gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (w))) -> get_combo_text (w)



commit f9c9441bbc6feac6f23468f125a8351ec90ca9e4
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Wed Aug 24 20:27:57 2011 +0200

    Replacing gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (w))) -> get_combo_text (w)

 plugins/fileroller/file-roller-plugin.cc |    3 +--
 src/gnome-cmd-chmod-dialog.cc            |    2 +-
 src/gnome-cmd-chown-component.cc         |    4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/plugins/fileroller/file-roller-plugin.cc b/plugins/fileroller/file-roller-plugin.cc
index 04b303c..4b10ea4 100644
--- a/plugins/fileroller/file-roller-plugin.cc
+++ b/plugins/fileroller/file-roller-plugin.cc
@@ -345,8 +345,7 @@ static void update_main_menu_state (GnomeCmdPlugin *plugin, GnomeCmdState *state
 
 static void on_configure_close (GtkButton *btn, FileRollerPlugin *plugin)
 {
-    plugin->priv->default_ext = g_strdup (gtk_entry_get_text (
-        GTK_ENTRY (GTK_COMBO (plugin->priv->conf_combo)->entry)));
+    plugin->priv->default_ext = g_strdup (get_combo_text (plugin->priv->conf_combo));
 
     gnome_cmd_data_set_string ("/file-runner-plugin/default_type", plugin->priv->default_ext);
 
diff --git a/src/gnome-cmd-chmod-dialog.cc b/src/gnome-cmd-chmod-dialog.cc
index cd26d34..fd8caff 100644
--- a/src/gnome-cmd-chmod-dialog.cc
+++ b/src/gnome-cmd-chmod-dialog.cc
@@ -102,7 +102,7 @@ inline void do_chmod_files (GnomeCmdChmodDialog *dialog)
     {
         GnomeCmdFile *f = (GnomeCmdFile *) tmp->data;
         gboolean recursive = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->priv->recurse_check));
-        const gchar *mode_text = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (dialog->priv->recurse_combo)->entry));
+        const gchar *mode_text = get_combo_text (dialog->priv->recurse_combo);
         ChmodRecursiveMode mode = strcmp (mode_text, recurse_opts[CHMOD_ALL_FILES]) == 0 ? CHMOD_ALL_FILES :
                                                                                            CHMOD_DIRS_ONLY;
 
diff --git a/src/gnome-cmd-chown-component.cc b/src/gnome-cmd-chown-component.cc
index 1c1e89f..b0b9fe4 100644
--- a/src/gnome-cmd-chown-component.cc
+++ b/src/gnome-cmd-chown-component.cc
@@ -164,7 +164,7 @@ void gnome_cmd_chown_component_set (GnomeCmdChownComponent *comp, uid_t uid, gid
 
 uid_t gnome_cmd_chown_component_get_owner (GnomeCmdChownComponent *component)
 {
-    const gchar *owner = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (component->priv->user_combo)->entry));
+    const gchar *owner = get_combo_text (component->priv->user_combo);
 
     return gcmd_owner.users[owner];
 }
@@ -172,7 +172,7 @@ uid_t gnome_cmd_chown_component_get_owner (GnomeCmdChownComponent *component)
 
 gid_t gnome_cmd_chown_component_get_group (GnomeCmdChownComponent *component)
 {
-    const gchar *group = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (component->priv->group_combo)->entry));
+    const gchar *group = get_combo_text (component->priv->group_combo);
 
     return gcmd_owner.groups[group];
 }



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