Simplify build with Gtk+ 3

This commit is contained in:
Pierre Pronchery 2015-10-29 01:39:13 +01:00
parent 18f2aeb195
commit 336c0913e8
2 changed files with 3 additions and 7 deletions

View File

@ -22,6 +22,7 @@
#include <gdk/gdkx.h>
#include <X11/Xatom.h>
#include <System.h>
#include <Desktop.h>
#include "Panel/applet.h"
#define _(string) gettext(string)
@ -118,13 +119,8 @@ static Pager * _pager_init(PanelAppletHelper * helper, GtkWidget ** widget)
}
pager->helper = helper;
orientation = panel_window_get_orientation(helper->window);
#if GTK_CHECK_VERSION(3, 0, 0)
pager->box = gtk_box_new(orientation, 0);
gtk_box_set_homogeneous(GTK_BOX(pager->box), TRUE);
#else
pager->box = (orientation == GTK_ORIENTATION_HORIZONTAL)
? gtk_hbox_new(TRUE, 0) : gtk_vbox_new(TRUE, 0);
#endif
pager->source = g_signal_connect(pager->box, "screen-changed",
G_CALLBACK(_pager_on_screen_changed), pager);
pager->widgets = NULL;

View File

@ -169,8 +169,8 @@ depends=../../include/Panel.h
[pager]
type=plugin
sources=pager.c
cflags=`pkg-config --cflags x11`
ldflags=`pkg-config --libs x11`
cflags=`pkg-config --cflags libDesktop x11`
ldflags=`pkg-config --libs libDesktop x11`
install=$(LIBDIR)/Panel/applets
[pager.c]