[gtk+/wip/baedert/drawing: 38/147] spinbutton: Remove call to GtkSpinButton API



commit 9ff2b268862a7d6c9941fc75ecf1e1da067d6c15
Author: Timm Bäder <mail baedert org>
Date:   Thu May 4 18:24:37 2017 +0200

    spinbutton: Remove call to GtkSpinButton API
    
    The condition will never be true since spinbuttons aren't entries
    anymore.

 gtk/gtkentry.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index dded3b8..800dcae 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -51,7 +51,6 @@
 #include "gtkseparatormenuitem.h"
 #include "gtkselection.h"
 #include "gtksettings.h"
-#include "gtkspinbutton.h"
 #include "gtktextutil.h"
 #include "gtkwindow.h"
 #include "gtktreeview.h"
@@ -3228,16 +3227,9 @@ gtk_entry_measure (GtkCssGadget   *gadget,
       char_pixels = (MAX (char_width, digit_width) + PANGO_SCALE - 1) / PANGO_SCALE;
 
       if (priv->width_chars < 0)
-        {
-          if (GTK_IS_SPIN_BUTTON (entry))
-            min = gtk_spin_button_get_text_width (GTK_SPIN_BUTTON (entry));
-          else
-            min = MIN_ENTRY_WIDTH;
-        }
+          min = MIN_ENTRY_WIDTH;
       else
-        {
-          min = char_pixels * priv->width_chars;
-        }
+        min = char_pixels * priv->width_chars;
 
       if (priv->max_width_chars < 0)
         nat = min;


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