[dconf] Remove GTK2 support for the editor



commit 9ced5f8b0359fb86f0cb886e8d7edc9f473adc00
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Dec 18 11:35:24 2010 -0500

    Remove GTK2 support for the editor
    
    Supporting both GTK versions doesn't work well

 configure.ac           |   21 +--------------------
 editor/Makefile.am     |    2 +-
 editor/dconf-view.vala |   13 -------------
 3 files changed, 2 insertions(+), 34 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e9b9281..309e2da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,25 +23,6 @@ GTK_DOC_CHECK([1.15])
 # Dependencies
 PKG_CHECK_MODULES(gio, gio-2.0 >= 2.25.16)
 
-AC_MSG_CHECKING([which gtk+ version to compile against])
-AC_ARG_WITH([gtk],
-  [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
-  [case "$with_gtk" in
-     2.0|3.0) ;;
-     *) AC_MSG_ERROR([invalid gtk version specified]) ;;
-   esac],
-  [with_gtk=2.0])
-AC_MSG_RESULT([$with_gtk])
-
-case "$with_gtk" in
-  2.0) GTK_API_VERSION=2.0
-       GTK_REQUIRED=2.21.8
-       ;;
-  3.0) GTK_API_VERSION=3.0
-       GTK_REQUIRED=2.90.7
-       ;;
-esac
-AC_SUBST(GTK_API_VERSION)
 
 AC_ARG_ENABLE(editor,
               AC_HELP_STRING([--disable-editor],
@@ -49,7 +30,7 @@ AC_ARG_ENABLE(editor,
 AM_CONDITIONAL(ENABLE_EDITOR, test "x$enable_editor" != "xno")
 
 if test "x$enable_editor" != "xno"; then
-  PKG_CHECK_MODULES(gtk, gtk+-$GTK_API_VERSION >= $GTK_REQUIRED)
+  PKG_CHECK_MODULES(gtk, gtk+-3.0)
   PKG_CHECK_MODULES(libxml, libxml-2.0)
 fi
 
diff --git a/editor/Makefile.am b/editor/Makefile.am
index bba695f..7434000 100644
--- a/editor/Makefile.am
+++ b/editor/Makefile.am
@@ -1,7 +1,7 @@
 bin_PROGRAMS = dconf-editor
 
 AM_CFLAGS = $(gtk_CFLAGS) $(libxml_CFLAGS) -I$(top_srcdir)/common -I$(top_srcdir)/client 
-AM_VALAFLAGS = --vapidir ../client --pkg gtk+-$(GTK_API_VERSION) --pkg libxml-2.0 --pkg dconf -D GTK$(GTK_API_VERSION:.0=)
+AM_VALAFLAGS = --vapidir ../client --pkg gtk+-3.0 --pkg libxml-2.0 --pkg dconf
 CFLAGS += -Wno-error
 dconf_editor_LDADD = ../client/libdconf.so.0 $(gtk_LIBS) $(gee_LIBS) $(libxml_LIBS)
 dconf_editor_SOURCES = dconf-editor.vala dconf-model.vala dconf-schema.vala dconf-view.vala
diff --git a/editor/dconf-view.vala b/editor/dconf-view.vala
index cdeda7b..760052c 100644
--- a/editor/dconf-view.vala
+++ b/editor/dconf-view.vala
@@ -159,17 +159,6 @@ private class KeyValueRenderer: Gtk.CellRenderer
         renderer.get_size(widget, cell_area, out x_offset, out y_offset, out width, out height);
     }
 
-#if GTK2
-    public override void render(Gdk.Window    window,
-                                Gtk.Widget    widget,
-                                Gdk.Rectangle background_area,
-                                Gdk.Rectangle cell_area,
-                                Gdk.Rectangle expose_area,
-                                Gtk.CellRendererState flags)
-    {
-        renderer.render(window, widget, background_area, cell_area, expose_area, flags);
-    }
-#else
     public override void render(Cairo.Context context,
                                 Gtk.Widget    widget,
                                 Gdk.Rectangle background_area,
@@ -178,8 +167,6 @@ private class KeyValueRenderer: Gtk.CellRenderer
     {
         renderer.render(context, widget, background_area, cell_area, flags);
     }
-#endif
-
 
     public override bool activate(Gdk.Event event,
                                   Gtk.Widget widget,



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