[Xfce4-commits] r30095 - in terminal/trunk: . terminal

Nick Schermer nick at xfce.org
Sat Jun 27 21:30:39 CEST 2009


Author: nick
Date: 2009-06-27 19:30:39 +0000 (Sat, 27 Jun 2009)
New Revision: 30095

Modified:
   terminal/trunk/configure.in.in
   terminal/trunk/terminal/terminal-dialogs.c
   terminal/trunk/terminal/terminal-private.h
   terminal/trunk/terminal/terminal-screen.c
   terminal/trunk/terminal/terminal-widget.h
   terminal/trunk/terminal/terminal-window.c
Log:
Depend on GTK+ 2.12 and remove CHECK_VERSION code.


Modified: terminal/trunk/configure.in.in
===================================================================
--- terminal/trunk/configure.in.in	2009-06-27 19:29:41 UTC (rev 30094)
+++ terminal/trunk/configure.in.in	2009-06-27 19:30:39 UTC (rev 30095)
@@ -82,7 +82,7 @@
 dnl *** Check for required packages ***
 dnl ***********************************
 XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.4])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.12.0])
 XDT_CHECK_PACKAGE([VTE], [vte], [0.17.1])
 
 dnl *************************************************
@@ -132,25 +132,6 @@
 fi
 AM_CONDITIONAL([ENABLE_XML2PO], [test x"$enable_xml2po" = x"yes"])
 
-dnl **********************************
-dnl *** Check for VTE transparency ***
-dnl **********************************
-AC_MSG_CHECKING([whether VTE supports real transparency])
-save_LIBS="$LIBS"
-save_CFLAGS="$CFLAGS"
-LIBS="$LIBS $VTE_LIBS"
-CFLAGS="$CFLAGS $VTE_CFLAGS"
-AC_TRY_LINK([
-  #include <vte/vte.h>
-], [ vte_terminal_set_opacity (0, 0); ], [
-  AC_DEFINE_UNQUOTED([HAVE_VTE_TERMINAL_SET_OPACITY], [1], [Define to 1 if vte_terminal_set_opacity() is available])
-  AC_MSG_RESULT([yes])
-], [
-  AC_MSG_RESULT([no])
-])
-CFLAGS="$save_CFLAGS"
-LIBS="$save_LIBS"
-
 dnl ***********************************
 dnl *** Check for debugging support ***
 dnl ***********************************

Modified: terminal/trunk/terminal/terminal-dialogs.c
===================================================================
--- terminal/trunk/terminal/terminal-dialogs.c	2009-06-27 19:29:41 UTC (rev 30094)
+++ terminal/trunk/terminal/terminal-dialogs.c	2009-06-27 19:30:39 UTC (rev 30095)
@@ -79,11 +79,7 @@
                          "copyright", "Copyright \302\251 2003-2007 Benedikt Meurer",
                          "license", XFCE_LICENSE_GPL,
                          "logo", logo,
-#if GTK_CHECK_VERSION(2,11,0)
                          "program-name", PACKAGE_NAME,
-#else
-                         "name", PACKAGE_NAME,
-#endif
                          "translator-credits", _("translator-credits"),
                          "version", PACKAGE_VERSION,
                          "website", "http://www.xfce.org/projects/terminal/",

Modified: terminal/trunk/terminal/terminal-private.h
===================================================================
--- terminal/trunk/terminal/terminal-private.h	2009-06-27 19:29:41 UTC (rev 30094)
+++ terminal/trunk/terminal/terminal-private.h	2009-06-27 19:30:39 UTC (rev 30095)
@@ -42,23 +42,6 @@
 #define _terminal_return_val_if_fail(expr, val) G_STMT_START{ (void)0; }G_STMT_END
 #endif
 
-/* support macros for the slice allocator */
-#if GLIB_CHECK_VERSION(2,10,0)
-#define _terminal_slice_alloc(block_size)             (g_slice_alloc ((block_size)))
-#define _terminal_slice_alloc0(block_size)            (g_slice_alloc0 ((block_size)))
-#define _terminal_slice_free1(block_size, mem_block)  G_STMT_START{ g_slice_free1 ((block_size), (mem_block)); }G_STMT_END
-#define _terminal_slice_new(type)                     (g_slice_new (type))
-#define _terminal_slice_new0(type)                    (g_slice_new0 (type))
-#define _terminal_slice_free(type, ptr)               G_STMT_START{ g_slice_free (type, (ptr)); }G_STMT_END
-#else
-#define _terminal_slice_alloc(block_size)             (g_malloc ((block_size)))
-#define _terminal_slice_alloc0(block_size)            (g_malloc0 ((block_size)))
-#define _terminal_slice_free1(block_size, mem_block)  G_STMT_START{ g_free ((mem_block)); }G_STMT_END
-#define _terminal_slice_new(type)                     (g_new (type, 1))
-#define _terminal_slice_new0(type)                    (g_new0 (type, 1))
-#define _terminal_slice_free(type, ptr)               G_STMT_START{ g_free ((ptr)); }G_STMT_END
-#endif
-
 /* avoid trivial g_value_get_*() function calls */
 #ifdef NDEBUG
 #define g_value_get_boolean(v)  (((const GValue *) (v))->data[0].v_int)

Modified: terminal/trunk/terminal/terminal-screen.c
===================================================================
--- terminal/trunk/terminal/terminal-screen.c	2009-06-27 19:29:41 UTC (rev 30094)
+++ terminal/trunk/terminal/terminal-screen.c	2009-06-27 19:30:39 UTC (rev 30095)
@@ -405,9 +405,7 @@
 static void
 terminal_screen_realize (GtkWidget *widget)
 {
-#ifdef HAVE_VTE_TERMINAL_SET_OPACITY
   GdkScreen *screen;
-#endif
 
   (*GTK_WIDGET_CLASS (terminal_screen_parent_class)->realize) (widget);
 
@@ -415,11 +413,9 @@
   if (!GTK_WIDGET_REALIZED (TERMINAL_SCREEN (widget)->terminal))
     gtk_widget_realize (TERMINAL_SCREEN (widget)->terminal);
 
-#ifdef HAVE_VTE_TERMINAL_SET_OPACITY
   /* connect to the "composited-changed" signal */
   screen = gtk_widget_get_screen (widget);
   g_signal_connect_swapped (G_OBJECT (screen), "composited-changed", G_CALLBACK (terminal_screen_update_background), widget);
-#endif
 }
 
 
@@ -427,13 +423,11 @@
 static void
 terminal_screen_unrealize (GtkWidget *widget)
 {
-#ifdef HAVE_VTE_TERMINAL_SET_OPACITY
   GdkScreen *screen;
 
   /* disconnect the "composited-changed" handler */
   screen = gtk_widget_get_screen (widget);
   g_signal_handlers_disconnect_by_func (G_OBJECT (screen), terminal_screen_update_background, widget);
-#endif
 
   (*GTK_WIDGET_CLASS (terminal_screen_parent_class)->unrealize) (widget);
 }
@@ -728,12 +722,8 @@
 {
   gboolean bval;
   g_object_get (G_OBJECT (screen->preferences), "misc-cursor-blinks", &bval, NULL);
-#if VTE_CHECK_VERSION (0, 17, 1)
   vte_terminal_set_cursor_blink_mode (VTE_TERMINAL (screen->terminal), 
                                       bval ? VTE_CURSOR_BLINK_ON : VTE_CURSOR_BLINK_OFF);
-#else
-  vte_terminal_set_cursor_blinks (VTE_TERMINAL (screen->terminal), bval);
-#endif
 }
 
 
@@ -917,13 +907,8 @@
     g_source_remove(screen->reset_activity_cb);
   }
 
-#if GLIB_CHECK_VERSION (2,14,0)
   screen->reset_activity_cb = g_timeout_add_seconds ((gint)timeout_seconds,
                      (GSourceFunc)terminal_screen_reset_activity, screen);
-#else
-  screen->reset_activity_cb = g_timeout_add ((gint)timeout_seconds * 1000,
-                     (GSourceFunc)terminal_screen_reset_activity, screen);
-#endif
 }
 
 static gboolean
@@ -947,9 +932,7 @@
       vte_terminal_set_background_image (VTE_TERMINAL (screen->terminal), NULL);
       vte_terminal_set_background_saturation (VTE_TERMINAL (screen->terminal), 1.0);
       vte_terminal_set_background_transparent (VTE_TERMINAL (screen->terminal), FALSE);
-#ifdef HAVE_VTE_TERMINAL_SET_OPACITY
       vte_terminal_set_opacity (VTE_TERMINAL (screen->terminal), 0xFFFF);
-#endif
     }
   else if (background_mode == TERMINAL_BACKGROUND_IMAGE)
     {
@@ -961,9 +944,8 @@
                                           screen->terminal->allocation.width,
                                           screen->terminal->allocation.height);
       vte_terminal_set_background_image (VTE_TERMINAL (screen->terminal), image);
-#ifdef HAVE_VTE_TERMINAL_SET_OPACITY
       vte_terminal_set_opacity (VTE_TERMINAL (screen->terminal), 0xFFFF);
-#endif
+
       if (image != NULL)
         g_object_unref (G_OBJECT (image));
       g_object_unref (G_OBJECT (loader));
@@ -973,7 +955,6 @@
       g_object_get (G_OBJECT (screen->preferences), "background-darkness", &background_darkness, NULL);
       vte_terminal_set_background_image (VTE_TERMINAL (screen->terminal), NULL);
 
-#ifdef HAVE_VTE_TERMINAL_SET_OPACITY
       /* check if the X screen is composited */
       if (gdk_screen_is_composited (gtk_widget_get_screen (user_data)))
         {
@@ -983,13 +964,10 @@
         }
       else
         {
-#endif
           vte_terminal_set_background_saturation (VTE_TERMINAL (screen->terminal), 1.0 - background_darkness);
           vte_terminal_set_background_transparent (VTE_TERMINAL (screen->terminal), TRUE);
-#ifdef HAVE_VTE_TERMINAL_SET_OPACITY
           vte_terminal_set_opacity (VTE_TERMINAL (screen->terminal), 0xFFFF);
         }
-#endif
     }
 
   GDK_THREADS_LEAVE ();

Modified: terminal/trunk/terminal/terminal-widget.h
===================================================================
--- terminal/trunk/terminal/terminal-widget.h	2009-06-27 19:29:41 UTC (rev 30094)
+++ terminal/trunk/terminal/terminal-widget.h	2009-06-27 19:30:39 UTC (rev 30095)
@@ -33,11 +33,6 @@
 #define TERMINAL_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_WIDGET))
 #define TERMINAL_WIDGET_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_WIDGET, TerminalWidgetClass))
 
-/* VTE_CHECK_VERSION is available since VTE 0.17.1 */
-#ifndef VTE_CHECK_VERSION
-#define VTE_CHECK_VERSION(major,minor,micro) (0)
-#endif
-
 typedef struct _TerminalWidget      TerminalWidget;
 typedef struct _TerminalWidgetClass TerminalWidgetClass;
 

Modified: terminal/trunk/terminal/terminal-window.c
===================================================================
--- terminal/trunk/terminal/terminal-window.c	2009-06-27 19:29:41 UTC (rev 30094)
+++ terminal/trunk/terminal/terminal-window.c	2009-06-27 19:30:39 UTC (rev 30095)
@@ -205,9 +205,7 @@
 
 
 static guint window_signals[LAST_SIGNAL];
-#if GTK_CHECK_VERSION (2,12,0)
 static gconstpointer window_notebook_group = "Terminal";
-#endif
 
 
 
@@ -397,11 +395,8 @@
   exo_binding_new (G_OBJECT (window->preferences), "misc-tab-position", G_OBJECT (window->notebook), "tab-pos");
 
   /* set the notebook group id */
-#if GTK_CHECK_VERSION (2,12,0)
-  gtk_notebook_set_group (GTK_NOTEBOOK (window->notebook), (gpointer) window_notebook_group);
-#else
-  gtk_notebook_set_group_id (GTK_NOTEBOOK (window->notebook), 1);
-#endif
+  gtk_notebook_set_group (GTK_NOTEBOOK (window->notebook), 
+                          (gpointer) window_notebook_group);
 
   /* signals */
   g_signal_connect (G_OBJECT (window->notebook), "notify::page",
@@ -412,10 +407,8 @@
                     G_CALLBACK (terminal_window_page_removed), window);
   g_signal_connect (G_OBJECT (window->notebook), "page-added",
                     G_CALLBACK (terminal_window_page_added), window);
-#if GTK_CHECK_VERSION (2,12,0)
   g_signal_connect (G_OBJECT (window->notebook), "create-window",
                     G_CALLBACK (terminal_window_page_detach), window);
-#endif
 
   gtk_box_pack_start (GTK_BOX (vbox), window->notebook, TRUE, TRUE, 0);
   gtk_widget_show (window->notebook);




More information about the Xfce4-commits mailing list