summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/clock/clock-face.c3
-rw-r--r--applets/notification_area/na-tray-child.c12
-rw-r--r--applets/wncklet/window-list.c12
-rw-r--r--distro/archlinux/PKGBUILD39
-rw-r--r--distro/archlinux/mate-panel.install31
-rw-r--r--libmate-panel-applet/mate-panel-applet.c4
-rw-r--r--mate-panel/panel-addto.c17
-rw-r--r--mate-panel/panel-force-quit.c4
-rw-r--r--mate-panel/panel-xutils.c12
-rw-r--r--mate-panel/xstuff.c4
10 files changed, 68 insertions, 70 deletions
diff --git a/applets/clock/clock-face.c b/applets/clock/clock-face.c
index fe944a12..333af62f 100644
--- a/applets/clock/clock-face.c
+++ b/applets/clock/clock-face.c
@@ -224,6 +224,9 @@ draw (GtkWidget *this, cairo_t *cr)
cairo_stroke (cr);
cairo_restore (cr);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ return FALSE;
+#endif
}
#if !GTK_CHECK_VERSION (3, 0, 0)
diff --git a/applets/notification_area/na-tray-child.c b/applets/notification_area/na-tray-child.c
index 93ac4bb8..d214f587 100644
--- a/applets/notification_area/na-tray-child.c
+++ b/applets/notification_area/na-tray-child.c
@@ -308,7 +308,11 @@ na_tray_child_new (GdkScreen *screen,
gdk_error_trap_push ();
result = XGetWindowAttributes (xdisplay, icon_window,
&window_attributes);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
if (!result) /* Window already gone */
return NULL;
@@ -508,7 +512,11 @@ na_tray_child_force_redraw (NaTrayChild *child)
* since that is asynchronous.
*/
XSync (xdisplay, False);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
#else
/* Hiding and showing is the safe way to do it, but can result in more
* flickering.
@@ -552,7 +560,11 @@ _get_wmclass (Display *xdisplay,
gdk_error_trap_push ();
XGetClassHint (xdisplay, xwindow, &ch);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
if (res_class)
*res_class = NULL;
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 561658df..dfa571fb 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -331,14 +331,22 @@ static void setup_gsettings(TasklistData* tasklist)
tasklist);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+static void applet_size_allocate(GtkWidget *widget, GtkAllocation *allocation, TasklistData *tasklist)
+#else
static void applet_size_request(GtkWidget* widget, GtkRequisition* requisition, TasklistData* tasklist)
+#endif
{
int len;
const int* size_hints;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GtkRequisition child_req;
+#endif
WnckTasklist* wncktl = WNCK_TASKLIST(tasklist->tasklist);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_get_child_requisition(tasklist->applet, &child_req);
+#endif
size_hints = wnck_tasklist_get_size_hint_list(wncktl, &len);
g_assert(len % 2 == 0);
@@ -447,7 +455,11 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
g_signal_connect(G_OBJECT(tasklist->tasklist), "destroy", G_CALLBACK(destroy_tasklist), tasklist);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_signal_connect(G_OBJECT(tasklist->applet), "size_allocate", G_CALLBACK(applet_size_allocate), tasklist);
+#else
g_signal_connect(G_OBJECT(tasklist->applet), "size_request", G_CALLBACK(applet_size_request), tasklist);
+#endif
tasklist_update(tasklist);
gtk_widget_show(tasklist->tasklist);
diff --git a/distro/archlinux/PKGBUILD b/distro/archlinux/PKGBUILD
deleted file mode 100644
index f4cedfac..00000000
--- a/distro/archlinux/PKGBUILD
+++ /dev/null
@@ -1,39 +0,0 @@
-pkgname=mate-panel
-pkgver=1.1.1
-pkgrel=1
-pkgdesc="The MATE Panel"
-arch=('i686' 'x86_64')
-license=('GPL')
-depends=('libmatewnck' 'mate-conf' 'mate-menus' 'mate-desktop' 'librsvg' 'hicolor-icon-theme' 'libcanberra' 'libmatecomponentui' 'libmateweather') # 'evolution-data-server'
-makedepends=('mate-doc-utils' 'pkgconfig' 'intltool' 'networkmanager')
-options=('!emptydirs' '!libtool')
-install=mate-panel.install
-source=()
-sha256sums=()
-url="http://matsusoft.com.ar/projects/mate/"
-groups=('mate')
-
-build() {
- cd "${srcdir}/../../../"
-
- PYTHON=/usr/bin/python2 ./autogen.sh \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --disable-static \
- --libexecdir=/usr/lib/mate-panel \
- --disable-scrollkeeper \
- --enable-introspection \
- --enable-matecomponent || return 1
- make || return 1
-}
-
-package() {
- cd "${srcdir}/../../../"
-
- make MATECONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install || return 1
-
- install -m755 -d "${pkgdir}/usr/share/mateconf/schemas"
- mateconf-merge-schema "${pkgdir}/usr/share/mateconf/schemas/${pkgname}.schemas" --domain ${pkgname} ${pkgdir}/etc/mateconf/schemas/*.schemas || return 1
- rm -f ${pkgdir}/etc/mateconf/schemas/*.schemas
-}
diff --git a/distro/archlinux/mate-panel.install b/distro/archlinux/mate-panel.install
deleted file mode 100644
index 67255325..00000000
--- a/distro/archlinux/mate-panel.install
+++ /dev/null
@@ -1,31 +0,0 @@
-pkgname=mate-panel
-
-post_install() {
- MATECONF_CONFIG_SOURCE=`usr/bin/mateconftool-2 --get-default-source`
- usr/bin/mateconftool-2 --config-source="${MATECONF_CONFIG_SOURCE}" --direct --load \
- etc/mateconf/schemas/panel-default-setup.entries >/dev/null
- usr/sbin/mateconfpkg --install ${pkgname}
-
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-}
-
-pre_upgrade() {
- pre_remove $1
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- MATECONF_CONFIG_SOURCE=`usr/bin/mateconftool-2 --get-default-source`
-
- usr/bin/mateconftool-2 --config-source="${MATECONF_CONFIG_SOURCE}" --direct --unload \
- etc/mateconf/schemas/panel-default-setup.entries > /dev/null
-
- usr/sbin/mateconfpkg --uninstall ${pkgname}
-}
-
-post_remove() {
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-}
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index 33ec6f15..3c03bfd1 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -961,7 +961,11 @@ mate_panel_applet_button_event (GtkWidget *widget,
False, NoEventMask, &xevent);
gdk_flush ();
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
return TRUE;
}
diff --git a/mate-panel/panel-addto.c b/mate-panel/panel-addto.c
index 77e915e0..1841d1c8 100644
--- a/mate-panel/panel-addto.c
+++ b/mate-panel/panel-addto.c
@@ -1223,7 +1223,9 @@ panel_addto_dialog_new (PanelWidget *panel_widget)
{
PanelAddtoDialog *dialog;
GtkWidget *dialog_vbox;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GtkWidget *vbox;
+#endif
GtkWidget *inner_vbox;
GtkWidget *find_hbox;
GtkWidget *sw;
@@ -1268,19 +1270,30 @@ panel_addto_dialog_new (PanelWidget *panel_widget)
gtk_container_set_border_width (GTK_CONTAINER (dialog->addto_dialog), 5);
dialog_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog->addto_dialog));
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_box_set_spacing (GTK_BOX (dialog_vbox), 12);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog_vbox), 5);
+#else
gtk_box_set_spacing (GTK_BOX (dialog_vbox), 2);
+#endif
g_signal_connect (G_OBJECT (dialog->addto_dialog), "response",
G_CALLBACK (panel_addto_dialog_response), dialog);
g_signal_connect (dialog->addto_dialog, "destroy",
G_CALLBACK (panel_addto_dialog_destroy), dialog);
+#if !GTK_CHECK_VERSION (3, 0, 0)
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
gtk_container_add (GTK_CONTAINER (dialog_vbox), vbox);
+#endif
inner_vbox = gtk_vbox_new (FALSE, 6);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_box_pack_start (GTK_BOX (dialog_vbox), inner_vbox, TRUE, TRUE, 0);
+#else
gtk_box_pack_start (GTK_BOX (vbox), inner_vbox, TRUE, TRUE, 0);
+#endif
find_hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (inner_vbox), find_hbox, FALSE, FALSE, 0);
@@ -1362,7 +1375,11 @@ panel_addto_dialog_new (PanelWidget *panel_widget)
gtk_container_add (GTK_CONTAINER (sw), dialog->tree_view);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_show_all (dialog_vbox);
+#else
gtk_widget_show_all (vbox);
+#endif
panel_toplevel_push_autohide_disabler (dialog->panel_widget->toplevel);
panel_widget_register_open_dialog (panel_widget,
diff --git a/mate-panel/panel-force-quit.c b/mate-panel/panel-force-quit.c
index b86517e4..34fd8ee2 100644
--- a/mate-panel/panel-force-quit.c
+++ b/mate-panel/panel-force-quit.c
@@ -194,7 +194,11 @@ kill_window_response (GtkDialog *dialog,
gdk_error_trap_push ();
XKillClient (display, window);
gdk_flush ();
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
}
gtk_widget_destroy (GTK_WIDGET (dialog));
diff --git a/mate-panel/panel-xutils.c b/mate-panel/panel-xutils.c
index e970fb37..ccf68116 100644
--- a/mate-panel/panel-xutils.c
+++ b/mate-panel/panel-xutils.c
@@ -86,7 +86,11 @@ panel_xutils_set_window_type (GdkWindow *gdk_window,
XChangeProperty (display, window, net_wm_window_type,
XA_ATOM, 32, PropModeReplace,
(guchar *) &atoms, i);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
}
enum {
@@ -159,7 +163,11 @@ panel_xutils_set_strut (GdkWindow *gdk_window,
XChangeProperty (display, window, net_wm_strut_partial,
XA_CARDINAL, 32, PropModeReplace,
(guchar *) &struts, 12);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
}
void
@@ -181,7 +189,11 @@ panel_warp_pointer (GdkWindow *gdk_window,
gdk_error_trap_push ();
XWarpPointer (display, None, window, 0, 0, 0, 0, x, y);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
}
guint
diff --git a/mate-panel/xstuff.c b/mate-panel/xstuff.c
index 2b54e293..d31f6d97 100644
--- a/mate-panel/xstuff.c
+++ b/mate-panel/xstuff.c
@@ -225,7 +225,11 @@ xstuff_set_pos_size (GdkWindow *window, int x, int y, int w, int h)
gdk_window_move_resize (window, x, y, w, h);
gdk_flush ();
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
g_object_set_data (G_OBJECT (window), "xstuff-cached-x", GINT_TO_POINTER (x));
g_object_set_data (G_OBJECT (window), "xstuff-cached-y", GINT_TO_POINTER (y));