[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 03/41: Require Xfce 4.11.
noreply at xfce.org
noreply at xfce.org
Sat Aug 20 18:32:17 CEST 2016
This is an automated email from the git hooks/post-receive script.
gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit fcf0d5c328c772887fbccb413b5db263b10c7a60
Author: Graeme Gott <graeme at gottcode.org>
Date: Sun Aug 7 08:08:25 2016 -0400
Require Xfce 4.11.
---
panel-plugin/CMakeLists.txt | 17 +++++++----------
panel-plugin/plugin.cpp | 31 +------------------------------
panel-plugin/plugin.h | 6 +-----
3 files changed, 9 insertions(+), 45 deletions(-)
diff --git a/panel-plugin/CMakeLists.txt b/panel-plugin/CMakeLists.txt
index 2e2b564..cc92a64 100644
--- a/panel-plugin/CMakeLists.txt
+++ b/panel-plugin/CMakeLists.txt
@@ -16,9 +16,9 @@ find_package(GTK2 REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(exo REQUIRED exo-1)
pkg_check_modules(garcon REQUIRED garcon-1)
-pkg_check_modules(libxfce4panel REQUIRED libxfce4panel-1.0>=4.7)
-pkg_check_modules(libxfce4ui REQUIRED libxfce4ui-1>=4.7)
-pkg_check_modules(libxfce4util REQUIRED libxfce4util-1.0>=4.7)
+pkg_check_modules(libxfce4panel REQUIRED libxfce4panel-1.0>=4.11)
+pkg_check_modules(libxfce4ui REQUIRED libxfce4ui-1>=4.11)
+pkg_check_modules(libxfce4util REQUIRED libxfce4util-1.0>=4.11)
include_directories(
${exo_INCLUDE_DIRS}
@@ -56,14 +56,11 @@ if(ENABLE_DEVELOPER_MODE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,defs")
- if(${libxfce4panel_VERSION} VERSION_GREATER "4.9")
- add_definitions(
- -DG_DISABLE_DEPRECATED
- -DGDK_DISABLE_DEPRECATED
- -DGDK_PIXBUF_DISABLE_DEPRECATED
- -DGTK_DISABLE_DEPRECATED)
- endif()
add_definitions(
+ -DG_DISABLE_DEPRECATED
+ -DGDK_DISABLE_DEPRECATED
+ -DGDK_PIXBUF_DISABLE_DEPRECATED
+ -DGTK_DISABLE_DEPRECATED
-DGDK_DISABLE_SINGLE_INCLUDES
-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES
-DGTK_DISABLE_SINGLE_INCLUDES)
diff --git a/panel-plugin/plugin.cpp b/panel-plugin/plugin.cpp
index 5fd9670..7800bb7 100644
--- a/panel-plugin/plugin.cpp
+++ b/panel-plugin/plugin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2014, 2015 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014, 2015, 2016 Graeme Gott <graeme at gottcode.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -153,11 +153,7 @@ Plugin::Plugin(XfcePanelPlugin* plugin) :
// Connect plugin signals to functions
g_signal_connect(plugin, "free-data", G_CALLBACK(whiskermenu_free), this);
g_signal_connect_slot<XfcePanelPlugin*>(plugin, "configure-plugin", &Plugin::configure, this);
-#if (LIBXFCE4PANEL_CHECK_VERSION(4,9,0))
g_signal_connect_slot(plugin, "mode-changed", &Plugin::mode_changed, this);
-#else
- g_signal_connect_slot(plugin, "orientation-changed", &Plugin::orientation_changed, this);
-#endif
g_signal_connect_slot(plugin, "remote-event", &Plugin::remote_event, this);
g_signal_connect_slot<XfcePanelPlugin*>(plugin, "save", &Plugin::save, this);
g_signal_connect_slot<XfcePanelPlugin*>(plugin, "about", &Plugin::show_about, this);
@@ -167,11 +163,7 @@ Plugin::Plugin(XfcePanelPlugin* plugin) :
xfce_panel_plugin_menu_show_configure(plugin);
xfce_panel_plugin_menu_insert_item(plugin, GTK_MENU_ITEM(wm_settings->command[Settings::CommandMenuEditor]->get_menuitem()));
-#if (LIBXFCE4PANEL_CHECK_VERSION(4,9,0))
mode_changed(m_plugin, xfce_panel_plugin_get_mode(m_plugin));
-#else
- orientation_changed(m_plugin, xfce_panel_plugin_get_orientation(m_plugin));
-#endif
g_signal_connect_slot<GtkWidget*,GtkStyle*>(m_button, "style-set", &Plugin::update_size, this);
g_signal_connect_slot<GtkWidget*,GdkScreen*>(m_button, "screen-changed", &Plugin::update_size, this);
@@ -328,19 +320,11 @@ void Plugin::configure()
//-----------------------------------------------------------------------------
-#if (LIBXFCE4PANEL_CHECK_VERSION(4,9,0))
void Plugin::mode_changed(XfcePanelPlugin*, XfcePanelPluginMode mode)
{
gtk_label_set_angle(m_button_label, (mode == XFCE_PANEL_PLUGIN_MODE_VERTICAL) ? 270: 0);
update_size();
}
-#else
-void Plugin::orientation_changed(XfcePanelPlugin*, GtkOrientation orientation)
-{
- gtk_label_set_angle(m_button_label, (orientation == GTK_ORIENTATION_VERTICAL) ? 270: 0);
- update_size();
-}
-#endif
//-----------------------------------------------------------------------------
@@ -407,12 +391,8 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
{
GtkOrientation panel_orientation = xfce_panel_plugin_get_orientation(m_plugin);
GtkOrientation orientation = panel_orientation;
-#if (LIBXFCE4PANEL_CHECK_VERSION(4,9,0))
gint row_size = size / xfce_panel_plugin_get_nrows(m_plugin);
XfcePanelPluginMode mode = xfce_panel_plugin_get_mode(m_plugin);
-#else
- gint row_size = size;
-#endif
// Make icon expand to fill button if title is not visible
gtk_box_set_child_packing(GTK_BOX(m_button_box), GTK_WIDGET(m_button_icon),
@@ -427,7 +407,6 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
GdkScreen* screen = gtk_widget_get_screen(GTK_WIDGET(m_plugin));
GtkIconTheme* icon_theme = G_LIKELY(screen != NULL) ? gtk_icon_theme_get_for_screen(screen) : NULL;
-#if (LIBXFCE4PANEL_CHECK_VERSION(4,9,0))
gint icon_width_max = (mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL) ?
6 * row_size - border :
size - border;
@@ -437,12 +416,6 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
icon_theme,
icon_width_max,
icon_height_max);
-#else
- GdkPixbuf* icon = xfce_panel_pixbuf_from_source(
- wm_settings->button_icon_name.c_str(),
- icon_theme,
- row_size - border);
-#endif
gint icon_width = 0;
if (G_LIKELY(icon != NULL))
{
@@ -451,7 +424,6 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
g_object_unref(G_OBJECT(icon));
}
-#if (LIBXFCE4PANEL_CHECK_VERSION(4,9,0))
if (wm_settings->button_title_visible || !wm_settings->button_single_row)
{
xfce_panel_plugin_set_small(m_plugin, false);
@@ -471,7 +443,6 @@ gboolean Plugin::size_changed(XfcePanelPlugin*, gint size)
{
xfce_panel_plugin_set_small(m_plugin, true);
}
-#endif
// Fix alignment in deskbar mode
if ((panel_orientation == GTK_ORIENTATION_VERTICAL) && (orientation == GTK_ORIENTATION_HORIZONTAL))
diff --git a/panel-plugin/plugin.h b/panel-plugin/plugin.h
index 7611fc9..6667166 100644
--- a/panel-plugin/plugin.h
+++ b/panel-plugin/plugin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013, 2014, 2015 Graeme Gott <graeme at gottcode.org>
+ * Copyright (C) 2013, 2014, 2015, 2016 Graeme Gott <graeme at gottcode.org>
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -63,11 +63,7 @@ private:
void button_toggled(GtkToggleButton* button);
void menu_hidden();
void configure();
-#if (LIBXFCE4PANEL_CHECK_VERSION(4,9,0))
void mode_changed(XfcePanelPlugin*, XfcePanelPluginMode mode);
-#else
- void orientation_changed(XfcePanelPlugin*, GtkOrientation orientation);
-#endif
gboolean remote_event(XfcePanelPlugin*, gchar* name, GValue* value);
void save();
void show_about();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list