[Libreoffice-commits] .: Branch 'feature/unitymenus-master' - vcl/inc vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Nov 14 04:14:27 PST 2012
vcl/inc/unx/gtk/gtksalmenu.hxx | 6 +++---
vcl/unx/gtk/window/gtkframe.cxx | 11 ++++++-----
2 files changed, 9 insertions(+), 8 deletions(-)
New commits:
commit 7f4070489e4b072b8b2707f21a9a7bb18abd4665
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed Nov 14 12:13:42 2012 +0000
try to cleanup compile / version conditionals variously.
Change-Id: I5faf229676a643ef6e4b863d3b1c23859d2ef925
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 03aa700..04a54d0 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -31,16 +31,16 @@
#include <unx/gtk/gtkframe.hxx>
#if defined(ENABLE_DBUS) && defined(ENABLE_GIO)
-# ifdef GLIB_AVAILABLE_IN_2_32
+# if GLIB_MAJOR_VERSION > 2 && GLIB_MINOR_VERSION >= 32
# define ENABLE_GMENU_INTEGRATION
# endif
# include <unx/gtk/glomenu.h>
# include <unx/gtk/gloactiongroup.h>
#else
-# ifndef GLIB_AVAILABLE_IN_2_32
+# if GLIB_MAJOR_VERSION > 2 && GLIB_MINOR_VERSION >= 32
typedef void GMenuModel;
# endif
-# ifndef GLIB_AVAILABLE_IN_2_28
+# if GLIB_MAJOR_VERSION > 2 && GLIB_MINOR_VERSION >= 28
typedef void GActionGroup;
# endif
#endif
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index c4fa0df..5736413 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -481,12 +481,14 @@ GtkSalFrame::GtkSalFrame( SystemParentData* pSysData )
Init( pSysData );
}
-#if !GTK_CHECK_VERSION(3,0,0) && defined(ENABLE_DBUS) && defined(ENABLE_GIO)
+#ifdef ENABLE_GMENU_INTEGRATION
+
static void
gdk_x11_window_set_utf8_property (GdkWindow *window,
const gchar *name,
const gchar *value)
{
+#if !GTK_CHECK_VERSION(3,0,0)
GdkDisplay* display = gdk_window_get_display (window);
if (value != NULL)
@@ -503,12 +505,11 @@ gdk_x11_window_set_utf8_property (GdkWindow *window,
GDK_WINDOW_XID (window),
gdk_x11_get_xatom_by_name_for_display (display, name));
}
-}
#endif
+}
// AppMenu watch functions.
-#ifdef ENABLE_GMENU_INTEGRATION
static void ObjectDestroyedNotify( gpointer data )
{
if ( data ) {
@@ -518,7 +519,7 @@ static void ObjectDestroyedNotify( gpointer data )
static void hud_activated( gboolean hud_active, gpointer user_data )
{
- if ( hud_activated )
+ if ( hud_active )
{
SolarMutexGuard aGuard;
GtkSalFrame* pSalFrame = reinterpret_cast< GtkSalFrame* >( user_data );
@@ -1135,7 +1136,7 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
#if !GTK_CHECK_VERSION(3,0,0)
if( eWinType == GTK_WINDOW_TOPLEVEL )
{
-#if defined(ENABLE_DBUS) && defined(ENABLE_GIO)
+#ifdef ENABLE_GMENU_INTEGRATION
// Enable DBus native menu if available.
ensure_dbus_setup( this );
#endif
More information about the Libreoffice-commits
mailing list