[Xfce4-commits] <xfce4-places-plugin:master> port-to-libxfce4ui.patch
Andrzej
noreply at xfce.org
Mon Apr 2 21:42:05 CEST 2012
Updating branch refs/heads/master
to 3479fe61dab59a90a6c89602d4d3a05fd1f26654 (commit)
from 3644278ef2f614b7655705f20dc624b4299f77ee (commit)
commit 3479fe61dab59a90a6c89602d4d3a05fd1f26654
Author: Andrzej <ndrwrdck at gmail.com>
Date: Tue Apr 3 04:23:15 2012 +0900
port-to-libxfce4ui.patch
Xfce #7317
(committer comment: changed configure.in into configure.in.in)
configure.in.in | 23 ++++++++++++++++-------
panel-plugin/Makefile.am | 4 ++--
panel-plugin/button.c | 3 +--
panel-plugin/cfg.c | 15 +++++++--------
panel-plugin/cfg.h | 2 +-
panel-plugin/places.c | 2 +-
panel-plugin/support.c | 5 +++--
panel-plugin/view.c | 22 ++++++++++++++++------
panel-plugin/view.h | 2 +-
9 files changed, 48 insertions(+), 30 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 44d231a..8dc4953 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -15,21 +15,30 @@ AM_MAINTAINER_MODE()
dnl check for basic programs
AC_PROG_CC()
+AM_PROG_CC_C_O
AC_PROG_INSTALL()
AC_PROG_LIBTOOL()
AC_PROG_INTLTOOL()
dnl check for required packages
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.90.2])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.90.2])
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.90.2])
-XDT_CHECK_PACKAGE([THUNAR_VFS], [thunar-vfs-1], [0.3.2])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.22.0])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.22.0])
+XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.22.0])
+XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.22.0])
+XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.22.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5.0])
XDT_CHECK_LIBX11()
-dnl check for optional packages/versions
-XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4PANEL_46], [libxfce4panel-1.0], [4.5.92], [libxfce4panel46], [Take advantage of Xfce 4.6 panel changes])
+XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.22.0], [gio-unix],
+ [gio-unix, for special treatment of mount points on UNIX])
+
+dnl *** Optional support for libnotify ***
+XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.4.0], [notifications],
+ [Mount notification support], [yes])
dnl check for i18n support
XDT_I18N([@LINGUAS@])
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 63e2027..ab2dee4 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -50,14 +50,14 @@ xfce4_places_plugin_CFLAGS = \
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
$(GTK_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
- $(LIBXFCEGUI4_CFLAGS) \
+ $(LIBXFCE4UI_CFLAGS) \
$(LIBXFCE4PANEL_CFLAGS) \
$(THUNAR_VFS_CFLAGS) \
$(PLATFORM_CFLAGS)
xfce4_places_plugin_LDADD = \
$(LIBXFCE4UTIL_LIBS) \
- $(LIBXFCEGUI4_LIBS) \
+ $(LIBXFCE4UI_LIBS) \
$(LIBXFCE4PANEL_LIBS) \
$(LIBX11_LIBS) \
@THUNAR_VFS_LIBS@
diff --git a/panel-plugin/button.c b/panel-plugin/button.c
index 8a4a0be..5bb3f0e 100644
--- a/panel-plugin/button.c
+++ b/panel-plugin/button.c
@@ -50,8 +50,7 @@
#endif
#include <gtk/gtk.h>
-#include <libxfce4panel/xfce-panel-plugin.h>
-#include <libxfce4panel/xfce-hvbox.h>
+#include <libxfce4panel/libxfce4panel.h>
#include <string.h>
#define EXO_API_SUBJECT_TO_CHANGE
diff --git a/panel-plugin/cfg.c b/panel-plugin/cfg.c
index dcc395e..482074f 100644
--- a/panel-plugin/cfg.c
+++ b/panel-plugin/cfg.c
@@ -28,9 +28,8 @@
#include <gtk/gtk.h>
#include <libxfce4util/libxfce4util.h>
-#include <libxfce4panel/xfce-panel-plugin.h>
-#include <libxfce4panel/xfce-panel-convenience.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4panel/libxfce4panel.h>
+#include <libxfce4ui/libxfce4ui.h>
#include "cfg.h"
#include "view.h"
@@ -345,7 +344,7 @@ places_cfg_open_dialog(PlacesCfg *cfg)
vbox_button = gtk_vbox_new(FALSE, 4);
gtk_widget_show(vbox_button);
- frame_button = xfce_create_framebox_with_content(_("Button"), vbox_button);
+ frame_button = xfce_gtk_frame_box_new_with_content(_("Button"), vbox_button);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame_button, FALSE, FALSE, 0);
@@ -402,7 +401,7 @@ places_cfg_open_dialog(PlacesCfg *cfg)
vbox_menu = gtk_vbox_new(FALSE, 4);
gtk_widget_show(vbox_menu);
- frame_menu = xfce_create_framebox_with_content(_("Menu"), vbox_menu);
+ frame_menu = xfce_gtk_frame_box_new_with_content(_("Menu"), vbox_menu);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame_menu, FALSE, FALSE, 0);
/* MENU: Show Icons */
@@ -484,7 +483,7 @@ places_cfg_open_dialog(PlacesCfg *cfg)
gtk_widget_set_sensitive(vbox_recent, cfg->show_recent);
g_object_set_data(G_OBJECT(tmp_widget), "cfg_transient", vbox_recent);
- frame_recent = xfce_create_framebox_with_content(_("Recent Documents"), vbox_recent);
+ frame_recent = xfce_gtk_frame_box_new_with_content(_("Recent Documents"), vbox_recent);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame_recent, FALSE, FALSE, 0);
/* RECENT DOCUMENTS: Show clear option */
@@ -523,7 +522,7 @@ places_cfg_open_dialog(PlacesCfg *cfg)
vbox_search = gtk_vbox_new(FALSE, 4);
gtk_widget_show(vbox_search);
- frame_search = xfce_create_framebox_with_content(_("Search"), vbox_search);
+ frame_search = xfce_gtk_frame_box_new_with_content(_("Search"), vbox_search);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dlg)->vbox), frame_search, FALSE, FALSE, 0);
/* Search: command */
@@ -545,7 +544,7 @@ places_cfg_open_dialog(PlacesCfg *cfg)
gtk_widget_show(tmp_widget);
gtk_box_pack_start(GTK_BOX(tmp_box), tmp_widget, FALSE, FALSE, 0);
- gtk_widget_show(dlg);
+ gtk_widget_show_all(dlg);
}
/********** Initialization & Finalization **********/
diff --git a/panel-plugin/cfg.h b/panel-plugin/cfg.h
index 18994dd..a0e5f9a 100644
--- a/panel-plugin/cfg.h
+++ b/panel-plugin/cfg.h
@@ -23,7 +23,7 @@
#define _XFCE_PANEL_PLACES_CFG_H
#include <glib.h>
-#include <libxfce4panel/xfce-panel-plugin.h>
+#include <libxfce4panel/libxfce4panel.h>
#include "view.h"
typedef struct
diff --git a/panel-plugin/places.c b/panel-plugin/places.c
index d0c72bc..4fe3557 100644
--- a/panel-plugin/places.c
+++ b/panel-plugin/places.c
@@ -26,7 +26,7 @@
#include <glib.h>
#include <libxfce4util/libxfce4util.h>
-#include <libxfce4panel/xfce-panel-plugin.h>
+#include <libxfce4panel/libxfce4panel.h>
#include "places.h"
#include "view.h"
diff --git a/panel-plugin/support.c b/panel-plugin/support.c
index 104a5e6..c3c1e9d 100644
--- a/panel-plugin/support.c
+++ b/panel-plugin/support.c
@@ -29,7 +29,7 @@
#include <glib.h>
#include <libxfce4util/libxfce4util.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4ui/libxfce4ui.h>
#define EXO_API_SUBJECT_TO_CHANGE
#include <exo/exo.h>
@@ -125,7 +125,8 @@ void
places_gui_exec(const gchar *cmd)
{
if(cmd != NULL && *cmd != '\0')
- xfce_exec(cmd, FALSE, TRUE, NULL);
+ xfce_spawn_command_line_on_screen(gdk_screen_get_default(),
+ cmd, FALSE, TRUE, NULL);
}
static void
diff --git a/panel-plugin/view.c b/panel-plugin/view.c
index 9358a4d..dd3a2f7 100644
--- a/panel-plugin/view.c
+++ b/panel-plugin/view.c
@@ -49,10 +49,8 @@
#define USE_GTK_TOOLTIP_API GTK_CHECK_VERSION(2,12,0)
#include <libxfce4util/libxfce4util.h>
-#include <libxfce4panel/xfce-panel-plugin.h>
-#include <libxfce4panel/xfce-panel-convenience.h>
-#include <libxfce4panel/xfce-hvbox.h>
-#include <libxfcegui4/libxfcegui4.h>
+#include <libxfce4panel/libxfce4panel.h>
+#include <libxfce4ui/libxfce4ui.h>
#define EXO_API_SUBJECT_TO_CHANGE
#include <exo/exo.h>
@@ -511,7 +509,7 @@ pview_add_menu_item(PlacesView *view, PlacesBookmark *bookmark)
icon_size = MAX(width, height);
else
icon_size = 32;
- pb = xfce_themed_icon_load(bookmark->icon, icon_size);
+ pb = xfce_panel_pixbuf_from_source(bookmark->icon, NULL, icon_size);
if(G_LIKELY(pb != NULL)){
image = gtk_image_new_from_pixbuf(pb);
@@ -739,7 +737,19 @@ pview_open_menu(PlacesView *pd)
static GdkPixbuf*
pview_pixbuf_factory(gint size)
{
- return xfce_themed_icon_load_category(2, size);
+ static const gchar *icons[] = { "system-file-manager",
+ "xfce-filemanager",
+ "file-manager",
+ "folder",
+ NULL };
+ int i = 0;
+ GdkPixbuf *pb = NULL;
+
+ while (icons[i] && !pb) {
+ pb = xfce_panel_pixbuf_from_source(icons[i], NULL, size);
+ i++;
+ }
+ return pb;
}
static void
diff --git a/panel-plugin/view.h b/panel-plugin/view.h
index 1634e0e..12ac0d5 100644
--- a/panel-plugin/view.h
+++ b/panel-plugin/view.h
@@ -25,7 +25,7 @@
#include <glib.h>
#include <gtk/gtk.h>
-#include <libxfce4panel/xfce-panel-plugin.h>
+#include <libxfce4panel/libxfce4panel.h>
#define USE_RECENT_DOCUMENTS GTK_CHECK_VERSION(2,10,0)
More information about the Xfce4-commits
mailing list