[gnome-terminal] Bump gtk req to 2.18



commit 6c9e0c97a9b86250cc61d0c32889d336c4267cd0
Author: Christian Persch <chpe gnome org>
Date:   Sat Jun 12 18:03:22 2010 +0200

    Bump gtk req to 2.18
    
    ... and remove GTK_CHECK_VERSION() etc as appropriate.

 configure.ac          |    5 +----
 src/Makefile.am       |    9 ++-------
 src/terminal-screen.c |   24 ------------------------
 src/terminal-window.c |    8 --------
 4 files changed, 3 insertions(+), 43 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c48f878..4ab16e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,7 +57,7 @@ AC_MSG_RESULT([$with_gtk])
 
 case "$with_gtk" in
   2.0) GTK_API_VERSION=2.0
-       GTK_REQUIRED=2.14.0
+       GTK_REQUIRED=2.18.0
        ;;
   3.0) GTK_API_VERSION=3.0
        GTK_REQUIRED=2.90.0
@@ -81,9 +81,6 @@ PKG_CHECK_MODULES([TERM],
    dbus-glib-1 >= $DBUS_GLIB_REQUIRED
    $PLATFORM_DEPS])
 
-PKG_CHECK_EXISTS([gtk+-$GTK_API_VERSION >= 2.18.0],[have_gtk_2_18=yes],[have_gtk_2_18=no])
-AM_CONDITIONAL([HAVE_GTK_2_18],[test "$have_gtk_2_18" = "yes"])
-
 # Check the smclient backend
 SMCLIENT_PKGS=
 AC_MSG_CHECKING([which smclient backend to use])
diff --git a/src/Makefile.am b/src/Makefile.am
index d4b59d7..bad5a38 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,6 +29,8 @@ gnome_terminal_SOURCES= \
 	terminal-debug.h \
 	terminal-encoding.c \
 	terminal-encoding.h \
+	terminal-info-bar.c \
+	terminal-info-bar.h \
 	terminal-intl.h \
 	terminal-options.c \
 	terminal-options.h \
@@ -51,13 +53,6 @@ gnome_terminal_SOURCES= \
 	terminal-window.h \
 	$(NULL)
 
-if HAVE_GTK_2_18
-gnome_terminal_SOURCES += \
-	terminal-info-bar.c \
-	terminal-info-bar.h \
-	$(NULL)
-endif
-
 nodist_gnome_terminal_SOURCES= $(BUILT_SOURCES)
 
 gnome_terminal_CPPFLAGS = \
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 74b463e..ed6647f 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -39,11 +39,7 @@
 #include "terminal-screen-container.h"
 #include "terminal-util.h"
 #include "terminal-window.h"
-
-#if GTK_CHECK_VERSION (2, 18, 0)
 #include "terminal-info-bar.h"
-#define USE_INFOBARS
-#endif
 
 #include "eggshell.h"
 
@@ -273,11 +269,7 @@ terminal_screen_get_window (TerminalScreen *screen)
   GtkWidget *toplevel;
 
   toplevel = gtk_widget_get_toplevel (widget);
-#if GTK_CHECK_VERSION (2, 18, 0)
   if (!gtk_widget_is_toplevel (toplevel))
-#else
-  if (!GTK_WIDGET_TOPLEVEL (toplevel))
-#endif
     return NULL;
 
   return TERMINAL_WINDOW (toplevel);
@@ -1353,11 +1345,7 @@ get_child_environment (TerminalScreen *screen,
 
   window = gtk_widget_get_toplevel (term);
   g_assert (window != NULL);
-#if GTK_CHECK_VERSION (2, 19, 3)
   g_assert (gtk_widget_is_toplevel (window));
-#else
-  g_assert (GTK_WIDGET_TOPLEVEL (window));
-#endif
 
   env_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 
@@ -1408,8 +1396,6 @@ get_child_environment (TerminalScreen *screen,
   return (char **) g_ptr_array_free (retval, FALSE);
 }
 
-#ifdef USE_INFOBARS
-
 enum {
   RESPONSE_RELAUNCH,
   RESPONSE_EDIT_PROFILE
@@ -1443,8 +1429,6 @@ info_bar_response_cb (GtkWidget *info_bar,
   }
 }
 
-#endif /* USE_INFOBARS */
-
 static gboolean
 terminal_screen_launch_child_cb (TerminalScreen *screen)
 {
@@ -1489,7 +1473,6 @@ terminal_screen_launch_child_cb (TerminalScreen *screen)
                                        NULL, NULL,
                                        &pid,
                                        &err)) {
-#ifdef USE_INFOBARS
     GtkWidget *info_bar;
 
     info_bar = terminal_info_bar_new (GTK_MESSAGE_ERROR,
@@ -1507,11 +1490,6 @@ terminal_screen_launch_child_cb (TerminalScreen *screen)
                         info_bar, FALSE, FALSE, 0);
     gtk_info_bar_set_default_response (GTK_INFO_BAR (info_bar), GTK_RESPONSE_CANCEL);
     gtk_widget_show (info_bar);
-#else
-    terminal_util_show_error_dialog (GTK_WINDOW (terminal_screen_get_window (screen)), NULL,
-                                     err,
-                                     "%s", _("There was an error creating the child process for this terminal"));
-#endif /* USE_INFOBARS */
 
     g_error_free (err);
     g_strfreev (env);
@@ -1878,7 +1856,6 @@ terminal_screen_child_exited (VteTerminal *terminal)
     case TERMINAL_EXIT_RESTART:
       terminal_screen_launch_child_on_idle (screen);
       break;
-#ifdef USE_INFOBARS
     case TERMINAL_EXIT_HOLD: {
       GtkWidget *info_bar;
       int status;
@@ -1907,7 +1884,6 @@ terminal_screen_child_exited (VteTerminal *terminal)
       gtk_widget_show (info_bar);
       break;
     }
-#endif /* USE_INFOBARS */
 
     default:
       break;
diff --git a/src/terminal-window.c b/src/terminal-window.c
index 335e046..52abb3f 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
@@ -2325,11 +2325,7 @@ close_button_clicked_cb (GtkWidget *tab_label,
   TerminalScreen *screen;
 
   toplevel = gtk_widget_get_toplevel (screen_container);
-#if GTK_CHECK_VERSION (2, 19, 3)
   if (!gtk_widget_is_toplevel (toplevel))
-#else
-  if (!GTK_WIDGET_TOPLEVEL (toplevel))
-#endif
     return;
 
   if (!TERMINAL_IS_WINDOW (toplevel))
@@ -2355,11 +2351,7 @@ terminal_window_add_screen (TerminalWindow *window,
   GtkWidget *screen_container, *tab_label;
 
   old_window = gtk_widget_get_toplevel (GTK_WIDGET (screen));
-#if GTK_CHECK_VERSION (2, 19, 3)
   if (gtk_widget_is_toplevel (old_window) &&
-#else
-  if (GTK_WIDGET_TOPLEVEL (old_window) &&
-#endif
       TERMINAL_IS_WINDOW (old_window) &&
       TERMINAL_WINDOW (old_window)== window)
     return;  



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