[packages/mate-applets] use libwnck not libmatewnck

glen glen at pld-linux.org
Thu Mar 14 20:42:43 CET 2013


commit 76dc4f5247e96fc1666994cacb05b72f3a56fcd2
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Mar 14 21:07:38 2013 +0200

    use libwnck not libmatewnck

 mate-applets.spec |   6 +-
 use-libwnck.patch | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 209 insertions(+), 2 deletions(-)
---
diff --git a/mate-applets.spec b/mate-applets.spec
index e732ae9..a611a43 100644
--- a/mate-applets.spec
+++ b/mate-applets.spec
@@ -13,7 +13,7 @@ Summary(ru.UTF-8):	Маленькие программы, встраивающи
 Summary(uk.UTF-8):	Маленькі програми, що вбудовуються в панель MATE
 Name:		mate-applets
 Version:	1.5.2
-Release:	0.15
+Release:	0.16
 License:	GPL v2, FDL
 Group:		X11/Applications
 Source0:	http://pub.mate-desktop.org/releases/1.5/%{name}-%{version}.tar.xz
@@ -21,6 +21,7 @@ Source0:	http://pub.mate-desktop.org/releases/1.5/%{name}-%{version}.tar.xz
 # check paths in Makefile before removing it!
 #Patch0: m4_fix.patch
 Patch0:		uidir.patch
+Patch1:		use-libwnck.patch
 URL:		https://github.com/mate-desktop/mate-applets
 BuildRequires:	GConf2-devel >= 2.26.0
 BuildRequires:	NetworkManager-devel >= 0.7
@@ -34,7 +35,7 @@ BuildRequires:	glib2-devel >= 1:2.22.0
 BuildRequires:	gtk+2-devel >= 2:2.20.0
 BuildRequires:	intltool >= 0.40.0
 BuildRequires:	libgtop-devel >= 1:2.11.92
-BuildRequires:	libmatewnck-devel >= 1.3.0
+BuildRequires:	libwnck2-devel >= 2.9.3
 BuildRequires:	libnotify-devel >= 0.7.0
 BuildRequires:	libtool
 BuildRequires:	libxml2-devel >= 1:2.5.0
@@ -354,6 +355,7 @@ ale jest przydatny o tyle, że panele są zawsze widoczne.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 NOCONFIGURE=1 ./autogen.sh
diff --git a/use-libwnck.patch b/use-libwnck.patch
new file mode 100644
index 0000000..834f2cf
--- /dev/null
+++ b/use-libwnck.patch
@@ -0,0 +1,205 @@
+reverse patch of:
+
+From c9b9454068f090a7132c6bea6ac07c91843ffb6e Mon Sep 17 00:00:00 2001
+From: Stefano Karapetsas <stefano at karapetsas.com>
+Date: Fri, 8 Jun 2012 17:56:47 +0200
+Subject: [PATCH] port to libmatewnck
+
+diff --git a/README b/README
+index f9677f5..f60a6d4 100644
+--- a/README
++++ b/README
+@@ -27,7 +27,7 @@ You need at least:
+     scroll-keeper-0.1.4
+     libglade-2.4.0
+     libxklavier-1.13
+-    libmatewnck
++    libwnck-2.10.0
+     system-tools-backends-1.1.3
+     libgtop-2.12.0
+ 
+diff --git a/configure.in b/configure.in
+index 32e4be9..0c1b0a5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,7 +20,7 @@ LIBPANEL_REQUIRED=1.1.0
+ LIBPANEL3_REQUIRED=1.1.0
+ LIBGTOP_REQUIRED=2.11.92
+ LIBXKLAVIER_REQUIRED=4.0
+-LIBMATEWNCK_REQUIRED=1.3.0
++LIBWNCK_REQUIRED=2.9.3
+ LIBMATE_DESKTOP_REQUIRED=1.1.0
+ LIBMATENOTIFY_REQUIRED=1.1.0
+ HAL_REQUIRED=0.5.3
+@@ -152,12 +152,12 @@ fi
+ AC_SUBST(MATE_SETTINGS_DAEMON_CFLAGS)
+ AC_SUBST(MATE_SETTINGS_DAEMON_LIBS)
+ 
+-dnl -- check for libmatewnck (required) -------------------------------------------
+-PKG_CHECK_MODULES(LIBMATEWNCK, libmatewnck >= $LIBMATEWNCK_REQUIRED,,
+-	AC_MSG_ERROR([libmatewnck is required to build mate-applets.], 1))
++dnl -- check for libwnck (required) -------------------------------------------
++PKG_CHECK_MODULES(LIBWNCK, libwnck-1.0 >= $LIBWNCK_REQUIRED,,
++	AC_MSG_ERROR([libwnck is required to build mate-applets.], 1))
+ 
+-AC_SUBST(LIBMATEWNCK_CFLAGS)
+-AC_SUBST(LIBMATEWNCK_LIBS)
++AC_SUBST(LIBWNCK_CFLAGS)
++AC_SUBST(LIBWNCK_LIBS)
+ 
+ dnl -- check for libmatenotify (optional) -----------------------------------------
+ LIBMATENOTIFY_CFLAGS=
+--- mate-applets-1.5.2/stickynotes/Makefile.am~	2013-03-14 20:56:12.000000000 +0200
++++ mate-applets-1.5.2/stickynotes/Makefile.am	2013-03-14 20:57:16.245627828 +0200
+@@ -13,7 +13,7 @@
+ 	-I.					\
+ 	-I$(srcdir)				\
+ 	$(MATE_APPLETS4_CFLAGS)		\
+-	$(LIBMATEWNCK_CFLAGS)			\
++	$(LIBWNCK_CFLAGS)			\
+ 	$(XML2_CFLAGS)				\
+ 	-DSTICKYNOTES_MENU_UI_DIR=\""$(uidir)"\"\
+ 	-DSTICKYNOTES_ICONDIR=\"$(datadir)/pixmaps/mate-stickynotes/\"
+@@ -34,7 +34,7 @@
+ 
+ stickynotes_applet_LDADD =	\
+ 	$(MATE_APPLETS4_LIBS)	\
+-	$(LIBMATEWNCK_LIBS)		\
++	$(LIBWNCK_LIBS)		\
+ 	$(XML2_LIBS) \
+ 	-lX11
+ 
+diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c
+index 418115b..1144862 100644
+--- a/stickynotes/stickynotes.c
++++ b/stickynotes/stickynotes.c
+@@ -21,7 +21,8 @@
+ #include <libxml/parser.h>
+ #include <X11/Xatom.h>
+ #include <gdk/gdkx.h>
+-#include <libmatewnck/libmatewnck.h>
++#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
++#include <libwnck/libwnck.h>
+ #include <string.h>
+ 
+ #include "stickynotes.h"
+@@ -36,7 +37,7 @@ static gboolean save_scheduled = FALSE;
+ 
+ static void response_cb (GtkWidget *dialog, gint id, gpointer data);
+ 
+-/* Based on a function found in matewnck */
++/* Based on a function found in wnck */
+ static void
+ set_icon_geometry  (GdkWindow *window,
+                   int        x,
+@@ -661,23 +662,23 @@ stickynote_set_visible (StickyNote *note, gboolean visible)
+ 		else if (note->workspace > 0)
+ 		{
+ #if 0
+-			MatewnckWorkspace *matewnck_ws;
++			WnckWorkspace *wnck_ws;
+ 			gulong xid;
+-			MatewnckWindow *matewnck_win;
+-			MatewnckScreen *matewnck_screen;
++			WnckWindow *wnck_win;
++			WnckScreen *wnck_screen;
+ 
+ 			g_print ("set_visible(): workspace = %i\n",
+ 					note->workspace);
+ 
+ 			xid = GDK_WINDOW_XID (note->w_window->window);
+-			matewnck_screen = matewnck_screen_get_default ();
+-			matewnck_win = matewnck_window_get (xid);
+-			matewnck_ws = matewnck_screen_get_workspace (
+-					matewnck_screen,
++			wnck_screen = wnck_screen_get_default ();
++			wnck_win = wnck_window_get (xid);
++			wnck_ws = wnck_screen_get_workspace (
++					wnck_screen,
+ 					note->workspace - 1);
+-			if (matewnck_win && matewnck_ws)
+-				matewnck_window_move_to_workspace (
+-						matewnck_win, matewnck_ws);
++			if (wnck_win && wnck_ws)
++				wnck_window_move_to_workspace (
++						wnck_win, wnck_ws);
+ 			else
+ 				g_print ("set_visible(): errr\n");
+ #endif
+@@ -744,7 +745,7 @@ void stickynotes_remove(StickyNote *note)
+ gboolean
+ stickynotes_save_now (void)
+ {
+-	MatewnckScreen *matewnck_screen;
++	WnckScreen *wnck_screen;
+ 	const gchar *title;
+ 	GtkTextBuffer *buffer;
+ 	GtkTextIter start, end;
+@@ -759,12 +760,12 @@ stickynotes_save_now (void)
+ 	xmlDocSetRootElement(doc, root);
+ 	xmlNewProp(root, XML_CHAR("version"), XML_CHAR (VERSION));
+ 
+-	matewnck_screen = matewnck_screen_get_default ();
+-	matewnck_screen_force_update (matewnck_screen);
++	wnck_screen = wnck_screen_get_default ();
++	wnck_screen_force_update (wnck_screen);
+ 
+ 	/* For all sticky notes */
+ 	for (i = 0; i < g_list_length(stickynotes->notes); i++) {
+-		MatewnckWindow *matewnck_win;
++		WnckWindow *wnck_win;
+ 		gulong xid = 0;
+ 
+ 		/* Access the current note in the list */
+@@ -758,13 +758,13 @@
+ 		gchar *y_str = g_strdup_printf("%d", note->y);
+ 
+ 		xid = GDK_WINDOW_XID (gtk_widget_get_window (note->w_window));
+-		matewnck_win = matewnck_window_get (xid);
++		wnck_win = wnck_window_get (xid);
+ 
+ 		if (!g_settings_get_boolean (stickynotes->settings, "sticky") &&
+-			matewnck_win)
++			wnck_win)
+ 			note->workspace = 1 +
+-				matewnck_workspace_get_number (
+-				matewnck_window_get_workspace (matewnck_win));
++				wnck_workspace_get_number (
++				wnck_window_get_workspace (wnck_win));
+ 		else
+ 			note->workspace = 0;
+ 
+@@ -875,7 +876,7 @@ stickynotes_load (GdkScreen *screen)
+ 	xmlDocPtr doc = NULL;
+ 	xmlNodePtr root;
+ 	xmlNodePtr node;
+-	/* MatewnckScreen *matewnck_screen; */
++	/* WnckScreen *wnck_screen; */
+ 	GList *new_notes, *tmp1;  /* Lists of StickyNote*'s */
+ 	GList *new_nodes; /* Lists of xmlNodePtr's */
+ 	int x, y, w, h;
+@@ -1063,8 +1064,8 @@ stickynotes_load (GdkScreen *screen)
+ 
+ 	tmp1 = new_notes;
+ 	/*
+-	matewnck_screen = matewnck_screen_get_default ();
+-	matewnck_screen_force_update (matewnck_screen);
++	wnck_screen = wnck_screen_get_default ();
++	wnck_screen_force_update (wnck_screen);
+ 	*/
+ 
+ 	while (tmp1)
+diff --git a/stickynotes/stickynotes.h b/stickynotes/stickynotes.h
+index 2e2f3b3..0e64c73 100644
+--- a/stickynotes/stickynotes.h
++++ b/stickynotes/stickynotes.h
+@@ -20,7 +20,8 @@
+ #ifndef __STICKYNOTES_H__
+ #define __STICKYNOTES_H__
+ 
+-#include <libmatewnck/libmatewnck.h>
++#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
++#include <libwnck/libwnck.h>
+ #include <stickynotes_applet.h>
+ 
+ typedef struct
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mate-applets.git/commitdiff/163a24458663377dbdf91351536ab1862d8d8fb0



More information about the pld-cvs-commit mailing list