]> git.pld-linux.org Git - packages/xfce4-mixer.git/blob - xfce4-mixer-ui.patch
- rel 3
[packages/xfce4-mixer.git] / xfce4-mixer-ui.patch
1 diff --git a/configure.in b/configure.in
2 index 3ff66e0..2bc6847 100644
3 --- a/configure.in
4 +++ b/configure.in
5 @@ -75,9 +75,9 @@ dnl ***********************************
6  XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0])
7  XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.12.0])
8  XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2])
9 -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0])
10 +XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
11  XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])
12 -XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.6.0])
13 +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.7.0])
14  XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.6.0])
15  XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0])
16  
17 diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am
18 index b01d3f5..399bb2d 100644
19 --- a/libxfce4mixer/Makefile.am
20 +++ b/libxfce4mixer/Makefile.am
21 @@ -28,7 +28,7 @@ libxfce4mixer_la_CFLAGS =                                             \
22         $(GLIB_CFLAGS)                                                  \
23         $(GTK_FLAGS)                                                    \
24         $(LIBXFCE4UTIL_CFLAGS)                                          \
25 -       $(LIBXFCEGUI4_CFLAGS)                                           \
26 +       $(LIBXFCE4UI_CFLAGS)                                            \
27         $(XFCONF_CFLAGS)                                                \
28         $(GST_PLUGINS_BASE_CFLAGS)
29  
30 @@ -40,7 +40,7 @@ libxfce4mixer_la_LIBADD =                                             \
31         $(GLIB_LIBS)                                                    \
32         $(GTK_FLAGS)                                                    \
33         $(LIBXFCE4UTIL_LIBS)                                            \
34 -       $(LIBXFCEGUI4_LIBS)                                             \
35 +       $(LIBXFCE4UI_LIBS)                                              \
36         $(XFCONF_LIBS)                                                  \
37         $(GST_PLUGINS_BASE_LIBS)                                        \
38         -lgstaudio-0.10                                                 \
39 diff --git a/libxfce4mixer/xfce-mixer-card-combo.c b/libxfce4mixer/xfce-mixer-card-combo.c
40 index 981fcae..db94866 100644
41 --- a/libxfce4mixer/xfce-mixer-card-combo.c
42 +++ b/libxfce4mixer/xfce-mixer-card-combo.c
43 @@ -142,6 +142,7 @@ xfce_mixer_card_combo_init (XfceMixerCardCombo *combo)
44    gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (combo->list_store));
45  
46    renderer = gtk_cell_renderer_text_new ();
47 +  g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL);
48    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
49    gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer, "text", NAME_COLUMN);
50  
51 diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
52 index dcf97d6..358ea44 100644
53 --- a/panel-plugin/Makefile.am
54 +++ b/panel-plugin/Makefile.am
55 @@ -24,7 +24,7 @@ xfce4_mixer_plugin_CFLAGS =                                           \
56         $(GLIB_CFLAGS)                                                  \
57         $(GTK_CFLAGS)                                                   \
58         $(LIBXFCE4UTIL_CFLAGS)                                          \
59 -       $(LIBXFCEGUI4_CFLAGS)                                           \
60 +       $(LIBXFCE4UI_CFLAGS)                                            \
61         $(LIBXFCE4PANEL_CFLAGS)                                         \
62         $(GST_PLUGINS_BASE_CFLAGS)
63  
64 @@ -37,7 +37,7 @@ xfce4_mixer_plugin_LDFLAGS =                                          \
65         $(GLIB_LIBS)                                                    \
66         $(GTK_LIBS)                                                     \
67         $(LIBXFCE4UTIL_LIBS)                                            \
68 -       $(LIBXFCEGUI4_LIBS)                                             \
69 +       $(LIBXFCE4UI_LIBS)                                              \
70         $(LIBXFCE4PANEL_LIBS)                                           \
71         $(GST_PLUGINS_BASE_LIBS)                                        \
72         -lgstaudio-0.10                                                 \
73 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c
74 index 88eeaad..af26ba2 100644
75 --- a/panel-plugin/xfce-mixer-plugin.c
76 +++ b/panel-plugin/xfce-mixer-plugin.c
77 @@ -31,9 +31,8 @@
78  #include <gst/gst.h>
79  
80  #include <libxfce4util/libxfce4util.h>
81 -#include <libxfcegui4/libxfcegui4.h>
82 -#include <libxfce4panel/xfce-panel-plugin.h>
83 -#include <libxfce4panel/xfce-hvbox.h>
84 +#include <libxfce4ui/libxfce4ui.h>
85 +#include <libxfce4panel/libxfce4panel.h>
86  
87  #include "libxfce4mixer/libxfce4mixer.h"
88  
89 @@ -344,7 +343,7 @@ xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin)
90                                        GTK_STOCK_DIALOG_ERROR,
91                                        NULL,
92                                        _("No left-click command defined yet. You can change this in the plugin properties."),
93 -                                      XFCE_CUSTOM_STOCK_BUTTON, _("Properties"), GTK_STOCK_PREFERENCES, GTK_RESPONSE_ACCEPT,
94 +                                      XFCE_BUTTON_TYPE_MIXED, _("Properties"), GTK_STOCK_PREFERENCES, GTK_RESPONSE_ACCEPT,
95                                        GTK_STOCK_CLOSE, GTK_RESPONSE_REJECT,
96                                        NULL);
97  
98 @@ -367,7 +366,9 @@ xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin)
99                                   mixer_plugin->command);
100  
101        /* Display error */
102 -      xfce_err (message);
103 +      xfce_dialog_show_error (NULL,
104 +                              NULL,
105 +                              message); 
106  
107        /* Free error message */
108        g_free (message);
109 @@ -392,9 +393,12 @@ xfce_mixer_plugin_configure (XfceMixerPlugin *mixer_plugin)
110    /* Warn user if no sound cards are available */
111    if (G_UNLIKELY (g_list_length (xfce_mixer_get_cards ()) <= 0))
112      {
113 -      xfce_err (_("GStreamer was unable to detect any sound devices. "
114 -                  "Some sound system specific GStreamer packages may "
115 -                  "be missing. It may also be a permissions problem."));
116 +      xfce_dialog_show_error (NULL,
117 +                              NULL,
118 +                              _("GStreamer was unable to detect any sound devices. "
119 +                              "Some sound system specific GStreamer packages may "
120 +                              "be missing. It may also be a permissions problem.")); 
121 +
122      }
123    else
124      {
125 diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c
126 index 3c7edbf..cf099aa 100644
127 --- a/panel-plugin/xfce-plugin-dialog.c
128 +++ b/panel-plugin/xfce-plugin-dialog.c
129 @@ -27,7 +27,7 @@
130  #include <gst/gst.h>
131  #include <gst/interfaces/mixer.h>
132  
133 -#include <libxfcegui4/libxfcegui4.h>
134 +#include <libxfce4ui/libxfce4ui.h>
135  
136  #include "libxfce4mixer/libxfce4mixer.h"
137  
138 diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c
139 index 82a7129..67dc781 100644
140 --- a/panel-plugin/xfce-volume-button.c
141 +++ b/panel-plugin/xfce-volume-button.c
142 @@ -27,7 +27,9 @@
143  
144  #include <gdk/gdkkeysyms.h>
145  
146 -#include <libxfcegui4/libxfcegui4.h>
147 +#include <libxfce4ui/libxfce4ui.h>
148 +
149 +#include <libxfce4panel/libxfce4panel.h>
150  
151  #include "libxfce4mixer/libxfce4mixer.h"
152  
153 @@ -205,7 +207,7 @@ xfce_volume_button_init (XfceVolumeButton *button)
154    button->adjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.05, 0.05, 0.0);
155  
156    /* Create a new scaled image for the button icon */
157 -  button->image = xfce_scaled_image_new ();
158 +  button->image = xfce_panel_image_new ();
159    gtk_container_add (GTK_CONTAINER (button), button->image);
160    gtk_widget_show (button->image);
161  
162 @@ -430,7 +432,7 @@ xfce_volume_button_update (XfceVolumeButton *button)
163  
164    /* Update the button icon */
165    if (G_LIKELY (pixbuf != NULL))
166 -    xfce_scaled_image_set_from_pixbuf (XFCE_SCALED_IMAGE (button->image), pixbuf);
167 +    xfce_panel_image_set_from_pixbuf (XFCE_PANEL_IMAGE (button->image), pixbuf);
168  }
169  
170  
171 @@ -491,7 +493,11 @@ xfce_volume_button_set_icon_size (XfceVolumeButton *button,
172        if (GDK_IS_PIXBUF (button->pixbufs[i]))
173          g_object_unref (G_OBJECT (button->pixbufs[i]));
174  
175 -      button->pixbufs[i] = xfce_themed_icon_load (icons[i], button->icon_size);
176 +      button->pixbufs[i] = gtk_icon_theme_load_icon (gtk_icon_theme_get_default(),
177 +                                                     icons[i],
178 +                                                     button->icon_size,
179 +                                                     GTK_ICON_LOOKUP_USE_BUILTIN,
180 +                                                     NULL);
181      }
182  }
183  
184 diff --git a/panel-plugin/xfce4-mixer-plugin.desktop.in.in b/panel-plugin/xfce4-mixer-plugin.desktop.in.in
185 index 364c3af..e228c05 100644
186 --- a/panel-plugin/xfce4-mixer-plugin.desktop.in.in
187 +++ b/panel-plugin/xfce4-mixer-plugin.desktop.in.in
188 @@ -1,6 +1,5 @@
189  [Xfce Panel]
190  Type=X-XFCE-PanelPlugin
191 -Encoding=UTF-8
192  _Name=Mixer
193  _Comment=Volume control for your sound card
194  Icon=multimedia-volume-control
195 diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am
196 index 037cc97..a869325 100644
197 --- a/xfce4-mixer/Makefile.am
198 +++ b/xfce4-mixer/Makefile.am
199 @@ -28,7 +28,7 @@ xfce4_mixer_CFLAGS =                                                  \
200         $(GLIB_CFLAGS)                                                  \
201         $(GTK_CFLAGS)                                                   \
202         $(LIBXFCE4UTIL_CFLAGS)                                          \
203 -       $(LIBXFCEGUI4_CFLAGS)                                           \
204 +       $(LIBXFCE4UI_CFLAGS)                                            \
205         $(XFCONF_CFLAGS)                                                \
206         $(GST_PLUGINS_BASE_CFLAGS)
207  
208 @@ -41,7 +41,7 @@ xfce4_mixer_LDFLAGS =                                                         \
209         $(GTHREAD_LIBS)                                                 \
210         $(GTK_LIBS)                                                     \
211         $(LIBXFCE4UTIL_LIBS)                                            \
212 -       $(LIBXFCEGUI4_LIBS)                                             \
213 +       $(LIBXFCE4UI_LIBS)                                              \
214         $(XFCONF_LIBS)                                                  \
215         $(GST_PLUGINS_BASE_LIBS)                                        \
216         -lgstaudio-0.10                                                 \
217 diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c
218 index bad19a3..e459f8f 100644
219 --- a/xfce4-mixer/main.c
220 +++ b/xfce4-mixer/main.c
221 @@ -29,7 +29,7 @@
222  #include <gst/gst.h>
223  
224  #include <libxfce4util/libxfce4util.h>
225 -#include <libxfcegui4/libxfcegui4.h>
226 +#include <libxfce4ui/libxfce4ui.h>
227  #include <xfconf/xfconf.h>
228  
229  #include "libxfce4mixer/libxfce4mixer.h"
230 @@ -87,9 +87,11 @@ main (int    argc,
231    /* Warn users if there were no sound cards detected by GStreamer */
232    if (G_UNLIKELY (g_list_length (xfce_mixer_get_cards ()) <= 0))
233      {
234 -      xfce_err (_("GStreamer was unable to detect any sound devices. "
235 -                  "Some sound system specific GStreamer packages may "
236 -                  "be missing. It may also be a permissions problem."));
237 +      xfce_dialog_show_error (NULL,
238 +                              NULL,
239 +                              _("GStreamer was unable to detect any sound devices. "
240 +                              "Some sound system specific GStreamer packages may "
241 +                              "be missing. It may also be a permissions problem."));
242  
243        return EXIT_FAILURE;
244      }
245 diff --git a/xfce4-mixer/xfce-mixer-controls-dialog.c b/xfce4-mixer/xfce-mixer-controls-dialog.c
246 index ad5eba1..c1ba813 100644
247 --- a/xfce4-mixer/xfce-mixer-controls-dialog.c
248 +++ b/xfce4-mixer/xfce-mixer-controls-dialog.c
249 @@ -26,7 +26,7 @@
250  #include <gst/interfaces/mixer.h>
251  
252  #include <libxfce4util/libxfce4util.h>
253 -#include <libxfcegui4/libxfcegui4.h>
254 +#include <libxfce4ui/libxfce4ui.h>
255  
256  #include "libxfce4mixer/libxfce4mixer.h"
257  
258 diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c
259 index 5d0254f..709e1e4 100644
260 --- a/xfce4-mixer/xfce-mixer-option.c
261 +++ b/xfce4-mixer/xfce-mixer-option.c
262 @@ -26,7 +26,7 @@
263  #include <gst/interfaces/mixer.h>
264  
265  #include <libxfce4util/libxfce4util.h>
266 -#include <libxfcegui4/libxfcegui4.h>
267 +#include <libxfce4ui/libxfce4ui.h>
268  
269  #include "libxfce4mixer/libxfce4mixer.h"
270  
271 diff --git a/xfce4-mixer/xfce-mixer-switch.c b/xfce4-mixer/xfce-mixer-switch.c
272 index 880682a..c759b7f 100644
273 --- a/xfce4-mixer/xfce-mixer-switch.c
274 +++ b/xfce4-mixer/xfce-mixer-switch.c
275 @@ -26,7 +26,7 @@
276  #include <gst/interfaces/mixer.h>
277  
278  #include <libxfce4util/libxfce4util.h>
279 -#include <libxfcegui4/libxfcegui4.h>
280 +#include <libxfce4ui/libxfce4ui.h>
281  
282  #include "libxfce4mixer/libxfce4mixer.h"
283  
284 diff --git a/xfce4-mixer/xfce-mixer-track.c b/xfce4-mixer/xfce-mixer-track.c
285 index c1b5b3f..f015349 100644
286 --- a/xfce4-mixer/xfce-mixer-track.c
287 +++ b/xfce4-mixer/xfce-mixer-track.c
288 @@ -26,7 +26,7 @@
289  #include <gst/interfaces/mixer.h>
290  
291  #include <libxfce4util/libxfce4util.h>
292 -#include <libxfcegui4/libxfcegui4.h>
293 +#include <libxfce4ui/libxfce4ui.h>
294  
295  #include "libxfce4mixer/libxfce4mixer.h"
296  
297 diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c
298 index d08505d..05aa532 100644
299 --- a/xfce4-mixer/xfce-mixer-window.c
300 +++ b/xfce4-mixer/xfce-mixer-window.c
301 @@ -27,7 +27,7 @@
302  #include <gst/interfaces/mixer.h>
303  
304  #include <libxfce4util/libxfce4util.h>
305 -#include <libxfcegui4/libxfcegui4.h>
306 +#include <libxfce4ui/libxfce4ui.h>
307  
308  #include "libxfce4mixer/libxfce4mixer.h"
309  
310 @@ -57,12 +57,12 @@ static void     xfce_mixer_window_update_contents        (XfceMixerWindow      *
311  
312  struct _XfceMixerWindowClass
313  {
314 -  GtkWindowClass __parent__;
315 +  XfceTitledDialogClass __parent__;
316  };
317  
318  struct _XfceMixerWindow
319  {
320 -  GtkWindow __parent__;
321 +  XfceTitledDialog __parent__;
322  
323    XfceMixerPreferences *preferences;
324  
325 @@ -118,7 +118,8 @@ xfce_mixer_window_get_type (void)
326            NULL,
327          };
328  
329 -      type = g_type_register_static (GTK_TYPE_WINDOW, "XfceMixerWindow", &info, 0);
330 +      type = g_type_register_static (XFCE_TYPE_TITLED_DIALOG, "XfceMixerWindow", &info, 0);
331 +
332      }
333    
334    return type;
335 @@ -146,8 +147,6 @@ xfce_mixer_window_init (XfceMixerWindow *window)
336  {
337    GtkAccelGroup *accel_group;
338    GtkAction     *action;
339 -  GtkWidget     *heading;
340 -  GtkWidget     *separator;
341    GtkWidget     *label;
342    GtkWidget     *button;
343    GtkWidget     *vbox;
344 @@ -168,6 +167,9 @@ xfce_mixer_window_init (XfceMixerWindow *window)
345    gtk_window_set_title (GTK_WINDOW (window), _("Mixer"));
346    gtk_window_set_default_size (GTK_WINDOW (window), width, height);
347    gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
348 +  gtk_dialog_set_has_separator (GTK_DIALOG (window), FALSE);
349 +  xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (window), _("Configure sound card(s) and control the volume of selected tracks"));
350 +
351    g_signal_connect (window, "delete-event", G_CALLBACK (xfce_mixer_window_closed), window);
352  
353    /* Quit mixer when the main window is closed */
354 @@ -189,21 +191,9 @@ xfce_mixer_window_init (XfceMixerWindow *window)
355      }
356    gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
357  
358 -  vbox = gtk_vbox_new (FALSE, 0);
359 -  gtk_container_add (GTK_CONTAINER (window), vbox);
360 +  vbox = gtk_dialog_get_content_area (GTK_DIALOG (window));
361    gtk_widget_show (vbox);
362  
363 -  heading = xfce_heading_new ();
364 -  xfce_heading_set_title (XFCE_HEADING (heading), _("Mixer"));
365 -  xfce_heading_set_subtitle (XFCE_HEADING (heading), _("Configure sound card(s) and control the volume of selected tracks"));
366 -  xfce_heading_set_icon_name (XFCE_HEADING (heading), "multimedia-volume-control");
367 -  gtk_box_pack_start (GTK_BOX (vbox), heading, FALSE, TRUE, 0);
368 -  gtk_widget_show (heading);
369 -
370 -  separator = gtk_hseparator_new ();
371 -  gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
372 -  gtk_widget_show (separator);
373 -
374    hbox = gtk_hbox_new (FALSE, 12);
375    gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
376    gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
377 @@ -227,11 +217,9 @@ xfce_mixer_window_init (XfceMixerWindow *window)
378    gtk_container_add (GTK_CONTAINER (vbox), window->mixer_frame);
379    gtk_widget_show (window->mixer_frame);
380  
381 -  bbox = gtk_hbutton_box_new ();
382 +  bbox = gtk_dialog_get_action_area (GTK_DIALOG (window));
383    gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_EDGE);
384    gtk_container_set_border_width (GTK_CONTAINER (bbox), 6);
385 -  gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, TRUE, 0);
386 -  gtk_widget_show (bbox);
387  
388    window->select_controls_button = gtk_button_new ();
389    gtk_action_connect_proxy (gtk_action_group_get_action (window->action_group, "select-controls"), 
390 diff --git a/xfce4-mixer/xfce-mixer.c b/xfce4-mixer/xfce-mixer.c
391 index c09a5b4..8d3ffcd 100644
392 --- a/xfce4-mixer/xfce-mixer.c
393 +++ b/xfce4-mixer/xfce-mixer.c
394 @@ -26,7 +26,7 @@
395  #include <gst/interfaces/mixer.h>
396  
397  #include <libxfce4util/libxfce4util.h>
398 -#include <libxfcegui4/libxfcegui4.h>
399 +#include <libxfce4ui/libxfce4ui.h>
400  
401  #include "libxfce4mixer/libxfce4mixer.h"
402  
403 diff --git a/xfce4-mixer/xfce4-mixer.desktop.in.in b/xfce4-mixer/xfce4-mixer.desktop.in.in
404 index 357926d..c962d84 100644
405 --- a/xfce4-mixer/xfce4-mixer.desktop.in.in
406 +++ b/xfce4-mixer/xfce4-mixer.desktop.in.in
407 @@ -1,6 +1,5 @@
408  [Desktop Entry]
409  Version=1.0
410 -Encoding=UTF-8
411  _Name=Mixer
412  _Comment=Audio mixer for the Xfce Desktop Environment
413  Icon=multimedia-volume-control
This page took 0.09898 seconds and 3 git commands to generate.