[evince] ev-zoom-action-widget: Format the entry text with the current entry text



commit 1a935ad8da382e9d290c2c556c04ab0ca5eff965
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sat Jan 12 13:04:42 2013 +0100

    ev-zoom-action-widget: Format the entry text with the current entry text
    
    We handle the entry text manually, so return always the current entry
    text in format entry text callback to make sure the cell renderer text
    is not used when the zoom hasn't changed.

 shell/ev-zoom-action-widget.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/shell/ev-zoom-action-widget.c b/shell/ev-zoom-action-widget.c
index a2494ae..dbbd42a 100644
--- a/shell/ev-zoom-action-widget.c
+++ b/shell/ev-zoom-action-widget.c
@@ -185,15 +185,9 @@ combo_format_entry_text (GtkComboBox        *combo,
                          const gchar        *path,
                          EvZoomActionWidget *control)
 {
-        GtkTreeModel *model;
-        GtkTreeIter   iter;
-        gchar        *text;
+        GtkWidget *entry = gtk_bin_get_child (GTK_BIN (combo));
 
-        model = gtk_combo_box_get_model (combo);
-        gtk_tree_model_get_iter_from_string (model, &iter, path);
-        gtk_tree_model_get (model, &iter, TEXT_COLUMN, &text, -1);
-
-        return text;
+        return g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
 }
 
 static gboolean



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