]> git.pld-linux.org Git - packages/xfmedia.git/blob - xfmedia-ui.patch
- rel.13
[packages/xfmedia.git] / xfmedia-ui.patch
1 diff -ur xfmedia-0.9.2/config.h.in xfmedia-0.9.2-ui/config.h.in
2 --- xfmedia-0.9.2/config.h.in   2006-11-27 21:20:43.000000000 +0100
3 +++ xfmedia-0.9.2-ui/config.h.in        2011-03-08 12:51:04.550614005 +0100
4 @@ -30,7 +30,7 @@
5  /* Define to 1 if you have the <errno.h> header file. */
6  #undef HAVE_ERRNO_H
7  
8 -/* Define if exo-0.3 >= 0.3.0 present */
9 +/* Define if exo-1 >= 0.6.0 present */
10  #undef HAVE_EXO
11  
12  /* Define to 1 if you have the <fcntl.h> header file. */
13 @@ -141,6 +141,10 @@
14  /* Define if XTEST is present */
15  #undef HAVE_XTESTEXTENSION
16  
17 +/* Define to the sub-directory in which libtool stores uninstalled libraries.
18 +   */
19 +#undef LT_OBJDIR
20 +
21  /* Name of package */
22  #undef PACKAGE
23  
24 @@ -156,6 +160,9 @@
25  /* Define to the one symbol short name of this package. */
26  #undef PACKAGE_TARNAME
27  
28 +/* Define to the home page for this package. */
29 +#undef PACKAGE_URL
30 +
31  /* Define to the version of this package. */
32  #undef PACKAGE_VERSION
33  
34 @@ -165,6 +172,28 @@
35  /* Define to 1 if you have the ANSI C header files. */
36  #undef STDC_HEADERS
37  
38 +/* Enable extensions on AIX 3, Interix.  */
39 +#ifndef _ALL_SOURCE
40 +# undef _ALL_SOURCE
41 +#endif
42 +/* Enable GNU extensions on systems that have them.  */
43 +#ifndef _GNU_SOURCE
44 +# undef _GNU_SOURCE
45 +#endif
46 +/* Enable threading extensions on Solaris.  */
47 +#ifndef _POSIX_PTHREAD_SEMANTICS
48 +# undef _POSIX_PTHREAD_SEMANTICS
49 +#endif
50 +/* Enable extensions on HP NonStop.  */
51 +#ifndef _TANDEM_SOURCE
52 +# undef _TANDEM_SOURCE
53 +#endif
54 +/* Enable general extensions on Solaris.  */
55 +#ifndef __EXTENSIONS__
56 +# undef __EXTENSIONS__
57 +#endif
58 +
59 +
60  /* Version number of package */
61  #undef VERSION
62  
63 @@ -174,13 +203,6 @@
64  /* Define to 1 if the X Window System is missing or not being used. */
65  #undef X_DISPLAY_MISSING
66  
67 -/* Define to 1 if on AIX 3.
68 -   System headers sometimes define this.
69 -   We just want to avoid a redefinition error message.  */
70 -#ifndef _ALL_SOURCE
71 -# undef _ALL_SOURCE
72 -#endif
73 -
74  /* Define to 1 if on MINIX. */
75  #undef _MINIX
76  
77 diff -ur xfmedia-0.9.2/configure.ac xfmedia-0.9.2-ui/configure.ac
78 --- xfmedia-0.9.2/configure.ac  2011-03-08 13:54:02.955352033 +0100
79 +++ xfmedia-0.9.2-ui/configure.ac       2011-03-08 12:51:04.551614005 +0100
80 @@ -106,7 +106,8 @@
81  XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.6.0])
82  XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
83  XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0])
84 -XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0])
85 +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
86 +XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.22])
87  XDT_CHECK_PACKAGE([LIBXINE], [libxine], [1.0.0])
88  
89  dnl look for xine_plugins_garbage_collector().  need to check for a version
90 diff -ur xfmedia-0.9.2/configure.ac.in xfmedia-0.9.2-ui/configure.ac.in
91 --- xfmedia-0.9.2/configure.ac.in       2006-11-27 08:21:25.000000000 +0100
92 +++ xfmedia-0.9.2-ui/configure.ac.in    2011-03-08 12:51:04.587614005 +0100
93 @@ -106,7 +106,8 @@
94  XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.6.0])
95  XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
96  XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0])
97 -XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0])
98 +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
99 +XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.22])
100  XDT_CHECK_PACKAGE([LIBXINE], [libxine], [1.0.0])
101  
102  dnl look for xine_plugins_garbage_collector().  need to check for a version
103 diff -ur xfmedia-0.9.2/src/main.c xfmedia-0.9.2-ui/src/main.c
104 --- xfmedia-0.9.2/src/main.c    2006-11-27 08:21:23.000000000 +0100
105 +++ xfmedia-0.9.2-ui/src/main.c 2011-03-08 12:58:46.847614012 +0100
106 @@ -54,9 +54,10 @@
107  #endif
108  
109  #include <gtk/gtk.h>
110 +#include <gdk/gdkx.h>
111  
112  #include <libxfce4util/libxfce4util.h>
113 -#include <libxfcegui4/libxfcegui4.h>
114 +#include <libxfce4ui/libxfce4ui.h>
115  
116  #ifdef HAVE_LIBSTARTUP_NOTIFICATION
117  #define SN_API_NOT_YET_FROZEN 1
118 @@ -188,7 +189,7 @@
119      if(ctx) {
120          if(!GTK_WIDGET_REALIZED(window))
121              gtk_widget_realize(window);
122 -        sn_launchee_context_setup_window(ctx, GDK_WINDOW_XWINDOW(window->window));
123 +        sn_launchee_context_setup_window(ctx, GDK_WINDOW_XID(window->window));
124          sn_launchee_context_complete(ctx);
125          sn_launchee_context_unref(ctx);
126      }
127 diff -ur xfmedia-0.9.2/src/mainwin.c xfmedia-0.9.2-ui/src/mainwin.c
128 --- xfmedia-0.9.2/src/mainwin.c 2006-11-27 08:21:23.000000000 +0100
129 +++ xfmedia-0.9.2-ui/src/mainwin.c      2011-03-08 12:51:04.589614005 +0100
130 @@ -35,7 +35,7 @@
131  #include <gdk-pixbuf/gdk-pixdata.h>
132  
133  #include <libxfce4util/libxfce4util.h>
134 -#include <libxfcegui4/libxfcegui4.h>
135 +#include <libxfce4ui/libxfce4ui.h>
136  
137  #define EXO_API_SUBJECT_TO_CHANGE
138  #include <exo/exo.h>
139 diff -ur xfmedia-0.9.2/src/mainwin-callbacks.c xfmedia-0.9.2-ui/src/mainwin-callbacks.c
140 --- xfmedia-0.9.2/src/mainwin-callbacks.c       2006-11-27 08:21:23.000000000 +0100
141 +++ xfmedia-0.9.2-ui/src/mainwin-callbacks.c    2011-03-08 12:51:04.591614005 +0100
142 @@ -43,11 +43,7 @@
143  #include <gdk-pixbuf/gdk-pixdata.h>
144  
145  #include <libxfce4util/libxfce4util.h>
146 -#include <libxfcegui4/libxfcegui4.h>
147 -
148 -#if LIBXFCEGUI4_CHECK_VERSION(4, 3, 5)
149 -#define xfce_about_dialog_new xfce_about_dialog_new_with_values
150 -#endif
151 +#include <libxfce4ui/libxfce4ui.h>
152  
153  #define EXO_API_SUBJECT_TO_CHANGE
154  #include <exo/exo.h>
155 @@ -223,8 +219,8 @@
156                  GTK_STOCK_DIALOG_QUESTION, 
157                  _("You have edited this file's metadata."),
158                  _("Changes will be lost unless they are saved.  Do you wish to save changes?"),
159 -                XFCE_CUSTOM_STOCK_BUTTON, _("_Discard Changes"), GTK_STOCK_NO, GTK_RESPONSE_NO,
160 -                XFCE_CUSTOM_STOCK_BUTTON, _("_Save Changes"), GTK_STOCK_YES, GTK_RESPONSE_YES,
161 +                "custom-button-stock", _("_Discard Changes"), GTK_STOCK_NO, GTK_RESPONSE_NO,
162 +                "custom-button-stock", _("_Save Changes"), GTK_STOCK_YES, GTK_RESPONSE_YES,
163                  NULL);
164          if(resp == GTK_RESPONSE_YES)
165              xfmedia_tag_flush(tag_info);
166 @@ -1916,74 +1912,53 @@
167      }
168  }
169  
170 -static const struct
171 -{
172 -    gchar *name;
173 -    gchar *email;
174 -    gchar *langcode;
175 -} translator_list[] = {
176 -    { "Bernhard Walle", "bernhard.walle@gmx.de", "de" },
177 -    { "Piarres Beobide", "pi@beobide.net", "eu" },
178 -    { "Jaime Buffery", "nestu@lunar-linux.org", "es" },
179 -    { "Jari Rahkonen", "jari.rahkonen@pp1.inet.fi", "fi" },
180 -    { "St\303\251phane Roy", "sroy@j2n.net", "fr" },
181 -    { "Collet Etienne", "xanax@no-log.org", "fr" },
182 -    { "lerouge", "lerouge@gmail.com", "fr" },
183 -    { "Ankit Patel", "ankit644@yahoo.com", "gu" },
184 -    { "Atilla Szerv\303\241c", "sas@321.hu", "hu" },
185 -    { "Daichi Kawahata", "daichi@xfce.org", "ja" },
186 -    { "Rimas Kudelis", "rg@akl.lt", "lt" },
187 -    { "Robert Kurowski", "koorek@o2.pl", "pl" },
188 -    { "Tomas Schertel", "tschertel@gmail.com", "pt_BR" },
189 -    { "Juraz Brosz", "juro@jurajbrosz.info", "sk" },
190 -    { "Maxim Dziumanenko", "mvd@softprom.kiev.ua", "uk" },
191 -    { "Phan Vinh Thinh", "teppi@vnlinux.org", "vi" },
192 -    { "Sheng Feng Zhou", "zhoushengfeng@highpoint-tech.com.cn", "zh_CN" },
193 -    { "Hydonsingore Cia", "hydonsingore@mail.educities.edu.tw", "zh_TW" },
194 -    { NULL, NULL, NULL }
195 -};
196 +static const gchar *translators =
197 +    "Bernhard Walle <bernhard.walle@gmx.de> de\n"
198 +    "Piarres Beobide <pi@beobide.net> eu\n"
199 +    "Jaime Buffery <nestu@lunar-linux.org> es\n"
200 +    "Jari Rahkonen <jari.rahkonen@pp1.inet.fi> fi\n"
201 +    "St\303\251phane Roy <sroy@j2n.net> fr\n"
202 +    "Collet Etienne <xanax@no-log.org> fr\n"
203 +    "lerouge <lerouge@gmail.com> fr\n"
204 +    "Ankit Patel <ankit644@yahoo.com> gu\n"
205 +    "Atilla Szerv\303\241c <sas@321.hu> hu\n"
206 +    "Daichi Kawahata <daichi@xfce.org> ja\n"
207 +    "Rimas Kudelis <rg@akl.lt> lt\n"
208 +    "Robert Kurowski <koorek@o2.pl> pl\n"
209 +    "Tomas Schertel <tschertel@gmail.com> pt_BR\n"
210 +    "Juraz Brosz <juro@jurajbrosz.info> sk\n"
211 +    "Maxim Dziumanenko <mvd@softprom.kiev.ua> uk\n"
212 +    "Phan Vinh Thinh <teppi@vnlinux.org> vi\n"
213 +    "Sheng Feng Zhou <zhoushengfeng@highpoint-tech.com.cn> zh_CN\n"
214 +    "Hydonsingore Cia <hydonsingore@mail.educities.edu.tw> zh_TW\n";
215  
216 +static const gchar *auth[] = { "Brian Tarricone <bjt23@cornell.edu> Original Author/Maintainer",
217 +                              NULL };
218  void
219  xfmedia_about_cb(GtkWidget *w, gpointer user_data)
220  {
221      XfmediaMainwin *mwin = user_data;
222 -    XfceAboutInfo *ainfo;
223 -    static GtkWidget *dlg = NULL;
224      GtkWidget *toplevel = NULL;
225 -    gint i;
226 -    gchar *TRANSLATOR = _("Translator"), translator_str[1024];
227 -    
228 -    if(dlg) {
229 -        gtk_window_present(GTK_WINDOW(dlg));
230 -        return;
231 -    }
232      
233      if(w)
234          toplevel = gtk_widget_get_toplevel(w);
235      if(!toplevel)
236          toplevel = mwin->window;
237 -    
238 -    ainfo = xfce_about_info_new("Xfmedia", VERSION " (" REVISION ")",
239 -            _("Xfmedia is a lightweight media player,\nbased on the xine engine"),
240 -            XFCE_COPYRIGHT_TEXT("2004-2005", "Brian Tarricone"), XFCE_LICENSE_GPL);
241 -    xfce_about_info_set_homepage(ainfo, WEBSITE);
242 -    
243 -    xfce_about_info_add_credit(ainfo, "Brian Tarricone", "bjt23@cornell.edu",
244 -            _("Original Author/Maintainer"));
245 -    
246 -    for(i = 0; translator_list[i].name; i++) {
247 -        g_snprintf(translator_str, 1024, "%s (%s)", TRANSLATOR,
248 -                translator_list[i].langcode);
249 -        xfce_about_info_add_credit(ainfo, translator_list[i].name,
250 -                translator_list[i].email, translator_str);
251 -    }
252 -    
253 -    dlg = xfce_about_dialog_new(GTK_WINDOW(toplevel), ainfo, NULL);
254 -    g_signal_connect(G_OBJECT(dlg), "response",
255 -            G_CALLBACK(gtk_widget_destroy), NULL);
256 -    g_signal_connect_swapped(G_OBJECT(dlg), "destroy",
257 -            G_CALLBACK(xfmedia_widget_zero_pointer), &dlg);
258 -    gtk_widget_show_all(dlg);
259 +
260 +#if !GTK_CHECK_VERSION (2, 18, 0)
261 +    gtk_about_dialog_set_email_hook (exo_gtk_url_about_dialog_hook, NULL, NULL);
262 +    gtk_about_dialog_set_url_hook (exo_gtk_url_about_dialog_hook, NULL, NULL);
263 +#endif
264 +    gtk_show_about_dialog(GTK_WINDOW (toplevel),
265 +                          "program-name", "Xfmedia",
266 +                          "license", xfce_get_license_text (XFCE_LICENSE_TEXT_GPL),
267 +                          "version", VERSION " (" REVISION ")",
268 +                          "comments", _("Xfmedia is a lightweight media player,\nbased on the xine engine"),
269 +                          "website", WEBSITE,
270 +                          "copyright", "2004-2005 Brian Tarricone",
271 +                          "authors", auth, 
272 +                          "translator-credits", translators,
273 +                          NULL);
274  }
275  
276  gboolean
277 diff -ur xfmedia-0.9.2/src/Makefile.am xfmedia-0.9.2-ui/src/Makefile.am
278 --- xfmedia-0.9.2/src/Makefile.am       2006-11-27 15:44:03.000000000 +0100
279 +++ xfmedia-0.9.2-ui/src/Makefile.am    2011-03-08 12:55:40.931613981 +0100
280 @@ -51,9 +51,11 @@
281         -DLOCALEDIR=\"$(localedir)\" \
282         -I$(top_srcdir) \
283         -I$(top_srcdir)/xfmedia \
284 +       -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
285         @LIBX11_CFLAGS@ \
286         @LIBXFCE4UTIL_CFLAGS@ \
287 -       @LIBXFCEGUI4_CFLAGS@ \
288 +       @LIBXFCE4UI_CFLAGS@ \
289 +       @LIBWNCK_CFLAGS@ \
290         @LIBSTARTUP_NOTIFICATION_CFLAGS@ \
291         @GTHREAD_CFLAGS@ \
292         @GTK_CFLAGS@ \
293 @@ -72,7 +74,8 @@
294         @LIBX11_LIBS@ \
295         @GTHREAD_LIBS@ \
296         @LIBXFCE4UTIL_LIBS@ \
297 -       @LIBXFCEGUI4_LIBS@ \
298 +       @LIBXFCE4UI_LIBS@ \
299 +       @LIBWNCK_LIBS@ \
300         @EXO_LIBS@ \
301         @LIBSTARTUP_NOTIFICATION_LIBS@ \
302         @LIBXINE_LIBS@ \
303 diff -ur xfmedia-0.9.2/src/mediamarks.c xfmedia-0.9.2-ui/src/mediamarks.c
304 --- xfmedia-0.9.2/src/mediamarks.c      2011-03-08 13:54:02.955352033 +0100
305 +++ xfmedia-0.9.2-ui/src/mediamarks.c   2011-03-08 12:51:04.595614005 +0100
306 @@ -58,7 +58,7 @@
307  #endif
308  #include <gdk/gdkkeysyms.h>
309  #include <gtk/gtk.h>
310 -#include <libxfcegui4/libxfcegui4.h>
311 +#include <libxfce4ui/libxfce4ui.h>
312  
313  #define EXO_API_SUBJECT_TO_CHANGE
314  #include <exo/exo.h>
315 diff -ur xfmedia-0.9.2/src/playlist.c xfmedia-0.9.2-ui/src/playlist.c
316 --- xfmedia-0.9.2/src/playlist.c        2011-03-08 13:54:02.957352033 +0100
317 +++ xfmedia-0.9.2-ui/src/playlist.c     2011-03-08 13:01:33.789501006 +0100
318 @@ -53,7 +53,7 @@
319  #define GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID (-2)
320  #endif
321  
322 -#include <libxfcegui4/libxfcegui4.h>
323 +#include <libxfce4ui/libxfce4ui.h>
324  
325  #define EXO_API_SUBJECT_TO_CHANGE
326  #include <exo/exo.h>
327 @@ -573,7 +573,7 @@
328      
329      return xfce_message_dialog(parent, "Xfmedia", GTK_STOCK_DIALOG_WARNING,
330              primary, secondary,
331 -            XFCE_CUSTOM_STOCK_BUTTON, _("Do_n't save"),
332 +            "custom-button-stock", _("Do_n't save"),
333                  GTK_STOCK_NO, GTK_RESPONSE_NO,
334              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
335              GTK_STOCK_SAVE, GTK_RESPONSE_YES, NULL);
336 @@ -1510,13 +1510,13 @@
337      
338      gtk_icon_size_lookup(GTK_ICON_SIZE_SMALL_TOOLBAR, &iw, &ih);
339      
340 -    pix = xfce_themed_icon_load("media-playlist-shuffle", iw);
341 +    pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-playlist-shuffle", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
342      if(!pix)
343 -        pix = xfce_themed_icon_load("media-shuffle", iw);
344 +        pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-shuffle", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
345      if(!pix)
346 -        pix = xfce_themed_icon_load("stock_media-shuffle", iw);
347 +        pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "stock_media-shuffle", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
348      if(!pix)
349 -        pix = xfce_themed_icon_load("xfmedia-shuffle", iw);
350 +    pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "xfmedia-shuffle", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
351      if(pix) {
352          img = gtk_image_new_from_pixbuf(pix);
353          gtk_widget_show(img);
354 @@ -1531,13 +1531,13 @@
355              G_CALLBACK(xfmedia_playlist_shuffle_toggle_cb), plist);
356      gtk_tooltips_set_tip(ttips, btn, _("Randomize play order"), NULL);
357      
358 -    pix = xfce_themed_icon_load("media-playlist-repeat", iw);
359 +    pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "media-playlist-repeat", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
360      if(!pix)
361 -        pix = xfce_themed_icon_load("repeat", iw);
362 +        pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "repeat", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
363      if(!pix)
364 -        pix = xfce_themed_icon_load("stock_repeat", iw);
365 +        pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "stock_repeat", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
366      if(!pix)
367 -        pix = xfce_themed_icon_load("xfmedia-repeat", iw);
368 +        pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), "xfmedia-repeat", iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
369      if(pix) {
370          img = gtk_image_new_from_pixbuf(pix);
371          gtk_widget_show(img);
372 diff -ur xfmedia-0.9.2/src/settings.c xfmedia-0.9.2-ui/src/settings.c
373 --- xfmedia-0.9.2/src/settings.c        2006-11-27 08:21:23.000000000 +0100
374 +++ xfmedia-0.9.2-ui/src/settings.c     2011-03-08 12:51:04.597614005 +0100
375 @@ -55,7 +55,7 @@
376  #endif
377  
378  #include <libxfce4util/libxfce4util.h>
379 -#include <libxfcegui4/libxfcegui4.h>
380 +#include <libxfce4ui/libxfce4ui.h>
381  
382  #include <xfmedia/xfmedia-settings.h>
383  #include "xfmedia-common.h"
384 diff -ur xfmedia-0.9.2/src/settings-dialog.c xfmedia-0.9.2-ui/src/settings-dialog.c
385 --- xfmedia-0.9.2/src/settings-dialog.c 2006-11-27 08:21:23.000000000 +0100
386 +++ xfmedia-0.9.2-ui/src/settings-dialog.c      2011-03-08 12:51:04.598614005 +0100
387 @@ -38,7 +38,7 @@
388  #include <gtk/gtk.h>
389  
390  #include <libxfce4util/libxfce4util.h>
391 -#include <libxfcegui4/libxfcegui4.h>
392 +#include <libxfce4ui/libxfce4ui.h>
393  
394  #define EXO_API_SUBJECT_TO_CHANGE
395  #include <exo/exo.h>
396 diff -ur xfmedia-0.9.2/src/trayicon.c xfmedia-0.9.2-ui/src/trayicon.c
397 --- xfmedia-0.9.2/src/trayicon.c        2006-11-27 08:21:23.000000000 +0100
398 +++ xfmedia-0.9.2-ui/src/trayicon.c     2011-03-08 13:47:11.275352021 +0100
399 @@ -24,8 +24,8 @@
400  #include <gdk/gdkx.h>
401  #include <gtk/gtk.h>
402  
403 -#include <libxfcegui4/libxfcegui4.h>
404 -#include <libxfcegui4/netk-trayicon.h>
405 +#include <libwnck/libwnck.h>
406 +#include <libxfce4ui/libxfce4ui.h>
407  
408  #include "trayicon.h"
409  #include "xfmedia-common.h"
410 @@ -42,15 +42,13 @@
411  
412  struct _XfmediaTrayIcon
413  {
414 -    GtkWidget *tray_icon;
415 -    GtkWidget *event_box;
416 +    GtkStatusIcon *tray_icon;
417      GtkMenu *menu;
418 -    GtkTooltips *tooltip;
419      gchar *tooltip_str;
420      XfmediaMainwin *mwin;
421  };
422  
423 -static GtkWidget *_xfmedia_tray_icon_create(GdkScreen *gscreen, gpointer cb_data);
424 +static GtkStatusIcon *_xfmedia_tray_icon_create(GdkScreen *gscreen, gpointer cb_data);
425  
426  static gboolean
427  xfmedia_tray_icon_button_press_cb(GtkWidget *w, GdkEventButton *evt,
428 @@ -61,21 +59,21 @@
429      
430      if(evt->button == 1) {
431          if(mwin->is_iconified) {
432 -            NetkWindow *nwin;
433 -            NetkScreen *nscr;
434 -            NetkWorkspace *nws;
435 +            WnckWindow *wwin;
436 +            WnckScreen *wscr;
437 +            WnckWorkspace *wws;
438              
439              gtk_window_deiconify(GTK_WINDOW(mwin->window));
440              
441              /* this next line is lame and probably won't work on multihead, but
442               * netk_window_get() will fail if we don't first force an update */
443 -            netk_screen_force_update(netk_screen_get_default());
444 -            nwin = netk_window_get(GDK_WINDOW_XID(mwin->window->window));
445 -            if(nwin) {
446 -                nscr = netk_window_get_screen(nwin);
447 -                netk_screen_force_update(nscr);
448 -                nws = netk_screen_get_active_workspace(nscr);
449 -                netk_window_move_to_workspace(nwin, nws);
450 +            wnck_screen_force_update(wnck_screen_get_default());
451 +            wwin = wnck_window_get(GDK_WINDOW_XID(mwin->window->window));
452 +            if(wwin) {
453 +                wscr = wnck_window_get_screen(wwin);
454 +                wnck_screen_force_update(wscr);
455 +                wws = wnck_screen_get_active_workspace(wscr);
456 +                wnck_window_move_to_workspace(wwin, wws);
457              }
458          } else
459              gtk_window_iconify(GTK_WINDOW(mwin->window));
460 @@ -149,53 +147,21 @@
461      
462      tray_icon->tray_icon = _xfmedia_tray_icon_create(gscreen, tray_icon);
463      if(tray_icon->tooltip_str) {
464 -        gtk_tooltips_set_tip(tray_icon->tooltip, tray_icon->event_box,
465 -                tray_icon->tooltip_str, NULL);
466 +        gtk_status_icon_set_tooltip(tray_icon->tray_icon, tray_icon->tooltip_str);
467      }
468  }
469  
470 -static GtkWidget *
471 +static GtkStatusIcon *
472  _xfmedia_tray_icon_create(GdkScreen *gscreen, gpointer cb_data)
473  {
474 -    GtkWidget *tray_icon, *evtbox, *img;
475 -    GdkPixbuf *pix, *tmp;
476 -    gint iw, ih;
477 -    
478 -    tray_icon = netk_tray_icon_new(GDK_SCREEN_XSCREEN(gscreen));
479 -    
480 -    evtbox = gtk_event_box_new();
481 -    gtk_widget_add_events(evtbox, GDK_BUTTON_PRESS);
482 -    gtk_widget_show(evtbox);
483 -    gtk_container_add(GTK_CONTAINER(tray_icon), evtbox);
484 -    
485 -    gtk_icon_size_lookup(GTK_ICON_SIZE_LARGE_TOOLBAR, &iw, &ih);
486 -    pix = xfce_themed_icon_load("xfmedia", iw);
487 -    if(!pix) {
488 -        tmp = gdk_pixbuf_from_pixdata(&xfmedia_icon, TRUE, NULL);
489 -        if(tmp && gdk_pixbuf_get_width(tmp) == iw && gdk_pixbuf_get_height(tmp) == ih)
490 -            pix = tmp;
491 -        else if(tmp) {
492 -            pix = gdk_pixbuf_scale_simple(tmp, iw, ih, GDK_INTERP_BILINEAR);
493 -            g_object_unref(G_OBJECT(tmp));
494 -        } else {
495 -            pix = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, iw, ih);
496 -            gdk_pixbuf_fill(pix, 0);
497 -        }
498 -    }
499 -    
500 -    img = gtk_image_new_from_pixbuf(pix);
501 -    g_object_unref(G_OBJECT(pix));
502 -    gtk_widget_show(img);
503 -    gtk_container_add(GTK_CONTAINER(evtbox), img);
504 +    GtkStatusIcon *tray_icon;
505 +
506 +    tray_icon = gtk_status_icon_new_from_icon_name ("xfmedia");
507      
508 -    g_signal_connect(G_OBJECT(evtbox), "button-press-event",
509 +    g_signal_connect(G_OBJECT(tray_icon), "button-press-event",
510                       G_CALLBACK(xfmedia_tray_icon_button_press_cb), cb_data);
511 -    g_signal_connect(G_OBJECT(evtbox), "scroll-event",
512 +    g_signal_connect(G_OBJECT(tray_icon), "scroll-event",
513                       G_CALLBACK(xfmedia_tray_icon_button_scroll_cb), cb_data);
514 -    g_signal_connect(G_OBJECT(tray_icon), "destroy",
515 -                     G_CALLBACK(xfmedia_tray_icon_destroy_cb), cb_data);
516 -    
517 -    gtk_widget_show(tray_icon);
518      
519      return tray_icon;
520  }
521 @@ -209,12 +175,8 @@
522      
523      tray_icon = g_new0(XfmediaTrayIcon, 1);
524      tray_icon->tray_icon = _xfmedia_tray_icon_create(gscreen, tray_icon);
525 -    tray_icon->event_box = gtk_bin_get_child(GTK_BIN(tray_icon->tray_icon));
526      tray_icon->mwin = mwin;
527      tray_icon->menu = menu;
528 -    tray_icon->tooltip = gtk_tooltips_new();
529 -    g_object_ref(G_OBJECT(tray_icon->tooltip));
530 -    gtk_object_sink(GTK_OBJECT(tray_icon->tooltip));
531      
532      return tray_icon;
533  }
534 @@ -227,22 +189,21 @@
535      if(tray_icon->tooltip_str)
536          g_free(tray_icon->tooltip_str);
537      tray_icon->tooltip_str = g_strdup(tip);
538 -    
539 -    gtk_tooltips_set_tip(tray_icon->tooltip, tray_icon->event_box, tip, NULL);
540 +
541 +    gtk_status_icon_set_tooltip (tray_icon->tray_icon, tip);
542  }
543  
544  void
545  xfmedia_tray_icon_destroy(XfmediaTrayIcon *tray_icon)
546  {
547 -    g_return_if_fail(tray_icon && NETK_IS_TRAY_ICON(tray_icon->tray_icon));
548 +    g_return_if_fail(tray_icon);
549      
550      g_signal_handlers_disconnect_by_func(G_OBJECT(tray_icon->tray_icon),
551              xfmedia_tray_icon_destroy_cb, tray_icon);
552      
553 -    g_object_unref(G_OBJECT(tray_icon->tooltip));
554      if(tray_icon->tooltip_str)
555          g_free(tray_icon->tooltip_str);
556      
557 -    gtk_widget_destroy(tray_icon->tray_icon);
558 +    g_object_unref (G_OBJECT (tray_icon->tray_icon));
559      g_free(tray_icon);
560  }
561 diff -ur xfmedia-0.9.2/src/xfmedia-common.c xfmedia-0.9.2-ui/src/xfmedia-common.c
562 --- xfmedia-0.9.2/src/xfmedia-common.c  2006-11-27 08:21:23.000000000 +0100
563 +++ xfmedia-0.9.2-ui/src/xfmedia-common.c       2011-03-08 13:04:34.265693993 +0100
564 @@ -40,7 +40,7 @@
565  #include <gtk/gtk.h>
566  
567  #include <libxfce4util/libxfce4util.h>
568 -#include <libxfcegui4/libxfcegui4.h>
569 +#include <libxfce4ui/libxfce4ui.h>
570  
571  #include <xine.h>
572  
573 @@ -110,7 +110,7 @@
574          img = gtk_image_new_from_stock(icon, GTK_ICON_SIZE_BUTTON);
575          if(!img || gtk_image_get_storage_type(GTK_IMAGE(img)) == GTK_IMAGE_EMPTY) {
576              gtk_icon_size_lookup(GTK_ICON_SIZE_BUTTON, &iw, &ih);
577 -            pix = xfce_themed_icon_load(icon, iw);
578 +            pix = gtk_icon_theme_load_icon ( gtk_icon_theme_get_default(), icon, iw, GTK_ICON_LOOKUP_GENERIC_FALLBACK, NULL);
579              if(pix) {
580                  if(img)
581                      gtk_image_set_from_pixbuf(GTK_IMAGE(img), pix);
582 @@ -667,13 +667,7 @@
583  GtkWidget *
584  xfmedia_create_framebox(const gchar *title, GtkWidget **frame_bin)
585  {
586 -#if LIBXFCEGUI4_CHECK_VERSION(4, 3, 4)
587 -    return xfce_create_framebox(title, frame_bin);
588 -#else
589 -    GtkWidget *frame = xfce_framebox_new(title, TRUE);
590 -    *frame_bin = XFCE_FRAMEBOX(frame)->hbox;
591 -    return frame;
592 -#endif
593 +    return xfce_gtk_frame_box_new(title, frame_bin);
594  }
595  
596  gchar *
597 diff -ur xfmedia-0.9.2/src/xfmedia-keybindings.c xfmedia-0.9.2-ui/src/xfmedia-keybindings.c
598 --- xfmedia-0.9.2/src/xfmedia-keybindings.c     2006-11-27 08:21:23.000000000 +0100
599 +++ xfmedia-0.9.2-ui/src/xfmedia-keybindings.c  2011-03-08 12:51:04.600614005 +0100
600 @@ -30,7 +30,7 @@
601  #include <gdk/gdkx.h>
602  
603  #include <libxfce4util/libxfce4util.h>
604 -#include <libxfcegui4/libxfcegui4.h>
605 +#include <libxfce4ui/libxfce4ui.h>
606  
607  #include "xfmedia-common.h"
608  #include "xfmedia-internal.h"
609 diff -ur xfmedia-0.9.2/src/xfmedia-remote.c xfmedia-0.9.2-ui/src/xfmedia-remote.c
610 --- xfmedia-0.9.2/src/xfmedia-remote.c  2006-11-27 08:21:23.000000000 +0100
611 +++ xfmedia-0.9.2-ui/src/xfmedia-remote.c       2011-03-08 12:51:04.601614005 +0100
612 @@ -308,7 +308,7 @@
613          session_id = xfmedia_remote_client_send_command(-1, XFMEDIA_REMOTE_IS_RUNNING);
614          if(session_id < 0) {
615              /* can't use xfce_exec() here because i don't want to have to
616 -             * pull in libxfcegui4 */
617 +             * pull in libxfce4ui */
618              if(!g_spawn_command_line_async(BINDIR "/xfmedia", NULL)
619                     && !g_spawn_command_line_async("xfmedia", NULL))
620              {
621 diff -ur xfmedia-0.9.2/xfmedia/xfmedia-plugin.pc.in xfmedia-0.9.2-ui/xfmedia/xfmedia-plugin.pc.in
622 --- xfmedia-0.9.2/xfmedia/xfmedia-plugin.pc.in  2006-11-27 08:21:24.000000000 +0100
623 +++ xfmedia-0.9.2-ui/xfmedia/xfmedia-plugin.pc.in       2011-03-08 12:51:04.602614005 +0100
624 @@ -5,7 +5,7 @@
625  
626  Name: xfmedia-plugin
627  Description: Plugin interface for Xfmedia
628 -Requires: gthread-2.0 gmodule-2.0 gdk-2.0 gtk+-2.0 libxfcegui4-1.0
629 +Requires: gthread-2.0 gmodule-2.0 gdk-2.0 gtk+-2.0 libxfce4ui-1
630  Version: @VERSION@
631 -Libs: @GTHREAD_LIBS@ @GMODULE_LIBS@ @LIBXFCEGUI4_LIBS@
632 -Cflags: @GTHREAD_CFLAGS@ @GMODULE_CFLAGS@ @LIBXFCEGUI4_CFLAGS@ -I${includedir}/xfmedia
633 +Libs: @GTHREAD_LIBS@ @GMODULE_LIBS@ @LIBXFCE4UI_LIBS@
634 +Cflags: @GTHREAD_CFLAGS@ @GMODULE_CFLAGS@ @LIBXFCE4UI_CFLAGS@ -I${includedir}/xfmedia
This page took 0.134658 seconds and 3 git commands to generate.