[gnumeric] configure: update gtk+ requirement to 3.8.8



commit cc7cd2e1fa913ea7eda871655a76f26d55c6fc1f
Author: Morten Welinder <terra gnome org>
Date:   Mon May 5 12:53:20 2014 -0400

    configure: update gtk+ requirement to 3.8.8
    
    Eliminate some hacking workarounds.

 README                            |    2 +-
 configure.ac                      |    2 +-
 src/gnumeric.css                  |   13 ++++++-------
 src/wbc-gtk.c                     |   21 +++------------------
 src/widgets/gnumeric-expr-entry.c |   11 -----------
 5 files changed, 11 insertions(+), 38 deletions(-)
---
diff --git a/README b/README
index d040de7..2a1e474 100644
--- a/README
+++ b/README
@@ -15,7 +15,7 @@ Requirements
 
 You need:                              Debian package name
        glib            >= 2.28.0       libglib2.0-dev
-       gtk+            >= 3.2.0        libgtk3.0-dev
+       gtk+            >= 3.8.8        libgtk3.0-dev
        libgsf          >= 1.14.24      libgsf-1-dev
        libgoffice      >= 0.10.9       libgoffice-0-8-dev
        gnome-xml       >= 2.4.12       libxml2-dev
diff --git a/configure.ac b/configure.ac
index c36c135..ea33e14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,7 +165,7 @@ gnumeric_reqs="$libspreadsheet_reqs
        pangocairo              >= 1.24.0
 "
 libspreadsheet_gtk_reqs="
-       gtk+-3.0                >= 3.2.0
+       gtk+-3.0                >= 3.8.8
 "
 
 gnumeric_gtk_reqs="$libspreadsheet_gtk_reqs"
diff --git a/src/gnumeric.css b/src/gnumeric.css
index 2269807..2fa9444 100644
--- a/src/gnumeric.css
+++ b/src/gnumeric.css
@@ -89,10 +89,10 @@ GnmItemEdit {
 /* These are also styled with class button */
 
 GnmItemBar {
-  padding-left: 5/*px*/;     /* From gtk3.4 always use "px" */
-  padding-right: 5/*px*/;
-  padding-top: 2/*px*/;
-  padding-bottom: 2/*px*/;
+  padding-left: 5px;
+  padding-right: 5px;
+  padding-top: 2px;
+  padding-bottom: 2px;
 }
 
 /* The whole column/row selected. */
@@ -150,7 +150,7 @@ GtkHandleBox {
 GtkWindow>GtkFrame.pseudo-tooltip {
   border-style: none;
   border-width: 0;
-  padding: 5/*px*/;
+  padding: 5px;
 }
 
 GtkWindow>GtkFrame>GtkLabel.pseudo-tooltip {
@@ -165,8 +165,7 @@ GtkWindow *.pseudo-tooltip {
 }
 
 GtkTextView.pseudo-tooltip {
-  /* Code in wbc-gtk.c:cb_screen_changed will kill the following line pre-GTK 3.4 */
-/*MAGIC*/  color: inherit;
+  color: inherit;
 }
 
 /* ------------------------------------------------------------------------- */
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 5a68c16..a3c9611 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -2300,11 +2300,9 @@ cb_scroll_wheel (GtkWidget *w, GdkEventScroll *event,
        gboolean go_back = (event->direction == GDK_SCROLL_UP ||
                            event->direction == GDK_SCROLL_LEFT);
 
-       if (!pane || !gtk_widget_get_realized (w)
-#if GTK_CHECK_VERSION(3,4,0)
-           || event->direction == GDK_SCROLL_SMOOTH
-#endif
-           )
+       if (!pane ||
+           !gtk_widget_get_realized (w) ||
+           event->direction == GDK_SCROLL_SMOOTH)
                return FALSE;
 
        if ((event->state & GDK_MOD1_MASK))
@@ -2421,16 +2419,6 @@ cb_screen_changed (GtkWidget *widget)
                const char *resource = "gnm:gnumeric.css";
                const char *csstext = go_rsm_lookup (resource, NULL);
                gboolean debug = gnm_debug_flag ("css");
-#if !GTK_CHECK_VERSION(3,4,0)
-               char *csstext_copy = g_strdup (csstext);
-               csstext = csstext_copy;
-               while (1) {
-                       char *magic = strstr (csstext_copy, "/*MAGIC*/");
-                       if (!magic)
-                               break;
-                       memset (magic, ' ', strchr (magic, '\n') - magic);
-               }
-#endif
 
                data = g_new (struct css_provider_data, 1);
                data->css = gtk_css_provider_new ();
@@ -2445,9 +2433,6 @@ cb_screen_changed (GtkWidget *widget)
 
                gtk_css_provider_load_from_data (data->css, csstext, -1, NULL);
                g_object_set_data_full (app, app_key, data, cb_unload_providers);
-#if !GTK_CHECK_VERSION(3,4,0)
-               g_free (csstext_copy);
-#endif
        }
 
        if (screen && !g_slist_find (data->screens, screen)) {
diff --git a/src/widgets/gnumeric-expr-entry.c b/src/widgets/gnumeric-expr-entry.c
index 3c373ea..ba53b0c 100644
--- a/src/widgets/gnumeric-expr-entry.c
+++ b/src/widgets/gnumeric-expr-entry.c
@@ -792,17 +792,6 @@ gee_create_tooltip (GnmExprEntry *gee, gchar const *str,
        gtk_style_context_add_class (gtk_widget_get_style_context (label),
                                     "function-help");
 
-#if !GTK_CHECK_VERSION(3,4,0)
-       /* Workaround for theme bugs and missing "inherit" in pre GTK 3.4. */
-       {
-               GtkStyleContext *context = gtk_widget_get_style_context (tip);
-               GtkStateFlags state = GTK_STATE_FLAG_NORMAL;
-               GdkRGBA c;
-               gtk_style_context_get_color (context, state, &c);
-               gtk_widget_override_color (label, state, &c);
-       }
-#endif
-
        if (str)
                markup = gnm_func_convert_markup_to_pango (str, label);
        string = g_string_new (markup);


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