From 63811233ac311fdb4a639b9cf27cccba12f77401 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sat, 19 Feb 2011 11:17:31 +0000 Subject: [PATCH] - rel 3 - port to libxfce4ui Changed files: xfce4-mixer-ui.patch -> 1.1 xfce4-mixer.spec -> 1.50 --- xfce4-mixer-ui.patch | 413 +++++++++++++++++++++++++++++++++++++++++++ xfce4-mixer.spec | 6 +- 2 files changed, 417 insertions(+), 2 deletions(-) create mode 100644 xfce4-mixer-ui.patch diff --git a/xfce4-mixer-ui.patch b/xfce4-mixer-ui.patch new file mode 100644 index 0000000..ce8a394 --- /dev/null +++ b/xfce4-mixer-ui.patch @@ -0,0 +1,413 @@ +diff --git a/configure.in b/configure.in +index 3ff66e0..2bc6847 100644 +--- a/configure.in ++++ b/configure.in +@@ -75,9 +75,9 @@ dnl *********************************** + XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0]) + XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.12.0]) + XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2]) +-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0]) ++XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) + XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0]) +-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.6.0]) ++XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.7.0]) + XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.6.0]) + XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.6.0]) + +diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am +index b01d3f5..399bb2d 100644 +--- a/libxfce4mixer/Makefile.am ++++ b/libxfce4mixer/Makefile.am +@@ -28,7 +28,7 @@ libxfce4mixer_la_CFLAGS = \ + $(GLIB_CFLAGS) \ + $(GTK_FLAGS) \ + $(LIBXFCE4UTIL_CFLAGS) \ +- $(LIBXFCEGUI4_CFLAGS) \ ++ $(LIBXFCE4UI_CFLAGS) \ + $(XFCONF_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) + +@@ -40,7 +40,7 @@ libxfce4mixer_la_LIBADD = \ + $(GLIB_LIBS) \ + $(GTK_FLAGS) \ + $(LIBXFCE4UTIL_LIBS) \ +- $(LIBXFCEGUI4_LIBS) \ ++ $(LIBXFCE4UI_LIBS) \ + $(XFCONF_LIBS) \ + $(GST_PLUGINS_BASE_LIBS) \ + -lgstaudio-0.10 \ +diff --git a/libxfce4mixer/xfce-mixer-card-combo.c b/libxfce4mixer/xfce-mixer-card-combo.c +index 981fcae..db94866 100644 +--- a/libxfce4mixer/xfce-mixer-card-combo.c ++++ b/libxfce4mixer/xfce-mixer-card-combo.c +@@ -142,6 +142,7 @@ xfce_mixer_card_combo_init (XfceMixerCardCombo *combo) + gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (combo->list_store)); + + renderer = gtk_cell_renderer_text_new (); ++ g_object_set (G_OBJECT (renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer, "text", NAME_COLUMN); + +diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am +index dcf97d6..358ea44 100644 +--- a/panel-plugin/Makefile.am ++++ b/panel-plugin/Makefile.am +@@ -24,7 +24,7 @@ xfce4_mixer_plugin_CFLAGS = \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) \ + $(LIBXFCE4UTIL_CFLAGS) \ +- $(LIBXFCEGUI4_CFLAGS) \ ++ $(LIBXFCE4UI_CFLAGS) \ + $(LIBXFCE4PANEL_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) + +@@ -37,7 +37,7 @@ xfce4_mixer_plugin_LDFLAGS = \ + $(GLIB_LIBS) \ + $(GTK_LIBS) \ + $(LIBXFCE4UTIL_LIBS) \ +- $(LIBXFCEGUI4_LIBS) \ ++ $(LIBXFCE4UI_LIBS) \ + $(LIBXFCE4PANEL_LIBS) \ + $(GST_PLUGINS_BASE_LIBS) \ + -lgstaudio-0.10 \ +diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c +index 88eeaad..af26ba2 100644 +--- a/panel-plugin/xfce-mixer-plugin.c ++++ b/panel-plugin/xfce-mixer-plugin.c +@@ -31,9 +31,8 @@ + #include + + #include +-#include +-#include +-#include ++#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +@@ -344,7 +343,7 @@ xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin) + GTK_STOCK_DIALOG_ERROR, + NULL, + _("No left-click command defined yet. You can change this in the plugin properties."), +- XFCE_CUSTOM_STOCK_BUTTON, _("Properties"), GTK_STOCK_PREFERENCES, GTK_RESPONSE_ACCEPT, ++ XFCE_BUTTON_TYPE_MIXED, _("Properties"), GTK_STOCK_PREFERENCES, GTK_RESPONSE_ACCEPT, + GTK_STOCK_CLOSE, GTK_RESPONSE_REJECT, + NULL); + +@@ -367,7 +366,9 @@ xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin) + mixer_plugin->command); + + /* Display error */ +- xfce_err (message); ++ xfce_dialog_show_error (NULL, ++ NULL, ++ message); + + /* Free error message */ + g_free (message); +@@ -392,9 +393,12 @@ xfce_mixer_plugin_configure (XfceMixerPlugin *mixer_plugin) + /* Warn user if no sound cards are available */ + if (G_UNLIKELY (g_list_length (xfce_mixer_get_cards ()) <= 0)) + { +- xfce_err (_("GStreamer was unable to detect any sound devices. " +- "Some sound system specific GStreamer packages may " +- "be missing. It may also be a permissions problem.")); ++ xfce_dialog_show_error (NULL, ++ NULL, ++ _("GStreamer was unable to detect any sound devices. " ++ "Some sound system specific GStreamer packages may " ++ "be missing. It may also be a permissions problem.")); ++ + } + else + { +diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c +index 3c7edbf..cf099aa 100644 +--- a/panel-plugin/xfce-plugin-dialog.c ++++ b/panel-plugin/xfce-plugin-dialog.c +@@ -27,7 +27,7 @@ + #include + #include + +-#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c +index 82a7129..67dc781 100644 +--- a/panel-plugin/xfce-volume-button.c ++++ b/panel-plugin/xfce-volume-button.c +@@ -27,7 +27,9 @@ + + #include + +-#include ++#include ++ ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +@@ -205,7 +207,7 @@ xfce_volume_button_init (XfceVolumeButton *button) + button->adjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.05, 0.05, 0.0); + + /* Create a new scaled image for the button icon */ +- button->image = xfce_scaled_image_new (); ++ button->image = xfce_panel_image_new (); + gtk_container_add (GTK_CONTAINER (button), button->image); + gtk_widget_show (button->image); + +@@ -430,7 +432,7 @@ xfce_volume_button_update (XfceVolumeButton *button) + + /* Update the button icon */ + if (G_LIKELY (pixbuf != NULL)) +- xfce_scaled_image_set_from_pixbuf (XFCE_SCALED_IMAGE (button->image), pixbuf); ++ xfce_panel_image_set_from_pixbuf (XFCE_PANEL_IMAGE (button->image), pixbuf); + } + + +@@ -491,7 +493,11 @@ xfce_volume_button_set_icon_size (XfceVolumeButton *button, + if (GDK_IS_PIXBUF (button->pixbufs[i])) + g_object_unref (G_OBJECT (button->pixbufs[i])); + +- button->pixbufs[i] = xfce_themed_icon_load (icons[i], button->icon_size); ++ button->pixbufs[i] = gtk_icon_theme_load_icon (gtk_icon_theme_get_default(), ++ icons[i], ++ button->icon_size, ++ GTK_ICON_LOOKUP_USE_BUILTIN, ++ NULL); + } + } + +diff --git a/panel-plugin/xfce4-mixer-plugin.desktop.in.in b/panel-plugin/xfce4-mixer-plugin.desktop.in.in +index 364c3af..e228c05 100644 +--- a/panel-plugin/xfce4-mixer-plugin.desktop.in.in ++++ b/panel-plugin/xfce4-mixer-plugin.desktop.in.in +@@ -1,6 +1,5 @@ + [Xfce Panel] + Type=X-XFCE-PanelPlugin +-Encoding=UTF-8 + _Name=Mixer + _Comment=Volume control for your sound card + Icon=multimedia-volume-control +diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am +index 037cc97..a869325 100644 +--- a/xfce4-mixer/Makefile.am ++++ b/xfce4-mixer/Makefile.am +@@ -28,7 +28,7 @@ xfce4_mixer_CFLAGS = \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) \ + $(LIBXFCE4UTIL_CFLAGS) \ +- $(LIBXFCEGUI4_CFLAGS) \ ++ $(LIBXFCE4UI_CFLAGS) \ + $(XFCONF_CFLAGS) \ + $(GST_PLUGINS_BASE_CFLAGS) + +@@ -41,7 +41,7 @@ xfce4_mixer_LDFLAGS = \ + $(GTHREAD_LIBS) \ + $(GTK_LIBS) \ + $(LIBXFCE4UTIL_LIBS) \ +- $(LIBXFCEGUI4_LIBS) \ ++ $(LIBXFCE4UI_LIBS) \ + $(XFCONF_LIBS) \ + $(GST_PLUGINS_BASE_LIBS) \ + -lgstaudio-0.10 \ +diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c +index bad19a3..e459f8f 100644 +--- a/xfce4-mixer/main.c ++++ b/xfce4-mixer/main.c +@@ -29,7 +29,7 @@ + #include + + #include +-#include ++#include + #include + + #include "libxfce4mixer/libxfce4mixer.h" +@@ -87,9 +87,11 @@ main (int argc, + /* Warn users if there were no sound cards detected by GStreamer */ + if (G_UNLIKELY (g_list_length (xfce_mixer_get_cards ()) <= 0)) + { +- xfce_err (_("GStreamer was unable to detect any sound devices. " +- "Some sound system specific GStreamer packages may " +- "be missing. It may also be a permissions problem.")); ++ xfce_dialog_show_error (NULL, ++ NULL, ++ _("GStreamer was unable to detect any sound devices. " ++ "Some sound system specific GStreamer packages may " ++ "be missing. It may also be a permissions problem.")); + + return EXIT_FAILURE; + } +diff --git a/xfce4-mixer/xfce-mixer-controls-dialog.c b/xfce4-mixer/xfce-mixer-controls-dialog.c +index ad5eba1..c1ba813 100644 +--- a/xfce4-mixer/xfce-mixer-controls-dialog.c ++++ b/xfce4-mixer/xfce-mixer-controls-dialog.c +@@ -26,7 +26,7 @@ + #include + + #include +-#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c +index 5d0254f..709e1e4 100644 +--- a/xfce4-mixer/xfce-mixer-option.c ++++ b/xfce4-mixer/xfce-mixer-option.c +@@ -26,7 +26,7 @@ + #include + + #include +-#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +diff --git a/xfce4-mixer/xfce-mixer-switch.c b/xfce4-mixer/xfce-mixer-switch.c +index 880682a..c759b7f 100644 +--- a/xfce4-mixer/xfce-mixer-switch.c ++++ b/xfce4-mixer/xfce-mixer-switch.c +@@ -26,7 +26,7 @@ + #include + + #include +-#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +diff --git a/xfce4-mixer/xfce-mixer-track.c b/xfce4-mixer/xfce-mixer-track.c +index c1b5b3f..f015349 100644 +--- a/xfce4-mixer/xfce-mixer-track.c ++++ b/xfce4-mixer/xfce-mixer-track.c +@@ -26,7 +26,7 @@ + #include + + #include +-#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c +index d08505d..05aa532 100644 +--- a/xfce4-mixer/xfce-mixer-window.c ++++ b/xfce4-mixer/xfce-mixer-window.c +@@ -27,7 +27,7 @@ + #include + + #include +-#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +@@ -57,12 +57,12 @@ static void xfce_mixer_window_update_contents (XfceMixerWindow * + + struct _XfceMixerWindowClass + { +- GtkWindowClass __parent__; ++ XfceTitledDialogClass __parent__; + }; + + struct _XfceMixerWindow + { +- GtkWindow __parent__; ++ XfceTitledDialog __parent__; + + XfceMixerPreferences *preferences; + +@@ -118,7 +118,8 @@ xfce_mixer_window_get_type (void) + NULL, + }; + +- type = g_type_register_static (GTK_TYPE_WINDOW, "XfceMixerWindow", &info, 0); ++ type = g_type_register_static (XFCE_TYPE_TITLED_DIALOG, "XfceMixerWindow", &info, 0); ++ + } + + return type; +@@ -146,8 +147,6 @@ xfce_mixer_window_init (XfceMixerWindow *window) + { + GtkAccelGroup *accel_group; + GtkAction *action; +- GtkWidget *heading; +- GtkWidget *separator; + GtkWidget *label; + GtkWidget *button; + GtkWidget *vbox; +@@ -168,6 +167,9 @@ xfce_mixer_window_init (XfceMixerWindow *window) + gtk_window_set_title (GTK_WINDOW (window), _("Mixer")); + gtk_window_set_default_size (GTK_WINDOW (window), width, height); + gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER); ++ gtk_dialog_set_has_separator (GTK_DIALOG (window), FALSE); ++ xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (window), _("Configure sound card(s) and control the volume of selected tracks")); ++ + g_signal_connect (window, "delete-event", G_CALLBACK (xfce_mixer_window_closed), window); + + /* Quit mixer when the main window is closed */ +@@ -189,21 +191,9 @@ xfce_mixer_window_init (XfceMixerWindow *window) + } + gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); + +- vbox = gtk_vbox_new (FALSE, 0); +- gtk_container_add (GTK_CONTAINER (window), vbox); ++ vbox = gtk_dialog_get_content_area (GTK_DIALOG (window)); + gtk_widget_show (vbox); + +- heading = xfce_heading_new (); +- xfce_heading_set_title (XFCE_HEADING (heading), _("Mixer")); +- xfce_heading_set_subtitle (XFCE_HEADING (heading), _("Configure sound card(s) and control the volume of selected tracks")); +- xfce_heading_set_icon_name (XFCE_HEADING (heading), "multimedia-volume-control"); +- gtk_box_pack_start (GTK_BOX (vbox), heading, FALSE, TRUE, 0); +- gtk_widget_show (heading); +- +- separator = gtk_hseparator_new (); +- gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0); +- gtk_widget_show (separator); +- + hbox = gtk_hbox_new (FALSE, 12); + gtk_container_set_border_width (GTK_CONTAINER (hbox), 6); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); +@@ -227,11 +217,9 @@ xfce_mixer_window_init (XfceMixerWindow *window) + gtk_container_add (GTK_CONTAINER (vbox), window->mixer_frame); + gtk_widget_show (window->mixer_frame); + +- bbox = gtk_hbutton_box_new (); ++ bbox = gtk_dialog_get_action_area (GTK_DIALOG (window)); + gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_EDGE); + gtk_container_set_border_width (GTK_CONTAINER (bbox), 6); +- gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, TRUE, 0); +- gtk_widget_show (bbox); + + window->select_controls_button = gtk_button_new (); + gtk_action_connect_proxy (gtk_action_group_get_action (window->action_group, "select-controls"), +diff --git a/xfce4-mixer/xfce-mixer.c b/xfce4-mixer/xfce-mixer.c +index c09a5b4..8d3ffcd 100644 +--- a/xfce4-mixer/xfce-mixer.c ++++ b/xfce4-mixer/xfce-mixer.c +@@ -26,7 +26,7 @@ + #include + + #include +-#include ++#include + + #include "libxfce4mixer/libxfce4mixer.h" + +diff --git a/xfce4-mixer/xfce4-mixer.desktop.in.in b/xfce4-mixer/xfce4-mixer.desktop.in.in +index 357926d..c962d84 100644 +--- a/xfce4-mixer/xfce4-mixer.desktop.in.in ++++ b/xfce4-mixer/xfce4-mixer.desktop.in.in +@@ -1,6 +1,5 @@ + [Desktop Entry] + Version=1.0 +-Encoding=UTF-8 + _Name=Mixer + _Comment=Audio mixer for the Xfce Desktop Environment + Icon=multimedia-volume-control diff --git a/xfce4-mixer.spec b/xfce4-mixer.spec index 0537a72..633389d 100644 --- a/xfce4-mixer.spec +++ b/xfce4-mixer.spec @@ -2,11 +2,12 @@ Summary: Volume control plugin for the Xfce panel Summary(pl.UTF-8): Wtyczka sterująca głośnością dla panelu Xfce Name: xfce4-mixer Version: 4.6.1 -Release: 2 +Release: 3 License: GPL v2 Group: X11/Applications/Sound Source0: http://www.xfce.org/archive/xfce-%{version}/src/%{name}-%{version}.tar.bz2 # Source0-md5: a99e2455445480ef5081fe69454a46fc +Patch0: %{name}-ui.patch URL: http://www.xfce.org/projects/xfce4-mixer/ BuildRequires: autoconf >= 2.50 BuildRequires: automake @@ -15,7 +16,7 @@ BuildRequires: gstreamer-plugins-base-devel >= 0.10.14 BuildRequires: gtk+2-devel >= 2:2.10.6 BuildRequires: intltool >= 0.35.0 BuildRequires: libtool -BuildRequires: libxfcegui4-devel >= %{version} +BuildRequires: libxfce4ui-devel >= %{version} BuildRequires: pkgconfig >= 1:0.9.0 BuildRequires: xfce4-dev-tools >= 4.6.0 BuildRequires: xfce4-panel-devel >= %{version} @@ -33,6 +34,7 @@ prosty mikser dźwięku. %prep %setup -q +%patch0 -p1 %build %{__intltoolize} -- 2.43.0