[Xfce4-commits] xfce4-settings:bluesabre/display-settings Changed mode detection to xfce_randr_find_mode_by_id and apply only once.
Updating branch refs/heads/bluesabre/display-settings to e994fbb59a4b200c4c62cbc27400d54630e3cb42 (commit) from 278529a5e2ee1869c4adc4c5c738149e26f512f9 (commit) commit e994fbb59a4b200c4c62cbc27400d54630e3cb42 Author: Sean Davis smd.seanda...@gmail.com Date: Thu Sep 27 06:10:16 2012 -0400 Changed mode detection to xfce_randr_find_mode_by_id and apply only once. dialogs/display-settings/main.c | 173 --- 1 files changed, 72 insertions(+), 101 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index f95671f..098e55a 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -247,9 +247,9 @@ static void display_setting_positions_changed (GtkComboBox *combobox, GtkBuilder *builder) { -gint value, current_display, selected_display, selected_x, selected_y, n; +gint value, current_display, selected_display, selected_x, selected_y; GObject *display_combobox; -XfceRRMode *modes; +XfceRRMode *current_mode; display_combobox = gtk_builder_get_object(builder, randr-active-displays); @@ -259,6 +259,7 @@ display_setting_positions_changed (GtkComboBox *combobox, if (!display_setting_combo_box_get_value (GTK_COMBO_BOX(display_combobox), selected_display)) return; +/* Skip if the display combobox hasn't made a selection yet */ if (selected_display == -1) return; /* Store the Current Display */ @@ -266,129 +267,99 @@ display_setting_positions_changed (GtkComboBox *combobox, switch (value) { case XFCE_RANDR_PLACEMENT_LEFT: // Extend Left -/* Walk all supported modes of current display */ -modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr); -for (n = 0; n XFCE_RANDR_OUTPUT_INFO (xfce_randr)-nmode; ++n) -{ -/* Find the current mode. */ -if (modes[n].id == XFCE_RANDR_MODE (xfce_randr)) -{ -/* Change active output to secondary display. */ -xfce_randr-active_output = selected_display; - -/* Move the primary to where the secondary is... */ -selected_x = XFCE_RANDR_POS_X (xfce_randr); -selected_y = XFCE_RANDR_POS_Y (xfce_randr); -xfce_randr-active_output = current_display; -XFCE_RANDR_POS_X (xfce_randr) = selected_x; -XFCE_RANDR_POS_Y (xfce_randr) = selected_y; - -xfce_randr-active_output = selected_display; -/* Move the secondary display to the right of the primary display. */ -XFCE_RANDR_POS_X (xfce_randr) = modes[n].width; -break; -} -} +current_mode = xfce_randr_find_mode_by_id (xfce_randr, xfce_randr-active_output, XFCE_RANDR_MODE (xfce_randr)); + +/* Change active output to secondary display. */ +xfce_randr-active_output = selected_display; + +/* Move the primary to where the secondary is... */ +selected_x = XFCE_RANDR_POS_X (xfce_randr); +selected_y = XFCE_RANDR_POS_Y (xfce_randr); +xfce_randr-active_output = current_display; +XFCE_RANDR_POS_X (xfce_randr) = selected_x; +XFCE_RANDR_POS_Y (xfce_randr) = selected_y; + +/* Move the secondary display to the right of the primary display. */ +xfce_randr-active_output = selected_display; +XFCE_RANDR_POS_X (xfce_randr) = current_mode-width; break; + case XFCE_RANDR_PLACEMENT_RIGHT: // Extend Right /* Change active output to secondary display. */ xfce_randr-active_output = selected_display; -/* Find the current mode. */ -modes = XFCE_RANDR_SUPPORTED_MODES (xfce_randr); -for (n = 0; n XFCE_RANDR_OUTPUT_INFO (xfce_randr)-nmode; ++n) -{ -if (modes[n].id == XFCE_RANDR_MODE (xfce_randr)) -{ -/* Change active output to primary display. */ -xfce_randr-active_output = current_display; - -/* Move the secondary to where the primary is... */ -selected_x = XFCE_RANDR_POS_X (xfce_randr); -selected_y = XFCE_RANDR_POS_Y (xfce_randr); -xfce_randr-active_output = selected_display; -XFCE_RANDR_POS_X (xfce_randr) = selected_x; -XFCE_RANDR_POS_Y (xfce_randr) = selected_y; - -xfce_randr-active_output = current_display; -/* Move the primary display to the right of the
[Xfce4-commits] xfce4-xkb-plugin:master l10n: serbian translation
Updating branch refs/heads/master to 026082de6f4583fd9fc177bc0f81ec4d2d38ae1b (commit) from 0e4fedad55354d4c013867ccdd87355a9884ea65 (commit) commit 026082de6f4583fd9fc177bc0f81ec4d2d38ae1b Author: Саша Петровић salepetron...@gmail.com Date: Thu Sep 27 12:29:25 2012 +0200 l10n: serbian translation New status: 25 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/{hr.po = sr.po} | 82 ++ 1 files changed, 43 insertions(+), 39 deletions(-) diff --git a/po/hr.po b/po/sr.po similarity index 56% copy from po/hr.po copy to po/sr.po index 4d01f9c..86e3409 100644 --- a/po/hr.po +++ b/po/sr.po @@ -1,24 +1,24 @@ -# Croatian translation to xfce4-xkb-plugin package. +# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the xfce4-xkb-plugin package. -# Ivica Kolić ik...@yahoo.com, 2011. -# +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR EMAIL@ADDRESS, YEAR. +# Саша Петровић salepetron...@gmail.com, 2012. +# msgid msgstr -Project-Id-Version: xfce4-xkb-plugin\n +Project-Id-Version: master\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2011-11-04 21:50+0600\n -PO-Revision-Date: 2011-11-01 01:28+0100\n -Last-Translator: Ivica Kolić ik...@yahoo.com\n -Language-Team: Hrvatski \n +PO-Revision-Date: 2012-09-27 10:25+0200\n +Last-Translator: Саша Петровић salepetron...@gmail.com\n +Language-Team: српски xfce-i...@xfce.org\n +Language: \n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n -Content-Transfer-Encoding: 8bits\n -Language: \n -Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2);\n -X-Poedit-Language: Croatian\n -X-Poedit-SourceCharset: utf-8\n -X-Poedit-Country: CROATIA\n +Content-Transfer-Encoding: 8bit\n +Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 (n +%10010 || n%100=20) ? 1 : 2);\n +X-Generator: Gtranslator 2.91.5\n #: ../panel-plugin/xkb-settings-dialog.c:489 msgid @@ -26,106 +26,110 @@ msgid disabled from the config file.\n \n See the README file for more information. -msgstr XKB konfiguracijske promjene su \\ nonemogućene iz konfiguracijske datoteke.\\ n \\ nPogledajte README datoteku za više informacija. +msgstr +XKB измене подешавања су\n +онемогућене из датотеке подешавања.\n +\n +Погледајте README датотеку за више податка. #: ../panel-plugin/xkb-settings-dialog.c:515 #: ../panel-plugin/xkb-plugin.desktop.in.in.h:1 msgid Keyboard Layouts -msgstr Rasporedi tipkovnice +msgstr Распореди тастатуре #: ../panel-plugin/xkb-settings-dialog.c:537 msgid Keyboard model: -msgstr Model tipkovnice +msgstr Модел тастатуре: #. toggle layout option #: ../panel-plugin/xkb-settings-dialog.c:562 msgid Change layout option: -msgstr Opcija promjene rasporeda +msgstr Измени могућности распореда: #. compose key position option #: ../panel-plugin/xkb-settings-dialog.c:588 msgid Compose key position: -msgstr +msgstr Положај тастера композе: #. the actual layouts #: ../panel-plugin/xkb-settings-dialog.c:615 msgid Keyboard layouts: -msgstr Rasporedi tipkovnice: +msgstr Распореди тастатуре: #: ../panel-plugin/xkb-settings-dialog.c:628 msgid Default -msgstr Zadano +msgstr Подразумевано #: ../panel-plugin/xkb-settings-dialog.c:635 msgid Layout -msgstr Raspored +msgstr Распоред #: ../panel-plugin/xkb-settings-dialog.c:643 msgid Variant -msgstr Varijanta +msgstr Подврста #. *** #: ../panel-plugin/xkb-settings-dialog.c:687 msgid Show layout as: -msgstr Pokaži raspored kao: +msgstr Приказ распоред као: #: ../panel-plugin/xkb-settings-dialog.c:692 msgid image -msgstr sliku +msgstr слика #: ../panel-plugin/xkb-settings-dialog.c:693 msgid text -msgstr tekst +msgstr текст #. text size option #: ../panel-plugin/xkb-settings-dialog.c:698 msgid Text size: -msgstr Veličina teksta: +msgstr Величина текста: #: ../panel-plugin/xkb-settings-dialog.c:703 msgid small -msgstr mali +msgstr мали #: ../panel-plugin/xkb-settings-dialog.c:704 msgid medium -msgstr srednji +msgstr средњи #: ../panel-plugin/xkb-settings-dialog.c:705 msgid large -msgstr veliki +msgstr велики #: ../panel-plugin/xkb-settings-dialog.c:709 msgid Manage layout: -msgstr Upravljajte raporedom +msgstr Управљај распоредом: #: ../panel-plugin/xkb-settings-dialog.c:714 msgid globally -msgstr globalno +msgstr опште #: ../panel-plugin/xkb-settings-dialog.c:715 msgid per window -msgstr za svaki prozor +msgstr за сваки прозор #: ../panel-plugin/xkb-settings-dialog.c:716 msgid per application -msgstr za svaki program +msgstr по програму #: ../panel-plugin/xkb-settings-dialog.c:758 msgid Keyboard Layouts Plugin -msgstr Priključak rasporeda tipkovnice +msgstr Прикључци распореда тастатуре #: ../panel-plugin/xkb-settings-dialog.c:764
[Xfce4-commits] xfce4-datetime-plugin:master l10n: Serbian translation
Updating branch refs/heads/master to dc95f397e0988e0096f153975a4a38a0318fc02a (commit) from 2a124335e900097fb6c16f6fe402736066945224 (commit) commit dc95f397e0988e0096f153975a4a38a0318fc02a Author: Саша Петровић salepetron...@gmail.com Date: Thu Sep 27 12:50:31 2012 +0200 l10n: Serbian translation New status: 17 messages complete with 2 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/{lt.po = sr.po} | 53 ++ 1 files changed, 28 insertions(+), 25 deletions(-) diff --git a/po/lt.po b/po/sr.po similarity index 64% copy from po/lt.po copy to po/sr.po index 55dbbc2..ff31b09 100644 --- a/po/lt.po +++ b/po/sr.po @@ -2,109 +2,112 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR EMAIL@ADDRESS, YEAR. -# Algimantas Margevičius margevicius.algiman...@gmail.com, 2012. +# Саша Петровић salepetron...@gmail.com, 2012. # msgid msgstr -Project-Id-Version: date-time\n +Project-Id-Version: master\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2009-07-31 13:39-0500\n -PO-Revision-Date: 2012-01-24 15:18+0200\n -Last-Translator: Algimantas Margevičius margevicius.algiman...@gmail.com\n -Language-Team: Lietuvių \n +PO-Revision-Date: 2012-09-27 12:49+0200\n +Last-Translator: Саша Петровић salepetron...@gmail.com\n +Language-Team: српски xfce-i...@xfce.org\n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 (n -%10010 || n%100=20) ? 1 : 2)\n +%10010 || n%100=20) ? 1 : 2);\n +X-Generator: Gtranslator 2.91.5\n #: ../panel-plugin/datetime.c:82 msgid Invalid format -msgstr Netinkamas formatas +msgstr Неисправан облик #: ../panel-plugin/datetime.c:87 msgid Error -msgstr Klaida +msgstr Грeшкa #: ../panel-plugin/datetime-dialog.c:42 msgid Date, then time -msgstr Data, tada laikas +msgstr Датум, па време #: ../panel-plugin/datetime-dialog.c:43 msgid Time, then date -msgstr Laikas, tada data +msgstr Време, па датум #: ../panel-plugin/datetime-dialog.c:44 msgid Date only -msgstr Tik data +msgstr Само датум #: ../panel-plugin/datetime-dialog.c:45 msgid Time only -msgstr Tik laikas +msgstr Само време #. placeholder #: ../panel-plugin/datetime-dialog.c:85 ../panel-plugin/datetime-dialog.c:96 msgid Custom... -msgstr Pasirinkta... +msgstr Прилагођено... #: ../panel-plugin/datetime-dialog.c:131 msgid Select font -msgstr Pasirinkite šriftą +msgstr Изаберите словни лик #: ../panel-plugin/datetime-dialog.c:332 #, c-format msgid Unable to open the following url: %s -msgstr Nepavyko atverti url: %s +msgstr Не могу да отворим следећу адресу: %s #: ../panel-plugin/datetime-dialog.c:371 +#, fuzzy msgid Datetime -msgstr Data laikas +msgstr Датум и време #. #. * layout frame #. #: ../panel-plugin/datetime-dialog.c:391 msgid Layout -msgstr Išdėstymas +msgstr Распоред #. Format label #. format label #: ../panel-plugin/datetime-dialog.c:405 ../panel-plugin/datetime-dialog.c:467 #: ../panel-plugin/datetime-dialog.c:570 msgid Format: -msgstr Formatas: +msgstr Облик: #. #. * Date frame #. #: ../panel-plugin/datetime-dialog.c:425 msgid Date -msgstr Data +msgstr Датум #: ../panel-plugin/datetime-dialog.c:437 msgid The date will appear in a tooltip. -msgstr Rodyti datą paaiškinimuose. +msgstr датум ће се јављати у облачићу. #. font label #: ../panel-plugin/datetime-dialog.c:450 ../panel-plugin/datetime-dialog.c:553 msgid Font: -msgstr Šriftas: +msgstr Словни лик: #. #. * time frame #. #: ../panel-plugin/datetime-dialog.c:528 msgid Time -msgstr Laikas +msgstr Време #: ../panel-plugin/datetime-dialog.c:540 msgid The time will appear in a tooltip. -msgstr Paaiškinimuose bus rodomas laikas. +msgstr Време ће се јављати у облачићу. #: ../panel-plugin/datetime.desktop.in.in.h:1 msgid Date and Time plugin with a simple calendar -msgstr Datos ir laiko įskiepis su paprastu kalendorium +msgstr Прикучак за датум и време са простим календаром #: ../panel-plugin/datetime.desktop.in.in.h:2 +#, fuzzy msgid DateTime -msgstr Data laikas +msgstr Датум и време ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:bluesabre/display-settings Added mirror option to placement settings.
Updating branch refs/heads/bluesabre/display-settings to e4b524ca64eb37f4688e922fc725118314368e8d (commit) from e994fbb59a4b200c4c62cbc27400d54630e3cb42 (commit) commit e4b524ca64eb37f4688e922fc725118314368e8d Author: Sean Davis smd.seanda...@gmail.com Date: Thu Sep 27 09:12:01 2012 -0400 Added mirror option to placement settings. dialogs/display-settings/main.c | 23 +++ dialogs/display-settings/xfce-randr.h |1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index 098e55a..d7b9c59 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -344,6 +344,15 @@ display_setting_positions_changed (GtkComboBox *combobox, XFCE_RANDR_POS_Y (xfce_randr) = current_mode-height; break; +case XFCE_RANDR_PLACEMENT_MIRROR: // Mirror Display +selected_x = XFCE_RANDR_POS_X (xfce_randr); +selected_y = XFCE_RANDR_POS_Y (xfce_randr); + +xfce_randr-active_output = selected_display; +XFCE_RANDR_POS_X (xfce_randr) = selected_x; +XFCE_RANDR_POS_Y (xfce_randr) = selected_y; +break; + default: break; } @@ -388,28 +397,34 @@ display_setting_positions_populate (GtkBuilder *builder) display_setting_positions_changed, builder, NULL); +/* Insert mirror */ +gtk_list_store_append (GTK_LIST_STORE (model), iter); +gtk_list_store_set (GTK_LIST_STORE (model), iter, +COLUMN_COMBO_NAME, _(Mirror), +COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_MIRROR, -1); + /* Insert left-of */ gtk_list_store_append (GTK_LIST_STORE (model), iter); gtk_list_store_set (GTK_LIST_STORE (model), iter, -COLUMN_COMBO_NAME, _(left of), +COLUMN_COMBO_NAME, _(Left of), COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_LEFT, -1); /* Insert right-of */ gtk_list_store_append (GTK_LIST_STORE (model), iter); gtk_list_store_set (GTK_LIST_STORE (model), iter, -COLUMN_COMBO_NAME, _(right of), +COLUMN_COMBO_NAME, _(Right of), COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_RIGHT, -1); /* Insert above */ gtk_list_store_append (GTK_LIST_STORE (model), iter); gtk_list_store_set (GTK_LIST_STORE (model), iter, -COLUMN_COMBO_NAME, _(above), +COLUMN_COMBO_NAME, _(Above), COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_UP, -1); /* Insert below */ gtk_list_store_append (GTK_LIST_STORE (model), iter); gtk_list_store_set (GTK_LIST_STORE (model), iter, -COLUMN_COMBO_NAME, _(below), +COLUMN_COMBO_NAME, _(Below), COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_DOWN, -1); diff --git a/dialogs/display-settings/xfce-randr.h b/dialogs/display-settings/xfce-randr.h index 9aed8de..4f40305 100644 --- a/dialogs/display-settings/xfce-randr.h +++ b/dialogs/display-settings/xfce-randr.h @@ -34,6 +34,7 @@ #define XFCE_RANDR_POS_Y(randr) (randr-position[randr-active_output].y) #define XFCE_RANDR_ROTATIONS_MASK (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270) #define XFCE_RANDR_REFLECTIONS_MASK (RR_Reflect_X|RR_Reflect_Y) +#define XFCE_RANDR_PLACEMENT_MIRROR -1 #define XFCE_RANDR_PLACEMENT_UP 0 #define XFCE_RANDR_PLACEMENT_RIGHT1 #define XFCE_RANDR_PLACEMENT_DOWN 2 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:bluesabre/display-settings Fix for -1 is list terminator on mirror variable.
Updating branch refs/heads/bluesabre/display-settings to 207fe4d903bc9ba09b742627f04e0bc99c888ff9 (commit) from e4b524ca64eb37f4688e922fc725118314368e8d (commit) commit 207fe4d903bc9ba09b742627f04e0bc99c888ff9 Author: Sean Davis smd.seanda...@gmail.com Date: Thu Sep 27 09:18:33 2012 -0400 Fix for -1 is list terminator on mirror variable. dialogs/display-settings/main.c |1 - dialogs/display-settings/xfce-randr.h |2 +- 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index d7b9c59..79a948a 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -426,7 +426,6 @@ display_setting_positions_populate (GtkBuilder *builder) gtk_list_store_set (GTK_LIST_STORE (model), iter, COLUMN_COMBO_NAME, _(Below), COLUMN_COMBO_VALUE, XFCE_RANDR_PLACEMENT_DOWN, -1); - /* Reconnect the signal */ g_signal_connect (G_OBJECT (combobox), changed, G_CALLBACK (display_setting_positions_changed), builder); diff --git a/dialogs/display-settings/xfce-randr.h b/dialogs/display-settings/xfce-randr.h index 4f40305..78a0e7e 100644 --- a/dialogs/display-settings/xfce-randr.h +++ b/dialogs/display-settings/xfce-randr.h @@ -34,11 +34,11 @@ #define XFCE_RANDR_POS_Y(randr) (randr-position[randr-active_output].y) #define XFCE_RANDR_ROTATIONS_MASK (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270) #define XFCE_RANDR_REFLECTIONS_MASK (RR_Reflect_X|RR_Reflect_Y) -#define XFCE_RANDR_PLACEMENT_MIRROR -1 #define XFCE_RANDR_PLACEMENT_UP 0 #define XFCE_RANDR_PLACEMENT_RIGHT1 #define XFCE_RANDR_PLACEMENT_DOWN 2 #define XFCE_RANDR_PLACEMENT_LEFT 3 +#define XFCE_RANDR_PLACEMENT_MIRROR 4 /* check for randr 1.3 or better */ #if RANDR_MAJOR 1 || (RANDR_MAJOR == 1 RANDR_MINOR = 3) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:bluesabre/display-settings Added detection of relative display position.
Updating branch refs/heads/bluesabre/display-settings to dc10e401b2a5889a53ec1df459043deed0ffcc81 (commit) from 207fe4d903bc9ba09b742627f04e0bc99c888ff9 (commit) commit dc10e401b2a5889a53ec1df459043deed0ffcc81 Author: Sean Davis smd.seanda...@gmail.com Date: Thu Sep 27 10:23:48 2012 -0400 Added detection of relative display position. dialogs/display-settings/main.c | 81 +++ 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index 79a948a..af39b61 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -498,6 +498,86 @@ display_setting_active_displays_populate (GtkBuilder *builder) } static void +display_setting_guess_positioning (GtkBuilder *builder) +{ +GObject *position_combo, *display_combo; +gint current_x, current_y, index; +guint n, current_display; + +current_display = xfce_randr-active_output; +current_x = XFCE_RANDR_POS_X (xfce_randr); +current_y = XFCE_RANDR_POS_Y (xfce_randr); + +position_combo = gtk_builder_get_object(builder, randr-position); +display_combo = gtk_builder_get_object(builder, randr-active-displays); + +g_object_disconnect (position_combo, any_signal::changed, + display_setting_positions_changed, + builder, NULL); + +g_object_disconnect (display_combo, any_signal::changed, + display_setting_active_displays_changed, + builder, NULL); + +index = 0; + +for (n = 0; n display_settings_get_n_active_outputs (); n++) +{ +if (n != current_display) +{ +xfce_randr-active_output = n; + +/* Check for mirror */ +if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) + (XFCE_RANDR_POS_Y (xfce_randr) == current_y) ) { +gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 0 ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +break; +} + +/* Check for Left Of */ +if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) + (XFCE_RANDR_POS_X (xfce_randr) current_x) ) { +gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 1 ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +break; +} + +/* Check for Right Of */ +if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) + (XFCE_RANDR_POS_X (xfce_randr) current_x) ) { +gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 2 ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +break; +} + +/* Check for Above */ +if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) + (XFCE_RANDR_POS_Y (xfce_randr) current_y) ) { +gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 3 ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +break; +} + +/* Check for Below */ +if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) + (XFCE_RANDR_POS_Y (xfce_randr) current_y) ) { +gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 4 ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +break; +} + +index++; +} +} + +xfce_randr-active_output = current_display; + +g_signal_connect (G_OBJECT (position_combo), changed, G_CALLBACK (display_setting_positions_changed), builder); +g_signal_connect (G_OBJECT (display_combo), changed, G_CALLBACK (display_setting_active_displays_changed), builder); +} + +static void display_setting_reflections_changed (GtkComboBox *combobox, GtkBuilder *builder) { @@ -1061,6 +1141,7 @@ display_settings_treeview_selection_changed (GtkTreeSelection *selection, /* Update the combo boxes */ display_setting_positions_populate (builder); display_setting_active_displays_populate (builder); +display_setting_guess_positioning (builder); display_setting_output_status_populate (builder); display_setting_mirror_displays_populate (builder); display_setting_resolutions_populate (builder); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Handle a negative minimal volume correctly
Updating branch refs/heads/master to ddda5c6e98f17d407405a7020d7b7804f9ba4b2a (commit) from 554fb0d71bd9a9df86f8aea912cbe34d3f080a81 (commit) commit ddda5c6e98f17d407405a7020d7b7804f9ba4b2a Author: Guido Berhoerster guido+x...@berhoerster.name Date: Sat Sep 22 09:15:32 2012 +0200 Handle a negative minimal volume correctly NEWS |5 + configure.in.in |4 ++-- libxfce4mixer/libxfce4mixer.c|3 +++ panel-plugin/xfce-mixer-plugin.c |6 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 06eed79..41ffe45 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +4.9.0 += +- Handle a negative minimal volume correctly. + + 4.8.0 = - Fix too small plugin button in the new panel. diff --git a/configure.in.in b/configure.in.in index 0f3f977..e043134 100644 --- a/configure.in.in +++ b/configure.in.in @@ -21,11 +21,11 @@ dnl *** dnl *** Version information *** dnl *** m4_define([xfce4_mixer_version_major], [4]) -m4_define([xfce4_mixer_version_minor], [8]) +m4_define([xfce4_mixer_version_minor], [9]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], []) +m4_define([xfce4_mixer_version_tag], [git]) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [svn], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 69746c0..d75c571 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -218,6 +218,9 @@ xfce_mixer_get_max_volume (gint *volumes, g_return_val_if_fail (volumes != NULL, 0); + if (num_channels 0) +max = volumes[0]; + for (--num_channels; num_channels = 0; --num_channels) if (volumes[num_channels] max) max = volumes[num_channels]; diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index f6cf276..d56d43f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -525,6 +525,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) { XfceMixerTrackType track_type; gboolean muted = FALSE; + gint volume_range; gdoublevolume; gint *volumes; gchar *tip_text; @@ -537,8 +538,11 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) volumes = g_new (gint, mixer_plugin-track-num_channels); gst_mixer_get_volume (GST_MIXER (mixer_plugin-card), mixer_plugin-track, volumes); + /* Determine difference between max and min volume */ + volume_range = mixer_plugin-track-max_volume - mixer_plugin-track-min_volume; + /* Determine maximum value as double between 0.0 and 1.0 */ - volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin-track-num_channels)) / mixer_plugin-track-max_volume; + volume = ((gdouble) xfce_mixer_get_max_volume (volumes, mixer_plugin-track-num_channels) - mixer_plugin-track-min_volume) / volume_range; /* Set tooltip (e.g. 'Master: 50%') */ tip_text = g_strdup_printf (_(%s: %i%%), mixer_plugin-track_label, (gint) (volume * 100)); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Fix a potential NULL pointer dereference
Updating branch refs/heads/master to b15809e07aeec55cce1d8184f4ec4905ceb97130 (commit) from ddda5c6e98f17d407405a7020d7b7804f9ba4b2a (commit) commit b15809e07aeec55cce1d8184f4ec4905ceb97130 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Sat Sep 22 09:15:33 2012 +0200 Fix a potential NULL pointer dereference NEWS |1 + libxfce4mixer/xfce-mixer-track-type.c |4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index 41ffe45..50eff9e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 4.9.0 = - Handle a negative minimal volume correctly. +- Fix a potential NULL pointer dereference. 4.8.0 diff --git a/libxfce4mixer/xfce-mixer-track-type.c b/libxfce4mixer/xfce-mixer-track-type.c index f0f1cb8..298443c 100644 --- a/libxfce4mixer/xfce-mixer-track-type.c +++ b/libxfce4mixer/xfce-mixer-track-type.c @@ -57,7 +57,9 @@ XfceMixerTrackType xfce_mixer_track_type_new (GstMixerTrack *track) { XfceMixerTrackType type = XFCE_MIXER_TRACK_TYPE_CAPTURE; - + + g_return_val_if_fail (GST_IS_MIXER_TRACK (track), G_TYPE_INVALID); + if (G_UNLIKELY (GST_IS_MIXER_OPTIONS (track))) type = XFCE_MIXER_TRACK_TYPE_OPTIONS; else ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Do not try to destroy the mixer window twice after a delete-event (bug #8288)
Updating branch refs/heads/master to f9ca75a7dedad8eaef97c0a1a11d397664bae78a (commit) from b15809e07aeec55cce1d8184f4ec4905ceb97130 (commit) commit f9ca75a7dedad8eaef97c0a1a11d397664bae78a Author: Guido Berhoerster guido+x...@berhoerster.name Date: Sat Sep 22 09:15:33 2012 +0200 Do not try to destroy the mixer window twice after a delete-event (bug #8288) NEWS|2 ++ xfce4-mixer/xfce-mixer-window.c |6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 50eff9e..7bdbf49 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ = - Handle a negative minimal volume correctly. - Fix a potential NULL pointer dereference. +- Do not try to destroy the mixer window twice after a delete-event + (bug #8288). 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index acbc67f..0c6a1e9 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -333,8 +333,6 @@ xfce_mixer_window_close (GtkAction *action, { /* This is a nasty hack to save the settings before the application quits */ xfce_mixer_window_closed (GTK_WIDGET (window), NULL, window); - - gtk_main_quit (); } @@ -350,7 +348,9 @@ xfce_mixer_window_closed (GtkWidget *window, gtk_window_get_size (GTK_WINDOW (mixer_window), width, height); g_object_set (G_OBJECT (mixer_window-preferences), window-width, width, window-height, height, NULL); - return FALSE; + gtk_main_quit (); + + return TRUE; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Modernize build system and build panel plugin as a module
Updating branch refs/heads/master to 4f1e62309cf996f8a593438fa9edc6afa6d7b522 (commit) from f9ca75a7dedad8eaef97c0a1a11d397664bae78a (commit) commit 4f1e62309cf996f8a593438fa9edc6afa6d7b522 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:03 2012 +0200 Modernize build system and build panel plugin as a module Modernize configure.in.in and rename to configure.ac.in. Require a C99 capable compiler. Build the plugin as a module. Remove unnecessary trickery with desktop file substitutions. Remove HACKING, THANKS, TODO and add INSTALL file. Fix dummy ChangeLog generation. AUTHORS|1 + INSTALL| 365 Makefile.am| 19 +- NEWS |1 + TODO |9 - autogen.sh | 30 ++- configure.in.in = configure.ac.in | 24 +- panel-plugin/Makefile.am | 42 +-- ...mixer-plugin.desktop.in.in = mixer.desktop.in} |3 +- panel-plugin/xfce-mixer-plugin.c |2 +- po/POTFILES.in |4 +- xfce4-mixer/Makefile.am| 19 +- ...-mixer.desktop.in.in = xfce4-mixer.desktop.in} |0 13 files changed, 442 insertions(+), 77 deletions(-) diff --git a/AUTHORS b/AUTHORS index c40ddc1..14d2553 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,2 @@ Jannis Pohlmann jan...@xfce.org +Guido Berhoerster guido+x...@berhoerster.name diff --git a/HACKING b/HACKING deleted file mode 100644 index e69de29..000 diff --git a/INSTALL b/INSTALL new file mode 100644 index 000..81fd332 --- /dev/null +++ b/INSTALL @@ -0,0 +1,365 @@ +Installation Instructions +* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. + +Basic Installation +== + + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + + The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and + documentation. When installing into a prefix owned
[Xfce4-commits] xfce4-mixer:master Support xfce4-panel 4.10 with its deskbar mode
Updating branch refs/heads/master to f0e810321ef39e0ab57b567469b3785626f7cffc (commit) from 396bda88e53ff968bbbd30c46396695de0e90476 (commit) commit f0e810321ef39e0ab57b567469b3785626f7cffc Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Support xfce4-panel 4.10 with its deskbar mode Add support for the deskbar mode introduced by xfce4-panel 4.10 and set the small property for the plugin so that it only occupies a single row in deskbar mode (bug #8350). NEWS |1 + configure.ac.in |1 + panel-plugin/xfce-mixer-plugin.c |6 ++ panel-plugin/xfce-volume-button.c |6 +- 4 files changed, 13 insertions(+), 1 deletions(-) diff --git a/NEWS b/NEWS index ab83293..1f72815 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ - Modernize build system and build panel plugin as a module. - Use standard icons where possible. - Update the icons on theme change (bug #3498). +- Support xfce4-panel 4.10 with its deskbar mode (bug #8350). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 8624259..6a42c74 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -94,6 +94,7 @@ XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0]) +XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) dnl ** diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index e2470a0..a396cc6 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -210,6 +210,9 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); + /* Only occupy a single row in deskbar mode */ + xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (mixer_plugin), TRUE); + /* Connect to plugin signals */ g_signal_connect_swapped (G_OBJECT (plugin), free-data, G_CALLBACK (xfce_mixer_plugin_free), mixer_plugin); g_signal_connect_swapped (G_OBJECT (plugin), size-changed, G_CALLBACK (xfce_mixer_plugin_size_changed), mixer_plugin); @@ -231,6 +234,9 @@ xfce_mixer_plugin_size_changed (XfceMixerPlugin *mixer_plugin, { g_return_val_if_fail (mixer_plugin != NULL, FALSE); + /* The plugin only occupies a single row */ + size /= xfce_panel_plugin_get_nrows (XFCE_PANEL_PLUGIN (mixer_plugin)); + /* Determine size for the volume button icons */ size -= 2 + 2 * MAX (mixer_plugin-button-style-xthickness, mixer_plugin-button-style-ythickness); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index cc9bfed..adb94a7 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -38,6 +38,10 @@ +#define VOLUME_EPSILON 0.005 + + + /* Signal identifiers */ enum { @@ -415,7 +419,7 @@ xfce_volume_button_update (XfceVolumeButton *button) /* Determine the difference between upper and lower bound (= volume range) */ range = (upper - lower) / (G_N_ELEMENTS (icons) - 2); - if (G_UNLIKELY (button-is_muted || value 0.005)) + if (G_UNLIKELY (button-is_muted || value VOLUME_EPSILON)) { /* By definition, use the first icon if the button is muted or the volume is 0 */ pixbuf = button-pixbufs[0]; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Make the panel plugin use sensible default settings
Updating branch refs/heads/master to df715a44cee9f5c1ff4a6bef3427f0c8ef717823 (commit) from 421d875b57d6a9e05cd58f79183a1691eb23633b (commit) commit df715a44cee9f5c1ff4a6bef3427f0c8ef717823 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Make the panel plugin use sensible default settings Make the panel plugin use sensible default settings (first card, master track) in the absence of an existing configuration instead of starting in an invalid state and forcing the user to configure it (bug #5716, bug #6624, bug #7125). NEWS |3 ++ libxfce4mixer/libxfce4mixer.c | 52 libxfce4mixer/libxfce4mixer.h |2 + libxfce4mixer/xfce-mixer-track-combo.c |7 ++-- panel-plugin/xfce-mixer-plugin.c | 49 +- 5 files changed, 101 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index d6f..5035212 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ - Update the icons on theme change (bug #3498). - Support xfce4-panel 4.10 with its deskbar mode (bug #8350). - Use xfconf for the panel plugin configuration. +- Make the panel plugin use sensible default settings (first card, master + track) in the absence of an existing configuration (bug #5716, bug #6624, + bug #7125). 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index b7ad3b7..86ea5db 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -128,6 +128,23 @@ xfce_mixer_get_card (const gchar *name) +GstElement * +xfce_mixer_get_default_card (void) +{ + GList *cards; + GstElement *card = NULL; + + cards = xfce_mixer_get_cards (); + + /* Try to get the first card */ + if (g_list_length (cards) 0) +card = g_list_first (cards)-data; + + return card; +} + + + const gchar * xfce_mixer_get_card_display_name (GstElement *card) { @@ -189,6 +206,41 @@ xfce_mixer_get_track (GstElement *card, +GstMixerTrack * +xfce_mixer_get_default_track (GstElement *card) +{ + GstMixerTrack *track = NULL; + const GList *iter; + GstMixerTrack *track_tmp; + const GList *tracks; + + g_return_val_if_fail (GST_IS_MIXER (card), NULL); + + /* Try to get the master track */ + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track_tmp = GST_MIXER_TRACK (iter-data); + + if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER)) +{ + track = track_tmp; + break; +} +} + + /* If there is no master track, try to get the first track */ + if (!GST_IS_MIXER_TRACK (track)) +{ + tracks = gst_mixer_list_tracks (GST_MIXER (card)); + if (g_list_length (tracks) 0) +track = g_list_first (tracks)-data; +} + + return track; +} + + + #ifdef HAVE_GST_MIXER_NOTIFICATION guint xfce_mixer_bus_connect (GCallback callback, diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index a68ff6d..93365dd 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -38,11 +38,13 @@ void xfce_mixer_shutdown (void); GList *xfce_mixer_get_cards (void); GstElement*xfce_mixer_get_card (const gchar *name); +GstElement*xfce_mixer_get_default_card (void); const gchar *xfce_mixer_get_card_internal_name (GstElement*card); const gchar *xfce_mixer_get_card_display_name (GstElement*card); void xfce_mixer_select_card(GstElement*card); GstMixerTrack *xfce_mixer_get_track (GstElement*card, const gchar *track_name); +GstMixerTrack *xfce_mixer_get_default_track (GstElement*card); #ifdef HAVE_GST_MIXER_NOTIFICATION guint xfce_mixer_bus_connect(GCallback callback, diff --git a/libxfce4mixer/xfce-mixer-track-combo.c b/libxfce4mixer/xfce-mixer-track-combo.c index f99a0ef..4c19acf 100644 --- a/libxfce4mixer/xfce-mixer-track-combo.c +++ b/libxfce4mixer/xfce-mixer-track-combo.c @@ -192,7 +192,6 @@ xfce_mixer_track_combo_set_soundcard (XfceMixerTrackCombo *combo, XfceMixerTrackType type; GtkTreeItertree_iter; const GList *iter; - GList *cards; gchar *label; gint counter; gint active_index = 0; @@ -205,10 +204,10 @@ xfce_mixer_track_combo_set_soundcard (XfceMixerTrackCombo *combo, combo-card = card; else { - cards = xfce_mixer_get_cards (); + card = xfce_mixer_get_default_card (); - if (G_LIKELY (g_list_length (cards) 0)) -combo-card = g_list_first (cards)-data; + if (GST_IS_MIXER (card)) +combo-card = card; } /* Try to re-use the current track */ diff --git
[Xfce4-commits] xfce4-mixer:master Clearly indicate in the plugin when there is no valid card and/or element
Updating branch refs/heads/master to bd01221ec80da339af7cba076d46aa3fdeee4053 (commit) from df715a44cee9f5c1ff4a6bef3427f0c8ef717823 (commit) commit bd01221ec80da339af7cba076d46aa3fdeee4053 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Clearly indicate in the plugin when there is no valid card and/or element If the panel plugin has no valid configuration, that is no valid card and/or element, show the muted icon and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). NEWS |2 + panel-plugin/xfce-mixer-plugin.c |6 +- panel-plugin/xfce-volume-button.c | 131 +++-- panel-plugin/xfce-volume-button.h | 22 --- 4 files changed, 143 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index 5035212..01cfa15 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ - Make the panel plugin use sensible default settings (first card, master track) in the absence of an existing configuration (bug #5716, bug #6624, bug #7125). +- Clearly indicate in the plugin when there is no valid card and/or element + and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 1062d1b..ef4d49f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -610,10 +610,11 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) g_return_if_fail (IS_XFCE_MIXER_PLUGIN (mixer_plugin)); - /* Reset tooltip and return if the card or track is invalid */ + /* Set the volume button to invalid state and return if the card or track is invalid */ if (!GST_IS_MIXER (mixer_plugin-card) || !GST_IS_MIXER_TRACK (mixer_plugin-track)) { - gtk_tooltips_set_tip (mixer_plugin-tooltips, mixer_plugin-button, NULL, NULL); + xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin-button), FALSE); + gtk_tooltips_set_tip (mixer_plugin-tooltips, mixer_plugin-button, _(No valid device and/or element.), NULL); return; } @@ -641,6 +642,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin) muted = !GST_MIXER_TRACK_HAS_FLAG (mixer_plugin-track, GST_MIXER_TRACK_RECORD); /* Update the volume button */ + xfce_volume_button_set_is_configured (XFCE_VOLUME_BUTTON (mixer_plugin-button), TRUE); xfce_volume_button_set_volume (XFCE_VOLUME_BUTTON (mixer_plugin-button), volume); xfce_volume_button_set_muted (XFCE_VOLUME_BUTTON (mixer_plugin-button), muted); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index adb94a7..3b5d90e 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -42,6 +42,16 @@ +/* Properties */ +enum +{ + PROP_0, + PROP_IS_CONFIGURED, + N_PROPERTIES, +}; + + + /* Signal identifiers */ enum { @@ -72,6 +82,14 @@ static void xfce_volume_button_class_init (XfceVolumeButtonClass *klas static void xfce_volume_button_init (XfceVolumeButton *button); static void xfce_volume_button_dispose(GObject *object); static void xfce_volume_button_finalize (GObject *object); +static void xfce_volume_button_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void xfce_volume_button_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); #if 0 static gboolean xfce_volume_button_key_pressed(GtkWidget *widget, GdkEventKey *event, @@ -119,6 +137,9 @@ struct _XfceVolumeButton /* Array of preloaded icons */ GdkPixbuf **pixbufs; + /* Whether the button is configured */ + gbooleanis_configured; + /* Mute state of the button */ gbooleanis_muted; }; @@ -169,10 +190,20 @@ xfce_volume_button_class_init (XfceVolumeButtonClass *klass) gobject_class = G_OBJECT_CLASS (klass); gobject_class-dispose = xfce_volume_button_dispose; gobject_class-finalize = xfce_volume_button_finalize; + gobject_class-set_property = xfce_volume_button_set_property; + gobject_class-get_property = xfce_volume_button_get_property; klass-volume_changed = xfce_volume_button_volume_changed; klass-mute_toggled = xfce_volume_button_mute_toggled; + g_object_class_install_property
[Xfce4-commits] xfce4-mixer:master Mute a track when the volume is set to 0% and unmute when set to a higher value
Updating branch refs/heads/master to f543917aea0dd551490cf25806c4260d9740b288 (commit) from e749d2a409a4228ac1f0a59c081f4d14b01b8297 (commit) commit f543917aea0dd551490cf25806c4260d9740b288 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Mute a track when the volume is set to 0% and unmute when set to a higher value Mute a track automatically when the volume button reaches 0% and unmute it again when above 0% (bug #8291). Improve the volume calculations by using round() rather than truncating. NEWS |2 + configure.ac.in |6 panel-plugin/xfce-mixer-plugin.c |6 +++- panel-plugin/xfce-volume-button.c | 43 - xfce4-mixer/xfce-mixer-track.c| 54 5 files changed, 91 insertions(+), 20 deletions(-) diff --git a/NEWS b/NEWS index c4ccfac..80a8b8a 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,8 @@ - Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips. - Indicate in the plugin tooltip whether the track is muted. +- Mute a track when the volume is set to 0% and unmute when set to a higher + value (bug #8291). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 6a42c74..f391d31 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -84,6 +84,12 @@ dnl *** Check for i18n support *** dnl ** XDT_I18N([@LINGUAS@]) +dnl ** +dnl *** Check for libm *** +dnl ** +AC_CHECK_HEADERS([math.h]) +AC_CHECK_LIB([m],[round]) + dnl *** dnl *** Check for required packages *** dnl *** diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 73fbef0..1dc6d97 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -23,6 +23,10 @@ #include config.h #endif +#ifdef HAVE_MATH_H +#include math.h +#endif + #include gtk/gtk.h #include gst/gst.h @@ -537,7 +541,7 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, volume_range = mixer_plugin-track-max_volume - mixer_plugin-track-min_volume; /* Determine new volume */ - new_volume = mixer_plugin-track-min_volume + (volume * volume_range); + new_volume = (gint) round (mixer_plugin-track-min_volume + (volume * volume_range)); /* Set all channel volumes to the new volume */ for (i = 0; i mixer_plugin-track-num_channels; ++i) diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index e80c792..826d4be 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -23,6 +23,10 @@ #include config.h #endif +#ifdef HAVE_MATH_H +#include math.h +#endif + #include gdk/gdk.h #include gtk/gtk.h @@ -216,7 +220,7 @@ xfce_volume_button_class_init (XfceVolumeButtonClass *klass) g_param_spec_boolean (is-muted, is-muted, is-muted, - FALSE, + TRUE, G_PARAM_READABLE | G_PARAM_WRITABLE)); button_signals[VOLUME_CHANGED] = g_signal_new (volume-changed, @@ -240,15 +244,15 @@ xfce_volume_button_init (XfceVolumeButton *button) button-is_configured = FALSE; - /* By default we expect the button not to be muted */ - button-is_muted = FALSE; - /* Allocate array for preloaded icons */ button-pixbufs = g_new0 (GdkPixbuf*, G_N_ELEMENTS (icons)-1); /* Create adjustment for the button (from 0.0 to 1.0 in 5% steps) */ button-adjustment = gtk_adjustment_new (0.0, 0.0, 1.0, 0.05, 0.05, 0.0); + /* Set to muted by default since the initial adjustment value is 0 */ + button-is_muted = TRUE; + /* Create a new scaled image for the button icon */ button-image = xfce_panel_image_new (); gtk_container_add (GTK_CONTAINER (button), button-image); @@ -478,7 +482,8 @@ xfce_volume_button_scrolled (GtkWidget*widget, GdkEventScroll *event, XfceVolumeButton *button) { - gdouble value; + gdouble old_value; + gdouble new_value; gdouble step_increment; g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); @@ -489,7 +494,7 @@ xfce_volume_button_scrolled (GtkWidget*widget, return TRUE; /* Get current adjustment value and the step increment size */ - g_object_get (G_OBJECT (button-adjustment), value, value, step-increment, step_increment, NULL); + g_object_get (G_OBJECT (button-adjustment), value, old_value, step-increment, step_increment, NULL); /* Distinguish between scroll directions */ switch (event-direction) @@ -497,20
[Xfce4-commits] xfce4-mixer:master Indicate in the plugin tooltip whether the track is muted
Updating branch refs/heads/master to e749d2a409a4228ac1f0a59c081f4d14b01b8297 (commit) from 87bb9e4fe2cdec665b6e7aefad2c0bc3695a2b98 (commit) commit e749d2a409a4228ac1f0a59c081f4d14b01b8297 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Indicate in the plugin tooltip whether the track is muted Let XfceVolumeButton keep state istelf by adding a is-muted property and remove the mute-toggled signal. NEWS |1 + panel-plugin/xfce-mixer-plugin.c | 16 +-- panel-plugin/xfce-volume-button.c | 84 panel-plugin/xfce-volume-button.h |3 +- 4 files changed, 61 insertions(+), 43 deletions(-) diff --git a/NEWS b/NEWS index c056db7..c4ccfac 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ and ignore mouse wheel and mute toggle events (bug #6625, bug #7630). - Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips. +- Indicate in the plugin tooltip whether the track is muted. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 5f367ea..73fbef0 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -68,8 +68,9 @@ static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume); -static void xfce_mixer_plugin_mute_toggled(XfceMixerPlugin *mixer_plugin, - gboolean mute); +static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, + GParamSpec *pspec, + GObject *object); static void xfce_mixer_plugin_update_track(XfceMixerPlugin *mixer_plugin); #ifdef HAVE_GST_MIXER_NOTIFICATION static void xfce_mixer_plugin_bus_message (GstBus *bus, @@ -205,7 +206,7 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) /* Create volume button for the plugin */ mixer_plugin-button = xfce_volume_button_new (); g_signal_connect_swapped (G_OBJECT (mixer_plugin-button), volume-changed, G_CALLBACK (xfce_mixer_plugin_volume_changed), mixer_plugin); - g_signal_connect_swapped (G_OBJECT (mixer_plugin-button), mute-toggled, G_CALLBACK (xfce_mixer_plugin_mute_toggled), mixer_plugin); + g_signal_connect_swapped (G_OBJECT (mixer_plugin-button), notify::is-muted, G_CALLBACK (xfce_mixer_plugin_is_muted_property_changed), mixer_plugin); g_signal_connect_swapped (G_OBJECT (mixer_plugin-button), clicked, G_CALLBACK (xfce_mixer_plugin_clicked), mixer_plugin); gtk_container_add (GTK_CONTAINER (mixer_plugin-hvbox), mixer_plugin-button); gtk_widget_show (mixer_plugin-button); @@ -556,9 +557,12 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, static void -xfce_mixer_plugin_mute_toggled (XfceMixerPlugin *mixer_plugin, -gboolean mute) +xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, + GParamSpec *pspec, + GObject *object) { + gboolean mute; + g_return_if_fail (mixer_plugin != NULL); g_return_if_fail (GST_IS_MIXER (mixer_plugin-card)); g_return_if_fail (GST_IS_MIXER_TRACK (mixer_plugin-track)); @@ -567,6 +571,8 @@ xfce_mixer_plugin_mute_toggled (XfceMixerPlugin *mixer_plugin, mixer_plugin-ignore_bus_messages = TRUE; #endif + g_object_get (object, is-muted, mute, NULL); + if (G_LIKELY (xfce_mixer_track_type_new (mixer_plugin-track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { /* Apply mute change to the sound card */ diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index ca2236b..e80c792 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -48,6 +48,7 @@ enum PROP_0, PROP_TRACK_LABEL, PROP_IS_CONFIGURED, + PROP_IS_MUTED, N_PROPERTIES, }; @@ -57,7 +58,6 @@ enum enum { VOLUME_CHANGED, - MUTE_TOGGLED, LAST_SIGNAL, }; @@ -106,8 +106,6 @@ static void xfce_volume_button_volume_changed (XfceVolumeButton *butt gdouble volume); static void xfce_volume_button_update_icons (XfceVolumeButton *button, GtkIconTheme *icon_theme); -static void xfce_volume_button_mute_toggled
[Xfce4-commits] xfce4-mixer:master Add an item to the panel plugin context menu for muting (bug #7944)
Updating branch refs/heads/master to e64ddd86a5abfaf6e34d5cd1d57eb0b5656ce6c6 (commit) from f543917aea0dd551490cf25806c4260d9740b288 (commit) commit e64ddd86a5abfaf6e34d5cd1d57eb0b5656ce6c6 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Add an item to the panel plugin context menu for muting (bug #7944) NEWS |1 + panel-plugin/xfce-mixer-plugin.c | 81 +++-- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/NEWS b/NEWS index 80a8b8a..e3a9aaf 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ - Indicate in the plugin tooltip whether the track is muted. - Mute a track when the volume is set to 0% and unmute when set to a higher value (bug #8291). +- Add an item to the panel plugin context menu for muting (bug #7944). 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 1dc6d97..a382cf1 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -72,6 +72,10 @@ static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, gdouble volume); +static void xfce_mixer_plugin_mute_changed(XfceMixerPlugin *mixer_plugin, + gboolean muted); +static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, + GtkCheckMenuItem *mute_menu_item); static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, GParamSpec *pspec, GObject *object); @@ -112,6 +116,7 @@ struct _XfceMixerPlugin /* Widgets */ GtkWidget *hvbox; GtkWidget *button; + GtkWidget *mute_menu_item; /* Reference to the plugin private xfconf channel */ XfconfChannel *plugin_channel; @@ -192,6 +197,8 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin) mixer_plugin-message_handler_id = 0; #endif + mixer_plugin-mute_menu_item = NULL; + /* Initialize xfconf */ xfconf_init (NULL); @@ -228,6 +235,12 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); + /* Add menu item for muting */ + mixer_plugin-mute_menu_item = gtk_check_menu_item_new_with_mnemonic (_(_Mute)); + xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (mixer_plugin-mute_menu_item)); + g_signal_connect_swapped (G_OBJECT (mixer_plugin-mute_menu_item), toggled, G_CALLBACK (xfce_mixer_plugin_mute_item_toggled), mixer_plugin); + gtk_widget_show (mixer_plugin-mute_menu_item); + /* Only occupy a single row in deskbar mode */ xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (mixer_plugin), TRUE); @@ -561,13 +574,9 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, static void -xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object) +xfce_mixer_plugin_mute_changed (XfceMixerPlugin *mixer_plugin, +gboolean muted) { - gboolean mute; - - g_return_if_fail (mixer_plugin != NULL); g_return_if_fail (GST_IS_MIXER (mixer_plugin-card)); g_return_if_fail (GST_IS_MIXER_TRACK (mixer_plugin-track)); @@ -575,19 +584,22 @@ xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, mixer_plugin-ignore_bus_messages = TRUE; #endif - g_object_get (object, is-muted, mute, NULL); if (G_LIKELY (xfce_mixer_track_type_new (mixer_plugin-track) == XFCE_MIXER_TRACK_TYPE_PLAYBACK)) { /* Apply mute change to the sound card */ - gst_mixer_set_mute (GST_MIXER (mixer_plugin-card), mixer_plugin-track, mute); + gst_mixer_set_mute (GST_MIXER (mixer_plugin-card), mixer_plugin-track, muted); } else { /* Toggle capture */ - gst_mixer_set_record (GST_MIXER (mixer_plugin-card), mixer_plugin-track, !mute); + gst_mixer_set_record (GST_MIXER (mixer_plugin-card), mixer_plugin-track, !muted); } + /* Update mute menu item */ + if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (mixer_plugin-mute_menu_item)) != muted) +gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mixer_plugin-mute_menu_item), muted); + #ifdef HAVE_GST_MIXER_NOTIFICATION mixer_plugin-ignore_bus_messages = FALSE; #endif @@ -596,6 +608,38 @@
[Xfce4-commits] xfce4-mixer:master Make name and description more meaningful (bug #5817)
Updating branch refs/heads/master to 397c3ea65a63d770509b141b4db45a11541e5ba3 (commit) from e64ddd86a5abfaf6e34d5cd1d57eb0b5656ce6c6 (commit) commit 397c3ea65a63d770509b141b4db45a11541e5ba3 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Make name and description more meaningful (bug #5817) NEWS |1 + panel-plugin/mixer.desktop.in |4 ++-- panel-plugin/xfce-plugin-dialog.c |2 +- xfce4-mixer/main.c |2 +- xfce4-mixer/xfce-mixer-window.c|4 ++-- xfce4-mixer/xfce4-mixer.desktop.in |4 ++-- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index e3a9aaf..cf8b487 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ - Mute a track when the volume is set to 0% and unmute when set to a higher value (bug #8291). - Add an item to the panel plugin context menu for muting (bug #7944). +- Make name and description more meaningful (bug #5817). 4.8.0 diff --git a/panel-plugin/mixer.desktop.in b/panel-plugin/mixer.desktop.in index fb46a41..fb45c14 100644 --- a/panel-plugin/mixer.desktop.in +++ b/panel-plugin/mixer.desktop.in @@ -1,7 +1,7 @@ [Xfce Panel] Type=X-XFCE-PanelPlugin -_Name=Mixer -_Comment=Volume control for your sound card +_Name=Audio Mixer +_Comment=Adjust volume levels Icon=multimedia-volume-control X-XFCE-Internal=false X-XFCE-Module=mixer diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index 789a18c..4a120bf 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -193,7 +193,7 @@ xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) gchar *title; gtk_window_set_icon_name (GTK_WINDOW (dialog), multimedia-volume-control); - gtk_window_set_title (GTK_WINDOW (dialog), _(Mixer Plugin)); + gtk_window_set_title (GTK_WINDOW (dialog), _(Audio Mixer Plugin)); xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dialog), _(Configure the mixer track and left-click command)); diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c index e459f8f..a4c32d7 100644 --- a/xfce4-mixer/main.c +++ b/xfce4-mixer/main.c @@ -58,7 +58,7 @@ main (intargc, #endif /* Set application name */ - g_set_application_name (_(Mixer)); + g_set_application_name (_(Audio Mixer)); /* Initialize GTK+ */ gtk_init (argc, argv); diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index 0c6a1e9..14bd6f3 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -164,7 +164,7 @@ xfce_mixer_window_init (XfceMixerWindow *window) /* Configure the main window */ gtk_window_set_icon_name (GTK_WINDOW (window), multimedia-volume-control); - gtk_window_set_title (GTK_WINDOW (window), _(Mixer)); + gtk_window_set_title (GTK_WINDOW (window), _(Audio 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); @@ -283,7 +283,7 @@ xfce_mixer_window_soundcard_changed (XfceMixerCardCombo *combo, g_return_if_fail (IS_XFCE_MIXER_WINDOW (window)); g_return_if_fail (GST_IS_MIXER (card)); - title = g_strdup_printf (%s - %s, _(Mixer), xfce_mixer_get_card_display_name (card)); + title = g_strdup_printf (%s - %s, _(Audio Mixer), xfce_mixer_get_card_display_name (card)); gtk_window_set_title (GTK_WINDOW (window), title); g_free (title); diff --git a/xfce4-mixer/xfce4-mixer.desktop.in b/xfce4-mixer/xfce4-mixer.desktop.in index c962d84..42ac691 100644 --- a/xfce4-mixer/xfce4-mixer.desktop.in +++ b/xfce4-mixer/xfce4-mixer.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] Version=1.0 -_Name=Mixer -_Comment=Audio mixer for the Xfce Desktop Environment +_Name=Audio Mixer +_Comment=Adjust volume levels Icon=multimedia-volume-control Exec=xfce4-mixer Type=Application ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Do not use deprecated APIs and adjust requirements to Xfce 4.10
Updating branch refs/heads/master to 2be23d2118b673e869d25f00d9ea5f1b427add3c (commit) from 397c3ea65a63d770509b141b4db45a11541e5ba3 (commit) commit 2be23d2118b673e869d25f00d9ea5f1b427add3c Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Do not use deprecated APIs and adjust requirements to Xfce 4.10 Raise the minimum requirements of Xfce components to 4.10 which is the currently supported version. Raise the minimum requirements of GTK/glib to match those of Xfce 4.10. Raise the minimum required gstreamer version to 0.10.23, it was released in 2009 and will allow us to use GST_MIXER_FLAG_HAS_WHITELIST in the mixer. Replace the usage of GTK/glib API parts which have been deprecated in the minimum required GTK version. NEWS |1 + configure.ac.in | 33 +++-- libxfce4mixer/libxfce4mixer.c | 10 -- libxfce4mixer/libxfce4mixer.h |4 panel-plugin/xfce-mixer-plugin.c | 22 -- panel-plugin/xfce-volume-button.c |3 ++- xfce4-mixer/xfce-mixer-window.c |7 --- xfce4-mixer/xfce-mixer.c | 13 - 8 files changed, 14 insertions(+), 79 deletions(-) diff --git a/NEWS b/NEWS index cf8b487..853354f 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ value (bug #8291). - Add an item to the panel plugin context menu for muting (bug #7944). - Make name and description more meaningful (bug #5817). +- Do not use deprecated APIs and adjust requirements to Xfce 4.10. 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index f391d31..37eccde 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -93,28 +93,14 @@ AC_CHECK_LIB([m],[round]) dnl *** dnl *** Check for required packages *** dnl *** -XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0]) -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.18.0]) -XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2]) -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) -XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0]) +XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) +XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) -XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) - -dnl ** -dnl *** Check for GstMixer bus support *** -dnl ** -HAVE_GST_MIXER_NOTIFICATION=no -PKG_CHECK_MODULES(GST_MIXER_NOTIFICATION_API, - gstreamer-plugins-base-0.10 = 0.10.14, - HAVE_GST_MIXER_NOTIFICATION=yes, - HAVE_GST_MIXER_NOTIFICATION=no) -if test x$HAVE_GST_MIXER_NOTIFICATION = xyes; then - AC_DEFINE(HAVE_GST_MIXER_NOTIFICATION, 1, -[Have GStreamer mixer notification API]) -fi +XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0]) dnl *** dnl *** Check for debugging support *** @@ -157,10 +143,5 @@ dnl *** echo echo Build Configuration: echo -if test x$HAVE_GST_MIXER_NOTIFICATION = xyes; then -echo * GStreamer mixer notification support: yes -else -echo * GStreamer mixer notification support: no -fi echo * Debug Support:$enable_debug echo diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 86ea5db..b25ecc5 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -42,10 +42,8 @@ static void _xfce_mixer_destroy_mixer (GstMixer *mixer); static guint refcount = 0; static GList *mixers = NULL; -#ifdef HAVE_GST_MIXER_NOTIFICATION static GstBus *bus = NULL; static GstElement *selected_card = NULL; -#endif @@ -64,11 +62,9 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, counter); -#ifdef HAVE_GST_MIXER_NOTIFICATION /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); -#endif } } @@ -82,10 +78,8 @@ xfce_mixer_shutdown (void) g_list_foreach (mixers, (GFunc) _xfce_mixer_destroy_mixer, NULL); g_list_free (mixers); -#ifdef HAVE_GST_MIXER_NOTIFICATION gst_bus_remove_signal_watch (bus); gst_object_unref (bus); -#endif } } @@ -168,10 +162,8 @@ xfce_mixer_select_card (GstElement *card) {
[Xfce4-commits] xfce4-mixer:master Add optional global keyboard shortcuts (bug #5314)
Updating branch refs/heads/master to 117ff721b989bcf8cd8e0fbeaa692c14c1ecf5ef (commit) from 2be23d2118b673e869d25f00d9ea5f1b427add3c (commit) commit 117ff721b989bcf8cd8e0fbeaa692c14c1ecf5ef Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Add optional global keyboard shortcuts (bug #5314) Add optional global keyboard shortcuts for raising and lowering the volume as well as muting. Make the plugin single-instance. NEWS |2 + configure.ac.in |7 ++ panel-plugin/Makefile.am |6 +- panel-plugin/mixer.desktop.in|2 +- panel-plugin/xfce-mixer-plugin.c | 207 +- 5 files changed, 220 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 853354f..400ccdd 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ - Add an item to the panel plugin context menu for muting (bug #7944). - Make name and description more meaningful (bug #5817). - Do not use deprecated APIs and adjust requirements to Xfce 4.10. +- Add global keyboard shortcuts for raising and lowering the volume as well as + muting (bug #5314). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 37eccde..d4b86d7 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -103,6 +103,12 @@ XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0]) dnl *** +dnl *** Check for optional packages *** +dnl *** +XDT_CHECK_OPTIONAL_PACKAGE([KEYBINDER], [keybinder], [0.2.2], [keybinder], + [keybinder Support]) + +dnl *** dnl *** Check for debugging support *** dnl *** XDT_FEATURE_DEBUG(mixer_debug_default) @@ -143,5 +149,6 @@ dnl *** echo echo Build Configuration: echo +echo * keybinder Support:${KEYBINDER_FOUND:-no} echo * Debug Support:$enable_debug echo diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index 2170005..fa27e29 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -25,7 +25,8 @@ libmixer_la_CFLAGS = \ $(LIBXFCE4UI_CFLAGS)\ $(LIBXFCE4PANEL_CFLAGS) \ $(XFCONF_CFLAGS)\ - $(GST_PLUGINS_BASE_CFLAGS) + $(GST_PLUGINS_BASE_CFLAGS) \ + $(KEYBINDER_CFLAGS) libmixer_la_DEPENDENCIES = \ $(top_builddir)/libxfce4mixer/libxfce4mixer.la @@ -47,7 +48,8 @@ libmixer_la_LIBADD = \ $(XFCONF_LIBS) \ $(GST_PLUGINS_BASE_LIBS)\ -lgstaudio-0.10 \ - -lgstinterfaces-0.10 + -lgstinterfaces-0.10\ + $(KEYBINDER_LIBS) desktopdir = $(datadir)/xfce4/panel/plugins diff --git a/panel-plugin/mixer.desktop.in b/panel-plugin/mixer.desktop.in index fb45c14..f4e7637 100644 --- a/panel-plugin/mixer.desktop.in +++ b/panel-plugin/mixer.desktop.in @@ -5,4 +5,4 @@ _Comment=Adjust volume levels Icon=multimedia-volume-control X-XFCE-Internal=false X-XFCE-Module=mixer -X-XFCE-Unique=false +X-XFCE-Unique=true diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index eb2042a..1e6e7d6 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -36,6 +36,10 @@ #include libxfce4panel/libxfce4panel.h #include xfconf/xfconf.h +#ifdef HAVE_KEYBINDER +#include keybinder.h +#endif + #include xfce-mixer-plugin.h #include libxfce4mixer/libxfce4mixer.h @@ -51,11 +55,22 @@ enum PROP_SOUND_CARD, PROP_TRACK, PROP_COMMAND, +#ifdef HAVE_KEYBINDER + PROP_ENABLE_KEYBOARD_SHORTCUTS, +#endif N_PROPERTIES, }; +#ifdef HAVE_KEYBINDER +#define XFCE_MIXER_PLUGIN_RAISE_VOLUME_KEY XF86AudioRaiseVolume +#define XFCE_MIXER_PLUGIN_LOWER_VOLUME_KEY XF86AudioLowerVolume +#define XFCE_MIXER_PLUGIN_MUTE_KEY XF86AudioMute +#endif + + + static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); static void xfce_mixer_plugin_set_property(GObject *object, guint prop_id, @@ -83,6 +98,12 @@ static void xfce_mixer_plugin_update_track (XfceMixerPlugin static void xfce_mixer_plugin_bus_message (GstBus *bus,
[Xfce4-commits] xfce4-mixer:master Set the main window to normal rather than dialog type (bug #7623)
Updating branch refs/heads/master to 3e0def60db29746e501586d36d33ea305540a2e8 (commit) from 117ff721b989bcf8cd8e0fbeaa692c14c1ecf5ef (commit) commit 3e0def60db29746e501586d36d33ea305540a2e8 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Set the main window to normal rather than dialog type (bug #7623) NEWS|1 + xfce4-mixer/xfce-mixer-window.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 400ccdd..59ff72e 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ - Do not use deprecated APIs and adjust requirements to Xfce 4.10. - Add global keyboard shortcuts for raising and lowering the volume as well as muting (bug #5314). +- Set the main window to normal rather than dialog type (bug #7623). 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-window.c b/xfce4-mixer/xfce-mixer-window.c index 85ffe04..11ecf1d 100644 --- a/xfce4-mixer/xfce-mixer-window.c +++ b/xfce4-mixer/xfce-mixer-window.c @@ -163,6 +163,7 @@ xfce_mixer_window_init (XfceMixerWindow *window) g_object_get (window-preferences, window-width, width, window-height, height, sound-card, active_card, NULL); /* Configure the main window */ + gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_NORMAL); gtk_window_set_icon_name (GTK_WINDOW (window), multimedia-volume-control); gtk_window_set_title (GTK_WINDOW (window), _(Audio Mixer)); gtk_window_set_default_size (GTK_WINDOW (window), width, height); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Keep the sound card and controls in sync between the mixer and xfconf
Updating branch refs/heads/master to 46d08678f7a1cbeb3970c03b5a91e55ec284a1ec (commit) from 3e0def60db29746e501586d36d33ea305540a2e8 (commit) commit 46d08678f7a1cbeb3970c03b5a91e55ec284a1ec Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Keep the sound card and controls in sync between the mixer and xfconf Also apply changes in the controls dialog instantly to the mixer window. NEWS |1 + configure.ac.in |1 + libxfce4mixer/Makefile.am|2 + libxfce4mixer/libxfce4mixer.c| 19 ++ libxfce4mixer/libxfce4mixer.h|5 + libxfce4mixer/xfce-mixer-preferences.c | 308 ++ libxfce4mixer/xfce-mixer-preferences.h | 12 +- xfce4-mixer/xfce-mixer-controls-dialog.c | 181 ++ xfce4-mixer/xfce-mixer-controls-dialog.h |6 +- xfce4-mixer/xfce-mixer-window.c | 189 ++- xfce4-mixer/xfce-mixer.c | 24 ++- 11 files changed, 443 insertions(+), 305 deletions(-) diff --git a/NEWS b/NEWS index 59ff72e..f2e2825 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,7 @@ - Add global keyboard shortcuts for raising and lowering the volume as well as muting (bug #5314). - Set the main window to normal rather than dialog type (bug #7623). +- Keep the sound card and controls in sync between the mixer and xfconf. 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index d4b86d7..4baffdb 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -95,6 +95,7 @@ dnl *** Check for required packages *** dnl *** XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 399bb2d..8f44cd4 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -30,6 +30,7 @@ libxfce4mixer_la_CFLAGS = \ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCE4UI_CFLAGS)\ $(XFCONF_CFLAGS)\ + $(DBUS_GLIB_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) libxfce4mixer_la_LDFLAGS = \ @@ -42,6 +43,7 @@ libxfce4mixer_la_LIBADD = \ $(LIBXFCE4UTIL_LIBS)\ $(LIBXFCE4UI_LIBS) \ $(XFCONF_LIBS) \ + $(DBUS_GLIB_LIBS) \ $(GST_PLUGINS_BASE_LIBS)\ -lgstaudio-0.10 \ -lgstinterfaces-0.10 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index b25ecc5..7bb9293 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -25,6 +25,8 @@ #include glib.h +#include dbus/dbus-glib.h + #include gst/audio/mixerutils.h #include gst/interfaces/mixer.h @@ -350,3 +352,20 @@ xfce_mixer_utf8_cmp (const gchar *s1, const gchar *s2) return g_utf8_collate (s1, s2); } + + +GType +xfce_mixer_value_array_get_type (void) +{ + static volatile gsize type__volatile = 0; + GType type; + + if (g_once_init_enter (type__volatile)) +{ + type = dbus_g_type_get_collection (GPtrArray, G_TYPE_VALUE); + g_once_init_leave (type__volatile, type); +} + + return type__volatile; +} + diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 41f5816..187db3f 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -24,6 +24,8 @@ #include glib.h +#include dbus/dbus-glib.h + #include gst/interfaces/mixer.h #include xfce-mixer-preferences.h @@ -31,6 +33,8 @@ #include xfce-mixer-track-combo.h #include xfce-mixer-track-type.h +#define XFCE_MIXER_TYPE_VALUE_ARRAY (xfce_mixer_value_array_get_type ()) + G_BEGIN_DECLS; void xfce_mixer_init (void); @@ -52,6 +56,7 @@ gint xfce_mixer_get_max_volume (gint *volumes, gint num_channels); intxfce_mixer_utf8_cmp (const gchar *s1, const gchar *s2); +GType xfce_mixer_value_array_get_type (void);
[Xfce4-commits] xfce4-mixer:master Add popup with a scale for setting the volume to the panel plugin
Updating branch refs/heads/master to 3dfd08968ee1653bc9fca9b4e2d9eadadb5fb626 (commit) from 4f8aa9895a40baa7151d441b60c092c00d7c18f6 (commit) commit 3dfd08968ee1653bc9fca9b4e2d9eadadb5fb626 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Add popup with a scale for setting the volume to the panel plugin Add a popup with a scale for setting the volume to the panel plugin which is opened on left click, allow running the user-defined command previously bound to left click from the panel plugin context menu instead. Subclass GtkToggleButton instaed of GtkButton. NEWS |3 + README|3 +- panel-plugin/xfce-mixer-plugin.c | 177 ++ panel-plugin/xfce-plugin-dialog.c |4 +- panel-plugin/xfce-volume-button.c | 678 + panel-plugin/xfce-volume-button.h | 36 ++- 6 files changed, 666 insertions(+), 235 deletions(-) diff --git a/NEWS b/NEWS index 6d04cab..e5e133a 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,9 @@ - Keep the sound card and controls in sync between the mixer and xfconf. - Populate the mixer with whitelisted controls in the absence of an existing configuration (bug #4945). +- Add a popup with a scale for setting the volume to the panel plugin which is + opened on left click, allow running the uder-defined command previously bound + to left click from the panel plugin context menu instead. 4.8.0 diff --git a/README b/README index e8a0645..98df7c5 100644 --- a/README +++ b/README @@ -3,8 +3,7 @@ xfce4-mixer Information This package contains a volume control application based on GStreamer 0.10 written to conceptually fit into the Xfce desktop environment. It -also contains a plugin for the Xfce panel which is especially designed -for use with the mouse wheel. +includes a plugin for the Xfce panel. Known Problems with GStreamer - diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 1e6e7d6..65939c3 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -71,38 +71,43 @@ enum -static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_set_property(GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_get_property(GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_free_data (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_configure_plugin(XfcePanelPlugin *plugin); -static gboolean xfce_mixer_plugin_size_changed(XfcePanelPlugin *plugin, - gint size); -static void xfce_mixer_plugin_clicked (XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_volume_changed (XfceMixerPlugin *mixer_plugin, - gdouble volume); -static void xfce_mixer_plugin_mute_changed(XfceMixerPlugin *mixer_plugin, - gboolean muted); -static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, - GtkCheckMenuItem *mute_menu_item); -static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object); -static void xfce_mixer_plugin_update_track(XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_bus_message (GstBus *bus, - GstMessage *message, - XfceMixerPlugin *mixer_plugin); +static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); +static void xfce_mixer_plugin_set_property (GObject *object, + guint
[Xfce4-commits] xfce4-mixer:master Make xfce4-mixer a singleton application (bug #5676)
Updating branch refs/heads/master to 88fb4e4474e507575b5b7bf6b4486a04cf573e0f (commit) from 3dfd08968ee1653bc9fca9b4e2d9eadadb5fb626 (commit) commit 88fb4e4474e507575b5b7bf6b4486a04cf573e0f Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Make xfce4-mixer a singleton application (bug #5676) Make xfce4-mixer a singleton application using libunique, executing xfce4-mixer while another instance is already running brings the running instance to the foreground. NEWS|3 ++ configure.ac.in |1 + xfce4-mixer/Makefile.am |2 + xfce4-mixer/main.c | 73 -- 4 files changed, 69 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index e5e133a..7cab556 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,9 @@ - Add a popup with a scale for setting the volume to the panel plugin which is opened on left click, allow running the uder-defined command previously bound to left click from the panel plugin context menu instead. +- Make xfce4-mixer a singleton application, executing xfce4-mixer while another + instance is already running brings the running instance to the foreground + (bug #5676). 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index 4baffdb..aa0b086 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -98,6 +98,7 @@ XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) +XDT_CHECK_PACKAGE([UNIQUE], [unique-1.0], [1.1]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index fd17aeb..e5a45f0 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -26,6 +26,7 @@ xfce4_mixer_CFLAGS = \ -DMIXER_DATADIR=\$(pkgdatadir)\ \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ + $(UNIQUE_CFLAGS)\ $(LIBXFCE4UTIL_CFLAGS) \ $(LIBXFCE4UI_CFLAGS)\ $(XFCONF_CFLAGS)\ @@ -39,6 +40,7 @@ xfce4_mixer_LDFLAGS = \ $(GLIB_LIBS)\ $(GTHREAD_LIBS) \ $(GTK_LIBS) \ + $(UNIQUE_LIBS) \ $(LIBXFCE4UTIL_LIBS)\ $(LIBXFCE4UI_LIBS) \ $(XFCONF_LIBS) \ diff --git a/xfce4-mixer/main.c b/xfce4-mixer/main.c index a4c32d7..5a65f0b 100644 --- a/xfce4-mixer/main.c +++ b/xfce4-mixer/main.c @@ -1,6 +1,7 @@ /* vi:set expandtab sw=2 sts=2: */ /*- * Copyright (c) 2008 Jannis Pohlmann jan...@xfce.org + * Copyright (c) 2012 Guido Berhoerster guido+x...@berhoerster.name * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +29,9 @@ #include gst/gst.h +#include gtk/gtk.h +#include unique/unique.h + #include libxfce4util/libxfce4util.h #include libxfce4ui/libxfce4ui.h #include xfconf/xfconf.h @@ -38,12 +42,42 @@ +static UniqueResponse +message_received (UniqueApp *app, + UniqueCommand command, + UniqueMessageData *message, + guint time_, + GtkWidget *window) +{ + UniqueResponse response; + + switch (command) +{ + case UNIQUE_ACTIVATE: +/* Move window to the screen the command was started on */ +gtk_window_set_screen (GTK_WINDOW (window), unique_message_data_get_screen (message)); +/* Bring window to the foreground */ +gtk_window_present_with_time (GTK_WINDOW (window), time_); +response = UNIQUE_RESPONSE_OK; +break; + default: +/* Invalid command */ +response = UNIQUE_RESPONSE_FAIL; +break; +} + + return response; +} + + + int main (intargc, char **argv) { - GtkWidget *window; - GError*error = NULL; + UniqueApp *app; + GtkWidget *window; + GError*error = NULL; /* Setup translation domain */
[Xfce4-commits] xfce4-mixer:master Remove UI for configuring the mixer command from the panel plugin
Updating branch refs/heads/master to 45a774fb7c341a2255b652563166fe6576520578 (commit) from 88fb4e4474e507575b5b7bf6b4486a04cf573e0f (commit) commit 45a774fb7c341a2255b652563166fe6576520578 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Remove UI for configuring the mixer command from the panel plugin Remove UI for configuring the mixer command from the panel plugin and assume xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. NEWS |3 + panel-plugin/xfce-mixer-plugin.c | 22 ++ panel-plugin/xfce-plugin-dialog.c | 168 + 3 files changed, 10 insertions(+), 183 deletions(-) diff --git a/NEWS b/NEWS index 7cab556..4cb9822 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ - Make xfce4-mixer a singleton application, executing xfce4-mixer while another instance is already running brings the running instance to the foreground (bug #5676). +- Remove UI for configuring the mixer command from the panel plugin and assume + xfce4-mixer, make the panel plugin context menu entry for running the mixer + more meaningful. 4.8.0 diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 65939c3..beaba3f 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -276,6 +276,7 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) { XfceMixerPlugin *mixer_plugin = XFCE_MIXER_PLUGIN (plugin); GtkWidget *command_menu_item; + GtkWidget *command_image; xfce_panel_plugin_menu_show_configure (plugin); @@ -286,7 +287,10 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) gtk_widget_show (mixer_plugin-mute_menu_item); /* Add menu item for running the user-defined command */ - command_menu_item = gtk_menu_item_new_with_mnemonic (_(_Run command)); + command_image = gtk_image_new_from_icon_name (multimedia-volume-control, GTK_ICON_SIZE_MENU); + gtk_widget_show (command_image); + command_menu_item = gtk_image_menu_item_new_with_mnemonic (_(_Run Audio Mixer)); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (command_menu_item), command_image); xfce_panel_plugin_menu_insert_item (plugin, GTK_MENU_ITEM (command_menu_item)); g_signal_connect_swapped (G_OBJECT (command_menu_item), activate, G_CALLBACK (xfce_mixer_plugin_command_item_activated), mixer_plugin); gtk_widget_show (command_menu_item); @@ -692,26 +696,12 @@ xfce_mixer_plugin_command_item_activated (XfceMixerPlugin *mixer_plugin, GtkMenuItem *menuitem) { gchar *message; - gint response; g_return_if_fail (mixer_plugin != NULL); if (G_UNLIKELY (mixer_plugin-command == NULL || strlen (mixer_plugin-command) == 0)) { - /* Run error message dialog */ - response = xfce_message_dialog (NULL, - _(No command defined), - GTK_STOCK_DIALOG_ERROR, - NULL, - _(No command defined yet. You can change this in the plugin properties.), - XFCE_BUTTON_TYPE_MIXED, _(Properties), GTK_STOCK_PREFERENCES, GTK_RESPONSE_ACCEPT, - GTK_STOCK_CLOSE, GTK_RESPONSE_REJECT, - NULL); - - /* Configure the plugin if requested by the user */ - if (G_LIKELY (response == GTK_RESPONSE_ACCEPT)) -xfce_mixer_plugin_configure_plugin (XFCE_PANEL_PLUGIN (mixer_plugin)); - + xfce_dialog_show_error (NULL, NULL, _(No command defined)); return; } diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index c45b59a..86f584e 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -45,24 +45,18 @@ static void xfce_plugin_dialog_init (XfcePluginDialog static void xfce_plugin_dialog_dispose(GObject *object); static void xfce_plugin_dialog_finalize (GObject *object); static void xfce_plugin_dialog_create_contents(XfcePluginDialog *dialog); -static void xfce_plugin_dialog_command_button_clicked (XfcePluginDialog *dialog); static void xfce_plugin_dialog_soundcard_changed (XfcePluginDialog *dialog, GstElement *card, XfceMixerCardCombo *combo); static void xfce_plugin_dialog_track_changed (XfcePluginDialog *dialog, GstMixerTrack *track, XfceMixerTrackCombo
[Xfce4-commits] xfce4-mixer:master Add runtime debugging mode
Updating branch refs/heads/master to 54f6ac04677a7caac0dcd8dcb1dd1a7e44d05490 (commit) from 506e6255217c5c3fa54783df05019db7f303dc1a (commit) commit 54f6ac04677a7caac0dcd8dcb1dd1a7e44d05490 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Add runtime debugging mode Add a runtime debugging mode to both the mixer application and the panel plugin which will print additional diagnostic output. Add a --debug command line option to xfce4-mixer which will activate the debugging mode. Make the panel plugin look for the PANEL_DEBUG environment variable containing mixer in order to enable the debugging mode. Add custom xfce_mixer_debug() function for printing debugging output. Replace DBG() macro with xfce_mixer_debug(). Print relevant GStreamer data on startup when in debugging mode. Add --version command line option to xfce4-mixer which will print the version. NEWS |1 + README | 14 ++ libxfce4mixer/Makefile.am|4 +- libxfce4mixer/libxfce4mixer.c|4 + libxfce4mixer/libxfce4mixer.h|1 + libxfce4mixer/xfce-mixer-debug.c | 258 ++ libxfce4mixer/xfce-mixer-debug.h | 45 +++ panel-plugin/xfce-mixer-plugin.c | 14 ++ xfce4-mixer/Makefile.am |1 + xfce4-mixer/main.c | 58 +++-- xfce4-mixer/xfce-mixer.c |8 +- 11 files changed, 389 insertions(+), 19 deletions(-) diff --git a/NEWS b/NEWS index 2286c16..b9aa6b5 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,7 @@ xfce4-mixer, make the panel plugin context menu entry for running the mixer more meaningful. - Add tooltips to scale widgets in the mixer. +- Add runtime debugging mode to both the mixer and the panel plugin. 4.8.0 diff --git a/README b/README index 98df7c5..48756f0 100644 --- a/README +++ b/README @@ -5,6 +5,19 @@ This package contains a volume control application based on GStreamer 0.10 written to conceptually fit into the Xfce desktop environment. It includes a plugin for the Xfce panel. + +Debugging +- + +Both the mixer application and the panel plugin have a builtin debugging mode +which will print additional diagnostic output useful for bug reports. For +xfce4-mixer it can be activated by specifying the --debug command line option, +diagnostic messages will be printed to stderr. For the panel plugin, please +follow the instructions at http://docs.xfce.org/xfce/xfce4-panel/debugging and +set the PANEL_DEBUG environment variable to mixer, the disgnostic output can +then be found in the log file corresponding to the plugin. + + Known Problems with GStreamer - @@ -13,3 +26,4 @@ Known Problems with GStreamer Debian or Ubuntu system and you're using ALSA then installing gstreamer0.10-alsa should fix it. On OpenBSD installing gst-plugins-good might help. + diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am index 8f44cd4..4107cdd 100644 --- a/libxfce4mixer/Makefile.am +++ b/libxfce4mixer/Makefile.am @@ -15,7 +15,9 @@ libxfce4mixer_la_SOURCES = \ xfce-mixer-track-type.h \ xfce-mixer-track-type.c \ xfce-mixer-preferences.h\ - xfce-mixer-preferences.c + xfce-mixer-preferences.c\ + xfce-mixer-debug.h \ + xfce-mixer-debug.c libxfce4mixer_la_CFLAGS = \ -I$(top_builddir) \ diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 6ca9466..da0bfe4 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -23,6 +23,10 @@ #include config.h #endif +#ifdef HAVE_STRING_H +#include string.h +#endif + #include glib.h #include dbus/dbus-glib.h diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h index 473817c..8628df9 100644 --- a/libxfce4mixer/libxfce4mixer.h +++ b/libxfce4mixer/libxfce4mixer.h @@ -32,6 +32,7 @@ #include xfce-mixer-card-combo.h #include xfce-mixer-track-combo.h #include xfce-mixer-track-type.h +#include xfce-mixer-debug.h #define XFCE_MIXER_TYPE_VALUE_ARRAY (xfce_mixer_value_array_get_type ()) diff --git a/libxfce4mixer/xfce-mixer-debug.c b/libxfce4mixer/xfce-mixer-debug.c new file mode 100644 index 000..d45b92d --- /dev/null +++ b/libxfce4mixer/xfce-mixer-debug.c @@ -0,0 +1,258 @@ +/* vi:set expandtab sw=2 sts=2: */ +/*- + * Copyright (c) 2012 Guido Berhoerster guido+x...@berhoerster.name + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General
[Xfce4-commits] xfce4-mixer:master Add man page for xfce4-mixer
Updating branch refs/heads/master to f270a407b2400ae7bc0ea0ca463af18e8273d6b7 (commit) from dad36c37b03c420fd904c3fa98f4b25c9094cc65 (commit) commit f270a407b2400ae7bc0ea0ca463af18e8273d6b7 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:08 2012 +0200 Add man page for xfce4-mixer NEWS |1 + xfce4-mixer/Makefile.am |2 ++ xfce4-mixer/xfce4-mixer.1 | 43 +++ 3 files changed, 46 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index b9aa6b5..72651a7 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ more meaningful. - Add tooltips to scale widgets in the mixer. - Add runtime debugging mode to both the mixer and the panel plugin. +- Add man page for xfce4-mixer. 4.8.0 diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am index 819ab28..820711f 100644 --- a/xfce4-mixer/Makefile.am +++ b/xfce4-mixer/Makefile.am @@ -51,6 +51,8 @@ xfce4_mixer_LDFLAGS = \ -lgstaudio-0.10 \ -lgstinterfaces-0.10 +dist_man_MANS = xfce4-mixer.1 + desktop_in_files = xfce4-mixer.desktop.in desktopdir = $(datadir)/applications desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) diff --git a/xfce4-mixer/xfce4-mixer.1 b/xfce4-mixer/xfce4-mixer.1 new file mode 100644 index 000..39b266b --- /dev/null +++ b/xfce4-mixer/xfce4-mixer.1 @@ -0,0 +1,43 @@ +.\ Copyright (c) 2012 Guido Berhoerster guido+xfce@berhoerster.name +.\ +.\ This program is free software; you can redistribute it and/or modify +.\ it under the terms of the GNU General Public License as published by +.\ the Free Software Foundation; either version 2 of the License, or +.\ (at your option) any later version. +.\ +.\ This program is distributed in the hope that it will be useful, +.\ but WITHOUT ANY WARRANTY; without even the implied warranty of +.\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\ GNU General Public License for more details. +.\ +.\ You should have received a copy of the GNU General Public License +.\ along with this program; if not, write to the Free Software +.\ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +.\ +.TH XFCE4\-MIXER 1 1 Aug 2012 +.SH NAME +xfce4\-mixer \- adjust volume levels +.SH SYNOPSIS +\fBxfce4\-mixer\fR +[\fB\-dhV?\fR] +.SH DESCRIPTION +\fBxfce4\-mixer\fR is an audio mixer which allows you to adjust input and +output volume levels on your sound card(s). +.SH OPTIONS +The following options are supported: +.TP +.BR \-d , \-\-debug +Print diagnostic output useful for debugging to stderr. +.TP +.BR \-h , \-? , \-\-help +Print a summary of all command line options and exit. +.TP +.BR \-V , \-\-version +Print the version number and exit. +.SH EXIT STATUS +.TP +.B 0 +The program has exited normally. +.TP +.B 0 +An Error has occurred. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Handle identically named tracks by making use of the track index property
Updating branch refs/heads/master to 444b8b826fd6b2c3d27f5d57309c7e5d40e08ed2 (commit) from f270a407b2400ae7bc0ea0ca463af18e8273d6b7 (commit) commit 444b8b826fd6b2c3d27f5d57309c7e5d40e08ed2 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:09 2012 +0200 Handle identically named tracks by making use of the track index property Handle identically named tracks by using an custom track label which sonsists of the GstMixerTrack label property and the index value if it is greater than 0. NEWS |1 + libxfce4mixer/libxfce4mixer.c| 62 ++ libxfce4mixer/libxfce4mixer.h|1 + libxfce4mixer/xfce-mixer-preferences.c | 16 libxfce4mixer/xfce-mixer-track-combo.c |7 +--- panel-plugin/xfce-mixer-plugin.c | 15 +++ panel-plugin/xfce-plugin-dialog.c| 13 ++ xfce4-mixer/xfce-mixer-controls-dialog.c | 17 +++- xfce4-mixer/xfce-mixer-option.c |5 +- xfce4-mixer/xfce-mixer-switch.c |5 +- xfce4-mixer/xfce-mixer-track.c |6 +-- xfce4-mixer/xfce-mixer.c | 27 - 12 files changed, 97 insertions(+), 78 deletions(-) diff --git a/NEWS b/NEWS index 72651a7..10f1d89 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ - Add tooltips to scale widgets in the mixer. - Add runtime debugging mode to both the mixer and the panel plugin. - Add man page for xfce4-mixer. +- Handle identically named tracks by making use of the track index property. 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index da0bfe4..c14ee27 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -40,9 +40,11 @@ -static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, - gpointer user_data); -static void _xfce_mixer_destroy_mixer (GstMixer *mixer); +static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, + gpointer user_data); +static void _xfce_mixer_add_track_labels (gpointer data, + gpointer user_data); +static void _xfce_mixer_destroy_mixer(GstMixer *mixer); @@ -83,6 +85,9 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, counter); + /* Add custom labels to all tracks of all mixers */ + g_list_foreach (mixers, (GFunc) _xfce_mixer_add_track_labels, NULL); + /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); @@ -195,23 +200,20 @@ xfce_mixer_get_track (GstElement *card, { GstMixerTrack *track = NULL; const GList *iter; - gchar *label; + const gchar *label; g_return_val_if_fail (GST_IS_MIXER (card), NULL); g_return_val_if_fail (track_name != NULL, NULL); for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) { - g_object_get (GST_MIXER_TRACK (iter-data), label, label, NULL); + label = xfce_mixer_get_track_label (GST_MIXER_TRACK (iter-data)); if (g_utf8_collate (label, track_name) == 0) { track = iter-data; - g_free (label); break; } - - g_free (label); } return track; @@ -311,6 +313,15 @@ xfce_mixer_get_default_track_list (GstElement *card) +const gchar * +xfce_mixer_get_track_label (GstMixerTrack *track) +{ + g_return_val_if_fail (GST_IS_MIXER_TRACK (track), NULL); + return g_object_get_data (G_OBJECT (track), xfce-mixer-track-label); +} + + + guint xfce_mixer_bus_connect (GCallback callback, gpointer user_data) @@ -407,6 +418,41 @@ _xfce_mixer_filter_mixer (GstMixer *mixer, static void +_xfce_mixer_add_track_labels (gpointer data, + gpointer user_data) +{ + GstMixer *mixer = GST_MIXER (data); + const GList *iter; + GstMixerTrack *track; + gchar *label; + gchar *xfce_mixer_label; + guint index; + + for (iter = gst_mixer_list_tracks (mixer); iter != NULL; iter = g_list_next (iter)) +{ + track = GST_MIXER_TRACK (iter-data); + + g_object_get (track, label, label, index, index, NULL); + + /* + * Build display label including the index if there are mutiple tracks of + * the same name + */ + if (index 0) +xfce_mixer_label = g_strdup_printf (%s (%d), label, index); + else +xfce_mixer_label = g_strdup (label); + + /* Set label to be used by xfce4-mixer */ + g_object_set_data_full (G_OBJECT (track), xfce-mixer-track-label, xfce_mixer_label, (GDestroyNotify) g_free); + + g_free (label); +} +} + + + +static void
[Xfce4-commits] xfce4-mixer:master Handle read-only tracks or tracks with no mute/record functionality
Updating branch refs/heads/master to 47d1cee0825f316b24ee826c5c2f1d6cd53b465d (commit) from 444b8b826fd6b2c3d27f5d57309c7e5d40e08ed2 (commit) commit 47d1cee0825f316b24ee826c5c2f1d6cd53b465d Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:09 2012 +0200 Handle read-only tracks or tracks with no mute/record functionality Handle tracks which are marked read-only by GStreamer by making the corresponding widgets insensitive in the mixer application and by preventing them from being selected in the panel plugin. Require GStreamer 0.10.25 in order avoid #ifdefs. Handle missing record/mute functionality by making the corresponding buttons in the mixer application UI insensitive and by disallowing mute actions in the panel plugin. NEWS |3 + configure.ac.in|2 +- libxfce4mixer/libxfce4mixer.c | 47 +++- libxfce4mixer/xfce-mixer-track-combo.c | 16 +-- panel-plugin/xfce-mixer-plugin.c | 67 ++-- panel-plugin/xfce-volume-button.c | 76 --- panel-plugin/xfce-volume-button.h |3 + xfce4-mixer/xfce-mixer-option.c|3 + xfce4-mixer/xfce-mixer-switch.c|9 xfce4-mixer/xfce-mixer-track.c | 15 ++ 10 files changed, 201 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index 10f1d89..9798e77 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,9 @@ - Add runtime debugging mode to both the mixer and the panel plugin. - Add man page for xfce4-mixer. - Handle identically named tracks by making use of the track index property. +- Handle tracks which are marked read-only by GStreamer or which have no mute + or record functionality by making the corresponding widgets insensitive. + Prevent read-only tracks from being selected in the panel-plugin. 4.8.0 diff --git a/configure.ac.in b/configure.ac.in index aa0b086..45fe951 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -96,7 +96,7 @@ dnl *** XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) -XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.23]) +XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.25]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) XDT_CHECK_PACKAGE([UNIQUE], [unique-1.0], [1.1]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index c14ee27..451e1d8 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -224,31 +224,56 @@ xfce_mixer_get_track (GstElement *card, GstMixerTrack * xfce_mixer_get_default_track (GstElement *card) { - GstMixerTrack *track = NULL; - const GList *iter; - GstMixerTrack *track_tmp; - const GList *tracks; + GstMixerTrack *track = NULL; + XfceMixerTrackType track_type = G_TYPE_INVALID; + const GList*iter; + GstMixerTrack *track_tmp; + XfceMixerTrackType track_type_tmp; g_return_val_if_fail (GST_IS_MIXER (card), NULL); - /* Try to get the master track */ + /* + * Try to get the master track if it is a playback or capture track and not + * read-only + */ for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) { track_tmp = GST_MIXER_TRACK (iter-data); + track_type_tmp = xfce_mixer_track_type_new (track_tmp); - if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER)) + if (GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_MASTER) + (track_type_tmp == XFCE_MIXER_TRACK_TYPE_PLAYBACK || + track_type_tmp == XFCE_MIXER_TRACK_TYPE_CAPTURE) + !GST_MIXER_TRACK_HAS_FLAG (track_tmp, GST_MIXER_TRACK_READONLY)) { track = track_tmp; + track_type = track_type_tmp; break; } } - /* If there is no master track, try to get the first track */ - if (!GST_IS_MIXER_TRACK (track)) + /* + * If there is no master track, try to get the first track which is a + * playback or capture track and not read-only + */ + if (!GST_IS_MIXER_TRACK (track) || + (track_type != XFCE_MIXER_TRACK_TYPE_PLAYBACK + track_type != XFCE_MIXER_TRACK_TYPE_CAPTURE) || + GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_READONLY)) { - tracks = gst_mixer_list_tracks (GST_MIXER (card)); - if (g_list_length (tracks) 0) -track = g_list_first (tracks)-data; + for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = g_list_next (iter)) +{ + track_tmp = GST_MIXER_TRACK (iter-data); + track_type = xfce_mixer_track_type_new (track_tmp); + + if ((track_type ==
[Xfce4-commits] xfce4-mixer:master Handle GST_MIXER_MESSAGE_MIXER_CHANGED messages
Updating branch refs/heads/master to d4d898b1740c02c55b0dbc0ad707c1e7e0ae (commit) from 47d1cee0825f316b24ee826c5c2f1d6cd53b465d (commit) commit d4d898b1740c02c55b0dbc0ad707c1e7e0ae Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:09 2012 +0200 Handle GST_MIXER_MESSAGE_MIXER_CHANGED messages Connect every mixer to a GstBus in libxfce4mixer and add a signal handler for messages that handles GST_MIXER_MESSAGE_MIXER_CHANGED messages for every card and adds labels to all tracks. Refactor XfceMixer in order to allow updating itself in case the tracks have changed, preserving the currently active tab if possible; handle GST_MIXER_MESSAGE_MIXER_CHANGED messages accordingly and allow the card property to be changed. Make XfceMixerTrackCombo and XfceMixerControlsDialog listen to the bus and handle GST_MIXER_MESSAGE_MIXER_CHANGED messages for the current sound card by rebuilding the track list. Let XfceMixerPlugin refresh the track and attemt to retain the currently selected one when receiving a GST_MIXER_MESSAGE_MIXER_CHANGED for the currently selected card. NEWS |2 + libxfce4mixer/libxfce4mixer.c| 57 - libxfce4mixer/xfce-mixer-track-combo.c | 78 -- panel-plugin/xfce-mixer-plugin.c | 17 +- xfce4-mixer/xfce-mixer-controls-dialog.c | 40 +++- xfce4-mixer/xfce-mixer-window.c | 51 ++-- xfce4-mixer/xfce-mixer.c | 430 +- xfce4-mixer/xfce-mixer.h |4 +- 8 files changed, 428 insertions(+), 251 deletions(-) diff --git a/NEWS b/NEWS index 9798e77..eedf761 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,8 @@ - Handle tracks which are marked read-only by GStreamer or which have no mute or record functionality by making the corresponding widgets insensitive. Prevent read-only tracks from being selected in the panel-plugin. +- Handle mixer changed messages which indicate that the tracks of a mixer have + changed. 4.8.0 diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c index 451e1d8..244196c 100644 --- a/libxfce4mixer/libxfce4mixer.c +++ b/libxfce4mixer/libxfce4mixer.c @@ -40,11 +40,16 @@ -static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, - gpointer user_data); -static void _xfce_mixer_add_track_labels (gpointer data, - gpointer user_data); -static void _xfce_mixer_destroy_mixer(GstMixer *mixer); +static gboolean _xfce_mixer_filter_mixer (GstMixer *mixer, + gpointeruser_data); +static void _xfce_mixer_add_track_labels (gpointerdata, + gpointeruser_data); +static void _xfce_mixer_init_mixer (gpointerdata, + gpointeruser_data); +static void _xfce_mixer_destroy_mixer(GstMixer *mixer); +static void _xfce_mixer_bus_message (GstBus *bus, + GstMessage *message, + gpointeruser_data); @@ -85,12 +90,16 @@ xfce_mixer_init (void) /* Get list of all available mixer devices */ mixers = gst_audio_default_registry_mixer_filter (_xfce_mixer_filter_mixer, FALSE, counter); - /* Add custom labels to all tracks of all mixers */ - g_list_foreach (mixers, (GFunc) _xfce_mixer_add_track_labels, NULL); - /* Create a GstBus for notifications */ bus = gst_bus_new (); gst_bus_add_signal_watch (bus); + + /* + * Add custom labels to all tracks of all mixers and create a GstBus for + * each mixer device and connect an internal signal handler to receive + * notifications about track list changes + */ + g_list_foreach (mixers, (GFunc) _xfce_mixer_init_mixer, NULL); } } @@ -188,7 +197,6 @@ xfce_mixer_select_card (GstElement *card) { g_return_if_fail (GST_IS_MIXER (card)); - gst_element_set_bus (card, bus); selected_card = card; } @@ -361,6 +369,7 @@ void xfce_mixer_bus_disconnect (guint signal_handler_id) { g_return_if_fail (refcount 0); + if (signal_handler_id != 0) g_signal_handler_disconnect (bus, signal_handler_id); } @@ -478,14 +487,44 @@ _xfce_mixer_add_track_labels (gpointer data, static void +_xfce_mixer_init_mixer (gpointer data, +gpointer user_data) +{ + GstMixer *card = GST_MIXER (data); + + /* Add custom labels to all tracks */ + _xfce_mixer_add_track_labels (card, NULL); + + /* Add bus to every card and connect to internal signal handler */ + gst_element_set_bus (GST_ELEMENT (card), bus); + g_signal_connect (bus, message::element, G_CALLBACK (_xfce_mixer_bus_message), NULL); +} + + + +static void
[Xfce4-commits] xfce4-mixer:master Improve usability of the mixer and plugin configuration dialog
Updating branch refs/heads/master to 5369a8e17dcab5d6431a290552a50fc966d45fa4 (commit) from 69ea8a3321eb316642873441df7386b6ca02320e (commit) commit 5369a8e17dcab5d6431a290552a50fc966d45fa4 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:09 2012 +0200 Improve usability of the mixer and plugin configuration dialog Add mnemonics for all tabs and the soud card combob box of the mixer main window. Add labels with mnemonics for the soud card and track combo boxes of the plugin configuration dialog. Improve the wording of the message shown when no controls are visible and visually follow the layout of an alert popup. NEWS |6 panel-plugin/xfce-plugin-dialog.c | 46 +++ xfce4-mixer/xfce-mixer-container.c | 29 +++--- xfce4-mixer/xfce-mixer-window.c|7 + 4 files changed, 48 insertions(+), 40 deletions(-) diff --git a/NEWS b/NEWS index 9b0940e..1c6733c 100644 --- a/NEWS +++ b/NEWS @@ -56,6 +56,12 @@ left and right of them. - Default to unlocked state if the volume differs between the channels of a track. +- Add mnemonics for all tabs and the soud card combob box of the mixer main + window. +- Add labels with mnemonics for the soud card and track combo boxes of the + plugin configuration dialog. +- Improve the wording of the message shown when no controls are visible and + visually follow the layout of an alert popup. 4.8.0 diff --git a/panel-plugin/xfce-plugin-dialog.c b/panel-plugin/xfce-plugin-dialog.c index 1680834..f89f872 100644 --- a/panel-plugin/xfce-plugin-dialog.c +++ b/panel-plugin/xfce-plugin-dialog.c @@ -142,11 +142,9 @@ xfce_plugin_dialog_new (XfcePanelPlugin *plugin) static void xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) { - GtkWidget *alignment; - GtkWidget *vbox; + GtkWidget *table; GtkWidget *button; GtkWidget *label; - gchar *title; gtk_window_set_icon_name (GTK_WINDOW (dialog), multimedia-volume-control); gtk_window_set_title (GTK_WINDOW (dialog), _(Audio Mixer Plugin)); @@ -157,43 +155,29 @@ xfce_plugin_dialog_create_contents (XfcePluginDialog *dialog) gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_CLOSE); gtk_widget_show (button); - vbox = gtk_vbox_new (FALSE, 6); - gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)-vbox), vbox); - gtk_widget_show (vbox); + table = gtk_table_new (2, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 12); + gtk_table_set_col_spacings (GTK_TABLE (table), 12); + gtk_container_set_border_width (GTK_CONTAINER (table), 6); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)-vbox), table); + gtk_widget_show (table); - label = gtk_label_new (NULL); - title = g_strdup_printf (span weight='bold'%s/span, _(Sound card)); - gtk_label_set_markup (GTK_LABEL (label), title); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + label = gtk_label_new_with_mnemonic (_(Sound _card:)); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_show (label); - g_free (title); - - alignment = gtk_alignment_new (0.0, 0.0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0); - gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0); - gtk_widget_show (alignment); dialog-card_combo = xfce_mixer_card_combo_new (NULL); - gtk_container_add (GTK_CONTAINER (alignment), dialog-card_combo); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog-card_combo); + gtk_table_attach (GTK_TABLE (table), dialog-card_combo, 1, 2, 0, 1, GTK_FILL|GTK_EXPAND, GTK_SHRINK, 0, 0); gtk_widget_show (dialog-card_combo); - label = gtk_label_new (NULL); - title = g_strdup_printf (span weight='bold'%s/span, _(Mixer track)); - gtk_label_set_markup (GTK_LABEL (label), title); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + label = gtk_label_new_with_mnemonic (_(Mixer _track:)); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog-track_combo); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_widget_show (label); - g_free (title); - - alignment = gtk_alignment_new (0.0, 0.0, 1, 1); - gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 6, 12, 0); - gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, TRUE, 0); - gtk_widget_show (alignment); dialog-track_combo = xfce_mixer_track_combo_new (NULL, NULL); - gtk_container_add (GTK_CONTAINER (alignment), dialog-track_combo); + gtk_table_attach (GTK_TABLE (table), dialog-track_combo, 1, 2, 1, 2, GTK_FILL|GTK_EXPAND, GTK_SHRINK, 0, 0); gtk_widget_show (dialog-track_combo);
[Xfce4-commits] xfce4-mixer:master Improve the mixer widgets
Updating branch refs/heads/master to 6c88d1adf7dc933a678e4fd47f7912958f1c3426 (commit) from a474e1e7809a8d07ee5458f73402698f7cd0d3b3 (commit) commit 6c88d1adf7dc933a678e4fd47f7912958f1c3426 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:09 2012 +0200 Improve the mixer widgets Separate labels from track and option widgets and align labels and option widgets horizontally. Reduce the distance between faders in track widgets and ensure it is always the same. Put the chain buttons above the mute and record buttons and add lines to the left and right of them. Default to unlocked state if the volume differs between the channels of a track. NEWS|8 ++ xfce4-mixer/xfce-mixer-option.c | 42 ++- xfce4-mixer/xfce-mixer-switch.c | 39 +++ xfce4-mixer/xfce-mixer-track.c | 251 --- xfce4-mixer/xfce-mixer.c| 60 +++--- 5 files changed, 263 insertions(+), 137 deletions(-) diff --git a/NEWS b/NEWS index 0d0eb5b..9b0940e 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,14 @@ changed. - Handle options list changed messages which indicate that the available options of a track have changed. +- Separate labels from track and option widgets and align labels and option + widgets horizontally. +- Reduce the distance between faders in track widgets and ensure it is always + the same. +- Put the chain buttons above the mute and record buttons and add lines to the + left and right of them. +- Default to unlocked state if the volume differs between the channels of a + track. 4.8.0 diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c index 8ad8682..c9a79b5 100644 --- a/xfce4-mixer/xfce-mixer-option.c +++ b/xfce4-mixer/xfce-mixer-option.c @@ -54,12 +54,12 @@ static void xfce_mixer_option_bus_message (GstBus *bus, struct _XfceMixerOptionClass { - GtkHBoxClass __parent__; + GtkComboBoxClass __parent__; }; struct _XfceMixerOption { - GtkHBox __parent__; + GtkComboBox__parent__; GtkListStore *list_store; @@ -67,8 +67,6 @@ struct _XfceMixerOption GstMixerTrack *track; guint signal_handler_id; - GtkWidget *combo; - gboolean ignore_signals; }; @@ -99,7 +97,7 @@ xfce_mixer_option_get_type (void) NULL, }; - type = g_type_register_static (GTK_TYPE_HBOX, XfceMixerOption, info, 0); + type = g_type_register_static (GTK_TYPE_COMBO_BOX, XfceMixerOption, info, 0); } return type; @@ -181,26 +179,13 @@ static void xfce_mixer_option_create_contents (XfceMixerOption *option) { GstMixerOptions *options; - GtkWidget *label; GtkCellRenderer *renderer; const GList *options_iter; GtkTreeIter tree_iter; const gchar *active_option; - const gchar *track_label; - gchar *title; gint i; gint active_index = 0; - gtk_box_set_homogeneous (GTK_BOX (option), FALSE); - gtk_box_set_spacing (GTK_BOX (option), 12); - - track_label = xfce_mixer_get_track_label (option-track); - title = g_strdup_printf (%s:, track_label); - - label = gtk_label_new (title); - gtk_box_pack_start (GTK_BOX (option), label, FALSE, FALSE, 0); - gtk_widget_show (label); - options = GST_MIXER_OPTIONS (option-track); active_option = gst_mixer_get_option (GST_MIXER (option-card), options); @@ -215,21 +200,18 @@ xfce_mixer_option_create_contents (XfceMixerOption *option) active_index = i; } - option-combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (option-list_store)); - gtk_box_pack_start (GTK_BOX (option), option-combo, FALSE, FALSE, 0); + gtk_combo_box_set_model (GTK_COMBO_BOX (option), GTK_TREE_MODEL (option-list_store)); /* Make read-only options insensitive */ if (GST_MIXER_TRACK_HAS_FLAG (option-track, GST_MIXER_TRACK_READONLY)) -gtk_widget_set_sensitive (option-combo, FALSE); - gtk_combo_box_set_active (GTK_COMBO_BOX (option-combo), active_index); - gtk_widget_show (option-combo); +gtk_widget_set_sensitive (GTK_WIDGET (option), FALSE); + gtk_combo_box_set_active (GTK_COMBO_BOX (option), active_index); + gtk_widget_show (GTK_WIDGET (option)); renderer = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (option-combo), renderer, TRUE); - gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (option-combo), renderer, text, OPTION_COLUMN); - - g_signal_connect (option-combo, changed, G_CALLBACK (xfce_mixer_option_changed), option); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (option), renderer, TRUE); + gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (option), renderer, text, OPTION_COLUMN); - g_free (title); + g_signal_connect (option, changed, G_CALLBACK (xfce_mixer_option_changed), option); } @@ -278,7 +260,7 @@ xfce_mixer_option_update (XfceMixerOption *option) if (G_UNLIKELY
[Xfce4-commits] xfce4-mixer:master Refactor the plugin
Updating branch refs/heads/master to 484886fbb7fc18ad77cda0f82a84c463f2011c51 (commit) from 5369a8e17dcab5d6431a290552a50fc966d45fa4 (commit) commit 484886fbb7fc18ad77cda0f82a84c463f2011c51 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 16:31:09 2012 +0200 Refactor the plugin Refactor and simplify the plugin code. Added some more debugging output to the plugin. panel-plugin/xfce-mixer-plugin.c | 523 ++ 1 files changed, 300 insertions(+), 223 deletions(-) diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index 2cb25c8..ef2720d 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -71,43 +71,51 @@ enum -static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_set_property (GObject *object, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_get_property (GObject *object, - guint prop_id, - GValue *value, - GParamSpec *pspec); -static void xfce_mixer_plugin_free_data (XfcePanelPlugin *plugin); -static void xfce_mixer_plugin_configure_plugin (XfcePanelPlugin *plugin); -static gboolean xfce_mixer_plugin_size_changed (XfcePanelPlugin *plugin, - gint size); -static void xfce_mixer_plugin_screen_position_changed (XfcePanelPlugin *plugin, - XfceScreenPosition screen_position); -static void xfce_mixer_plugin_button_toggled(XfceMixerPlugin *mixer_plugin, - GtkToggleButton *togglebutton); -static void xfce_mixer_plugin_volume_changed(XfceMixerPlugin *mixer_plugin, - gdouble volume); -static void xfce_mixer_plugin_mute_changed (XfceMixerPlugin *mixer_plugin, - gboolean muted); -static void xfce_mixer_plugin_mute_item_toggled (XfceMixerPlugin *mixer_plugin, - GtkCheckMenuItem *mute_menu_item); -static void xfce_mixer_plugin_command_item_activated(XfceMixerPlugin *mixer_plugin, - GtkMenuItem *menuitem); -static void xfce_mixer_plugin_is_muted_property_changed (XfceMixerPlugin *mixer_plugin, - GParamSpec *pspec, - GObject *object); -static void xfce_mixer_plugin_update_track (XfceMixerPlugin *mixer_plugin); -static void xfce_mixer_plugin_bus_message (GstBus *bus, - GstMessage *message, - XfceMixerPlugin *mixer_plugin); +static void xfce_mixer_plugin_construct (XfcePanelPlugin *plugin); +static void xfce_mixer_plugin_set_property(GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void xfce_mixer_plugin_get_property(GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec); +static void xfce_mixer_plugin_free_data (XfcePanelPlugin *plugin); +static void xfce_mixer_plugin_configure_plugin(XfcePanelPlugin *plugin); +static gboolean xfce_mixer_plugin_size_changed(XfcePanelPlugin *plugin, + gint size); +static void xfce_mixer_plugin_screen_position_changed
[Xfce4-commits] xfce4-mixer:gber/improvements Deleting branch gber/improvements
Deleting branch refs/heads/gber/improvements ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:bluesabre/display-settings Plugged in mirror displays checkbox.
Updating branch refs/heads/bluesabre/display-settings to 70e1b53d387a5fb4991aeb969c2887c873f36b72 (commit) from dc10e401b2a5889a53ec1df459043deed0ffcc81 (commit) commit 70e1b53d387a5fb4991aeb969c2887c873f36b72 Author: Sean Davis smd.seanda...@gmail.com Date: Thu Sep 27 10:58:53 2012 -0400 Plugged in mirror displays checkbox. dialogs/display-settings/main.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index af39b61..5c61662 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -962,12 +962,15 @@ display_setting_mirror_displays_toggled (GtkToggleButton *togglebutton, GtkBuilder *builder) { GObject *positions, *active_displays; +guint n, current_display; if (!xfce_randr) return; if (xfce_randr-noutput = 1) return; + +current_display = xfce_randr-active_output; positions = gtk_builder_get_object (builder, randr-position); active_displays = gtk_builder_get_object (builder, randr-active-displays); @@ -976,6 +979,23 @@ display_setting_mirror_displays_toggled (GtkToggleButton *togglebutton, { /* Activate mirror-mode */ +/* Apply mirror settings to each monitor */ +for (n = 0; n display_settings_get_n_active_outputs (); n++) +{ +xfce_randr-active_output = n; + +XFCE_RANDR_POS_X (xfce_randr) = 0; +XFCE_RANDR_POS_Y (xfce_randr) = 0; + +xfce_randr_save_output (xfce_randr, Default, display_channel, +xfce_randr-active_output); + +} + +xfce_randr-active_output = current_display; + +xfce_randr_apply (xfce_randr, Default, display_channel); + /* Disable the position comboboxes */ gtk_widget_set_sensitive (GTK_WIDGET (positions), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (active_displays), FALSE); @@ -1127,6 +1147,7 @@ display_settings_treeview_selection_changed (GtkTreeSelection *selection, GtkTreeIter iter; gboolean has_selection; gint active_id; +GObject *mirror_displays, *position_combo, *display_combo; /* Get the selection */ has_selection = gtk_tree_selection_get_selected (selection, model, iter); @@ -1148,6 +1169,15 @@ display_settings_treeview_selection_changed (GtkTreeSelection *selection, display_setting_refresh_rates_populate (builder); display_setting_rotations_populate (builder); display_setting_reflections_populate (builder); + +mirror_displays = gtk_builder_get_object(builder, mirror-displays); +if (gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(mirror_displays) )) { +position_combo = gtk_builder_get_object(builder, randr-position); +display_combo = gtk_builder_get_object(builder, randr-active-displays); + +gtk_widget_set_sensitive( GTK_WIDGET(position_combo), FALSE ); +gtk_widget_set_sensitive( GTK_WIDGET(display_combo), FALSE ); +} } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Release 4.9.0
Updating branch refs/heads/master to 8905290888a001222487273c36a570a2c0b1f5f1 (commit) from 484886fbb7fc18ad77cda0f82a84c463f2011c51 (commit) commit 8905290888a001222487273c36a570a2c0b1f5f1 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 17:04:10 2012 +0200 Release 4.9.0 configure.ac.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 45fe951..b325ab9 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -26,7 +26,7 @@ m4_define([xfce4_mixer_version_minor], [9]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], [git]) +m4_define([xfce4_mixer_version_tag], []) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [git], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Post-release bump
Updating branch refs/heads/master to a89852c76caf70a546bf436581d712156ec1d563 (commit) from 8905290888a001222487273c36a570a2c0b1f5f1 (commit) commit a89852c76caf70a546bf436581d712156ec1d563 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 17:05:57 2012 +0200 Post-release bump configure.ac.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index b325ab9..45fe951 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -26,7 +26,7 @@ m4_define([xfce4_mixer_version_minor], [9]) m4_define([xfce4_mixer_version_micro], [0]) m4_define([xfce4_mixer_version_nano], []) dnl leave this empty to have no nano version m4_define([xfce4_mixer_version_build], [r@REVISION@]) -m4_define([xfce4_mixer_version_tag], []) +m4_define([xfce4_mixer_version_tag], [git]) m4_define([xfce4_mixer_version], [xfce4_mixer_version_major().xfce4_mixer_version_minor().xfce4_mixer_version_micro()ifelse(xfce4_mixer_version_nano(), [], [], [.xfce4_mixer_version_nano()])ifelse(xfce4_mixer_version_tag(), [git], [xfce4_mixer_version_tag()-xfce4_mixer_version_build()], [xfce4_mixer_version_tag()])]) dnl *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mixer:master Fix a typo
Updating branch refs/heads/master to 5c0458cb0fda7ea5258d6f253ff8d662230d5e59 (commit) from a89852c76caf70a546bf436581d712156ec1d563 (commit) commit 5c0458cb0fda7ea5258d6f253ff8d662230d5e59 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 17:41:30 2012 +0200 Fix a typo libxfce4mixer/xfce-mixer-debug.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/libxfce4mixer/xfce-mixer-debug.c b/libxfce4mixer/xfce-mixer-debug.c index d45b92d..54449b3 100644 --- a/libxfce4mixer/xfce-mixer-debug.c +++ b/libxfce4mixer/xfce-mixer-debug.c @@ -82,10 +82,7 @@ xfce_mixer_debug_init (const gchar *log_domain, } #else if (!debug_mode) -{ - g_log_set_handler (log_domain, G_LOG_LEVEL_DEBUG, xfce4_mixer_dummy_log_handler, NULL); - g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, xfce4_mixer_dummy_log_handler, NULL); -} +g_log_set_handler (log_domain, G_LOG_LEVEL_DEBUG, xfce_mixer_dummy_log_handler, NULL); #endif /* GLIB_CHECK_VERSION (2,32,0) */ } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-settings:bluesabre/display-settings Connected main buttons on minimal dialog. Added to display advanced dialog when minimal called and only one display.
Updating branch refs/heads/bluesabre/display-settings to 793caca47d12c1f1aad624ef6050ba4b890eb754 (commit) from 70e1b53d387a5fb4991aeb969c2887c873f36b72 (commit) commit 793caca47d12c1f1aad624ef6050ba4b890eb754 Author: Sean Davis smd.seanda...@gmail.com Date: Thu Sep 27 11:58:01 2012 -0400 Connected main buttons on minimal dialog. Added to display advanced dialog when minimal called and only one display. dialogs/display-settings/main.c| 118 +++- .../display-settings/minimal-display-dialog.glade |2 +- 2 files changed, 117 insertions(+), 3 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index 5c61662..eeca298 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -1379,6 +1379,9 @@ display_settings_minimal_extend_left_toggled (GtkToggleButton *button, GObject *mirror_displays; GObject *extend_right; +gint selected_x, selected_y; +XfceRRMode *current_mode; + mirror_displays = gtk_builder_get_object(builder, mirror); extend_right = gtk_builder_get_object(builder, extend_right); @@ -1389,11 +1392,49 @@ display_settings_minimal_extend_left_toggled (GtkToggleButton *button, g_object_disconnect (extend_right, any_signal::toggled, display_settings_minimal_extend_right_toggled, builder, NULL); + +gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), FALSE ); +gtk_widget_set_sensitive( GTK_WIDGET(extend_right), FALSE ); /* Since this signal will only be called when a toggle button is activated. */ gtk_toggle_button_set_active (button, TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(mirror_displays), FALSE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE); + +/* Change active output to secondary display. */ +xfce_randr-active_output = 1; + +current_mode = xfce_randr_find_mode_by_id (xfce_randr, xfce_randr-active_output, XFCE_RANDR_MODE (xfce_randr)); + +/* Change active output to primary display. */ +xfce_randr-active_output = 0; + +/* Move the secondary to where the primary is... */ +selected_x = XFCE_RANDR_POS_X (xfce_randr); +selected_y = XFCE_RANDR_POS_Y (xfce_randr); +xfce_randr-active_output = 1; +XFCE_RANDR_POS_X (xfce_randr) = selected_x; +XFCE_RANDR_POS_Y (xfce_randr) = selected_y; + +/* Move the primary display to the right of the secondary display. */ +xfce_randr-active_output = 0; +XFCE_RANDR_POS_X (xfce_randr) = current_mode-width; + +/* Save changes to secondary display */ +xfce_randr-active_output = 1; +xfce_randr_save_output (xfce_randr, Default, display_channel, +xfce_randr-active_output); + +/* Save changes to primary display */ +xfce_randr-active_output = 0; +xfce_randr_save_output (xfce_randr, Default, display_channel, +xfce_randr-active_output); + +/* Apply all changes */ +xfce_randr_apply (xfce_randr, Default, display_channel); + +gtk_widget_set_sensitive( GTK_WIDGET(mirror_displays), TRUE ); +gtk_widget_set_sensitive( GTK_WIDGET(extend_right), TRUE ); /* Reconnect the signals */ g_signal_connect (mirror_displays, toggled, G_CALLBACK (display_settings_minimal_mirror_displays_toggled), @@ -1410,6 +1451,8 @@ display_settings_minimal_mirror_displays_toggled (GtkToggleButton *button, GObject *extend_left; GObject *extend_right; +gint selected_x, selected_y; + extend_left = gtk_builder_get_object(builder, extend_left); extend_right = gtk_builder_get_object(builder, extend_right); @@ -1420,11 +1463,39 @@ display_settings_minimal_mirror_displays_toggled (GtkToggleButton *button, g_object_disconnect (extend_right, any_signal::toggled, display_settings_minimal_extend_right_toggled, builder, NULL); + +gtk_widget_set_sensitive( GTK_WIDGET(extend_left), FALSE ); +gtk_widget_set_sensitive( GTK_WIDGET(extend_right), FALSE ); /* Since this signal will only be called when a toggle button is activated. */ gtk_toggle_button_set_active (button, TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_left), FALSE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(extend_right), FALSE); + +xfce_randr-active_output = 0; + +selected_x = XFCE_RANDR_POS_X (xfce_randr); +selected_y = XFCE_RANDR_POS_Y (xfce_randr); + +xfce_randr-active_output = 1; +XFCE_RANDR_POS_X (xfce_randr) = selected_x; +XFCE_RANDR_POS_Y (xfce_randr) = selected_y; + +/* Save changes to secondary display */ +xfce_randr-active_output = 1; +xfce_randr_save_output (xfce_randr, Default,
[Xfce4-commits] xfce4-mixer:master Do not use G_VALUE_INIT which is only available in glib = 2.30
Updating branch refs/heads/master to 91598f7c345e4e66d5dcead7615e29b92affc584 (commit) from 5c0458cb0fda7ea5258d6f253ff8d662230d5e59 (commit) commit 91598f7c345e4e66d5dcead7615e29b92affc584 Author: Guido Berhoerster guido+x...@berhoerster.name Date: Thu Sep 27 18:25:55 2012 +0200 Do not use G_VALUE_INIT which is only available in glib = 2.30 panel-plugin/xfce-volume-button.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index 4a25fb3..223701b 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -983,7 +983,7 @@ void xfce_volume_button_set_no_mute (XfceVolumeButton *button, gboolean no_mute) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -997,7 +997,7 @@ xfce_volume_button_set_no_mute (XfceVolumeButton *button, gboolean xfce_volume_button_get_no_mute (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); @@ -1013,7 +1013,7 @@ void xfce_volume_button_set_muted (XfceVolumeButton *button, gboolean is_muted) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1027,7 +1027,7 @@ xfce_volume_button_set_muted (XfceVolumeButton *button, gboolean xfce_volume_button_get_muted (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); @@ -1073,7 +1073,7 @@ void xfce_volume_button_set_track_label (XfceVolumeButton *button, const gchar *track_label) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1087,7 +1087,7 @@ xfce_volume_button_set_track_label (XfceVolumeButton *button, gchar* xfce_volume_button_get_track_label (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), NULL); @@ -1103,7 +1103,7 @@ void xfce_volume_button_set_is_configured (XfceVolumeButton *button, gboolean is_configured) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1117,7 +1117,7 @@ xfce_volume_button_set_is_configured (XfceVolumeButton *button, gboolean xfce_volume_button_get_is_configured (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); @@ -1133,7 +1133,7 @@ void xfce_volume_button_set_screen_position (XfceVolumeButton *button, XfceScreenPosition screen_position) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_if_fail (IS_XFCE_VOLUME_BUTTON (button)); @@ -1147,7 +1147,7 @@ xfce_volume_button_set_screen_position (XfceVolumeButton *button, XfceScreenPosition xfce_volume_button_get_screen_position (XfceVolumeButton *button) { - GValue value = G_VALUE_INIT; + GValue value = { 0 }; g_return_val_if_fail (IS_XFCE_VOLUME_BUTTON (button), FALSE); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] exo:master l10n: Updated Hungarian (hu) translation to 99%
Updating branch refs/heads/master to c7c5c3e531634d5717190f0dbdda2ec61060c2e9 (commit) from 2b103d2cc906b55829e3f8b0064e2f241127018f (commit) commit c7c5c3e531634d5717190f0dbdda2ec61060c2e9 Author: László Horváth leslie.transl...@yahoo.co.uk Date: Thu Sep 27 19:01:13 2012 +0200 l10n: Updated Hungarian (hu) translation to 99% New status: 274 messages complete with 1 fuzzy and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/hu.po | 39 --- 1 files changed, 20 insertions(+), 19 deletions(-) diff --git a/po/hu.po b/po/hu.po index c62daa4..3553890 100644 --- a/po/hu.po +++ b/po/hu.po @@ -7,7 +7,7 @@ msgid msgstr Project-Id-Version: hu\n Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2012-05-20 12:51+\n +POT-Creation-Date: 2012-09-27 11:54+\n PO-Revision-Date: 2010-02-05 22:43+0100\n Last-Translator: Gabor Kelemen kelemeng at gnome dot hu\n Language-Team: Hungarian gnome at fsf dot hu\n @@ -536,7 +536,7 @@ msgstr --strip-comments Megjegyzések eltávolítása XML fájlokból\n msgid --strip-content Remove node contents from XML files\n msgstr --strip-content Csomópont tartalmának eltávolítása XML fájlokból\n -#: ../exo-csource/main.c:304 ../exo-desktop-item-edit/main.c:193 +#: ../exo-csource/main.c:304 ../exo-desktop-item-edit/main.c:195 #: ../exo-open/main.c:496 #, c-format msgid @@ -552,7 +552,7 @@ msgstr Írta: Benedikt Meurer be...@xfce.org.\n \n -#: ../exo-csource/main.c:308 ../exo-desktop-item-edit/main.c:197 +#: ../exo-csource/main.c:308 ../exo-desktop-item-edit/main.c:199 #: ../exo-open/main.c:500 #, c-format msgid @@ -567,7 +567,7 @@ msgstr feltételei szerint, amely megtalálható a(z) %s forráscsomagban.\n \n -#: ../exo-csource/main.c:312 ../exo-desktop-item-edit/main.c:201 +#: ../exo-csource/main.c:312 ../exo-desktop-item-edit/main.c:203 #: ../exo-open/main.c:504 #, c-format msgid Please report bugs to %s.\n @@ -766,63 +766,63 @@ msgid Print version information and exit msgstr Verzióinformációk kiírása és kilépés #. initialize Gtk+ -#: ../exo-desktop-item-edit/main.c:169 +#: ../exo-desktop-item-edit/main.c:171 msgid [FILE|FOLDER] msgstr [FÁJL|MAPPA] #. no error message, the GUI initialization failed -#: ../exo-desktop-item-edit/main.c:181 +#: ../exo-desktop-item-edit/main.c:183 msgid Failed to open display msgstr A képernyő megnyitása meghiúsult -#: ../exo-desktop-item-edit/main.c:208 +#: ../exo-desktop-item-edit/main.c:210 msgid No file/folder specified msgstr Nincs megadva fájl/mappa -#: ../exo-desktop-item-edit/main.c:274 +#: ../exo-desktop-item-edit/main.c:276 #, c-format msgid Failed to load contents from \%s\: %s msgstr A tartalom („%s”) betöltése meghiúsult: %s -#: ../exo-desktop-item-edit/main.c:279 +#: ../exo-desktop-item-edit/main.c:281 #, c-format msgid The file \%s\ contains no data msgstr A fájl („%s”) nem tartalmaz adatokat #. failed to parse the file -#: ../exo-desktop-item-edit/main.c:292 +#: ../exo-desktop-item-edit/main.c:294 #, c-format msgid Failed to parse contents of \%s\: %s msgstr A(z( „%s” tartalmának feldolgozása meghiúsult: %s #. we cannot continue without a type -#: ../exo-desktop-item-edit/main.c:304 +#: ../exo-desktop-item-edit/main.c:306 #, c-format msgid File \%s\ has no type key msgstr A fájl („%s”) nem tartalmaz típus kulcsot #. tell the user that we don't support the type -#: ../exo-desktop-item-edit/main.c:314 +#: ../exo-desktop-item-edit/main.c:316 #, c-format msgid Unsupported desktop file type \%s\ msgstr Nem támogatott asztalifájl-típus: „%s” #. add the Create/Save button (as default) -#: ../exo-desktop-item-edit/main.c:338 +#: ../exo-desktop-item-edit/main.c:340 msgid C_reate msgstr _Létrehozás #. create failed, ask the user to specify a file name -#: ../exo-desktop-item-edit/main.c:511 +#: ../exo-desktop-item-edit/main.c:513 msgid Choose filename msgstr Válasszon fájlnevet -#: ../exo-desktop-item-edit/main.c:618 +#: ../exo-desktop-item-edit/main.c:620 #, c-format msgid Failed to create \%s\. msgstr „%s” létrehozása meghiúsult. -#: ../exo-desktop-item-edit/main.c:618 +#: ../exo-desktop-item-edit/main.c:620 #, c-format msgid Failed to save \%s\. msgstr „%s” mentése meghiúsult. @@ -839,8 +839,8 @@ msgstr Alapértelmezett alkalmazások kiválasztása számos szolgáltatáshoz #. Internet #. #: ../exo-helper/exo-helper-chooser-dialog.c:132 -msgid Internet -msgstr Internet +msgid _Internet +msgstr _Internet #: ../exo-helper/exo-helper-chooser-dialog.c:145 #: ../exo-open/exo-web-browser.desktop.in.h:2 @@ -871,7 +871,8 @@ msgstr #. Utilities #. #: ../exo-helper/exo-helper-chooser-dialog.c:205 -msgid Utilities +#, fuzzy +msgid _Utilities msgstr Segédprogramok #: ../exo-helper/exo-helper-chooser-dialog.c:218 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org
[Xfce4-commits] xfce4-settings:master l10n: Updated Hungarian (hu) translation to 98%
Updating branch refs/heads/master to 62ced46be1b5d0afd0f1e9ac2799747541cfc42e (commit) from adf990f6e3688b8471a969420acbeb58c57fed3a (commit) commit 62ced46be1b5d0afd0f1e9ac2799747541cfc42e Author: László Horváth leslie.transl...@yahoo.co.uk Date: Thu Sep 27 19:08:37 2012 +0200 l10n: Updated Hungarian (hu) translation to 98% New status: 331 messages complete with 5 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/hu.po | 328 ++ 1 files changed, 178 insertions(+), 150 deletions(-) diff --git a/po/hu.po b/po/hu.po index cc50960..5e043ff 100644 --- a/po/hu.po +++ b/po/hu.po @@ -1,23 +1,23 @@ # Hungarian translation of xfce4-settings # Copyright (C) 2009, 2010, 2012. Free Software Foundation, Inc. # This file is distributed under the same license as the xfce4-settings package. -# +# # SZERVÁC Attila sas@321, 2004-2009. # Gabor Kelemen kelemeng at gnome dot hu, 2009, 2010, 2012. msgid msgstr Project-Id-Version: xfce4-settings\n Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2012-04-19 09:06+\n +POT-Creation-Date: 2012-09-27 15:33+\n PO-Revision-Date: 2012-04-21 04:52+0200\n Last-Translator: Gabor Kelemen kelemeng at gnome dot hu\n Language-Team: Hungarian gnome-hu-list at gnome dot org\n -Language: \n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n +Language: \n +Plural-Forms: nplurals=2; plural=(n != 1);\n X-Generator: KBabel 1.11.4\n -Plural-Forms: nplurals=2; plural=(n != 1);\n #: ../dialogs/accessibility-settings/accessibility-dialog.glade.h:1 msgid Acceleration _profile: @@ -98,13 +98,15 @@ msgstr Ragadós billentyűk #: ../dialogs/accessibility-settings/accessibility-dialog.glade.h:19 msgid The amount of time, in milliseconds, required between keystrokes -msgstr A billentyűleütések között ennyi időnek kell eltelnie ezredmásodpercben +msgstr +A billentyűleütések között ennyi időnek kell eltelnie ezredmásodpercben #: ../dialogs/accessibility-settings/accessibility-dialog.glade.h:20 msgid The amount of time, in milliseconds, that must elapse before a keystroke will be accepted -msgstr A billentyűleütés elfogadásáig ennyi időnek kell eltelnie ezredmásodpercben +msgstr +A billentyűleütés elfogadásáig ennyi időnek kell eltelnie ezredmásodpercben #: ../dialogs/accessibility-settings/accessibility-dialog.glade.h:21 msgid The maximum pointer speed after acceleration @@ -189,7 +191,8 @@ msgstr msgid When selected, the mouse pointer can be controlled using the keyboard number pad -msgstr Az egérmutató a billentyűzet számmezejének segítségével lesz irányítható +msgstr +Az egérmutató a billentyűzet számmezejének segítségével lesz irányítható #: ../dialogs/accessibility-settings/accessibility-dialog.glade.h:35 msgid _Acceleration delay: @@ -250,8 +253,8 @@ msgstr Verzióinformációk #: ../dialogs/appearance-settings/main.c:966 #: ../dialogs/display-settings/main.c:1043 #: ../dialogs/keyboard-settings/main.c:76 ../dialogs/mime-settings/main.c:62 -#: ../dialogs/mouse-settings/main.c:1526 ../xfce4-settings-editor/main.c:63 -#: ../xfsettingsd/main.c:173 ../xfce4-settings-manager/main.c:60 +#: ../dialogs/mouse-settings/main.c:1597 ../xfce4-settings-editor/main.c:63 +#: ../xfsettingsd/main.c:187 ../xfce4-settings-manager/main.c:60 #, c-format msgid Type '%s --help' for usage. msgstr Segítségért adja ki az „%s --help” parancsot. @@ -260,8 +263,8 @@ msgstr Segítségért adja ki az „%s --help” parancsot. #: ../dialogs/appearance-settings/main.c:985 #: ../dialogs/display-settings/main.c:1062 #: ../dialogs/keyboard-settings/main.c:92 ../dialogs/mime-settings/main.c:81 -#: ../dialogs/mouse-settings/main.c:1545 ../xfce4-settings-editor/main.c:82 -#: ../xfsettingsd/main.c:189 ../xfce4-settings-manager/main.c:76 +#: ../dialogs/mouse-settings/main.c:1616 ../xfce4-settings-editor/main.c:82 +#: ../xfsettingsd/main.c:203 ../xfce4-settings-manager/main.c:76 msgid The Xfce development team. All rights reserved. msgstr Az Xfce fejlesztőcsapata. Minden jog fenntartva. @@ -269,8 +272,8 @@ msgstr Az Xfce fejlesztőcsapata. Minden jog fenntartva. #: ../dialogs/appearance-settings/main.c:986 #: ../dialogs/display-settings/main.c:1063 #: ../dialogs/keyboard-settings/main.c:93 ../dialogs/mime-settings/main.c:82 -#: ../dialogs/mouse-settings/main.c:1546 ../xfce4-settings-editor/main.c:83 -#: ../xfsettingsd/main.c:190 ../xfce4-settings-manager/main.c:77 +#: ../dialogs/mouse-settings/main.c:1617 ../xfce4-settings-editor/main.c:83 +#: ../xfsettingsd/main.c:204 ../xfce4-settings-manager/main.c:77 #, c-format msgid Please report bugs to %s. msgstr A hibákat ide jelentse: %s. @@ -280,7 +283,8 @@ msgid Improve keyboard and mouse accessibility msgstr Billentyűzet és egér akadálymentesítésének javítása #: ../dialogs/appearance-settings/appearance-dialog.glade.h:1 -msgid Anti-aliasing, or font
[Xfce4-commits] xfce4-settings:bluesabre/display-settings Fix for variable index.
Updating branch refs/heads/bluesabre/display-settings to b44272768b4dba280f629b91ea1cfa30ad0a10f6 (commit) from 793caca47d12c1f1aad624ef6050ba4b890eb754 (commit) commit b44272768b4dba280f629b91ea1cfa30ad0a10f6 Author: Sean Davis smd.seanda...@gmail.com Date: Thu Sep 27 13:10:12 2012 -0400 Fix for variable index. dialogs/display-settings/main.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c index eeca298..21d1f74 100644 --- a/dialogs/display-settings/main.c +++ b/dialogs/display-settings/main.c @@ -501,7 +501,7 @@ static void display_setting_guess_positioning (GtkBuilder *builder) { GObject *position_combo, *display_combo; -gint current_x, current_y, index; +gint current_x, current_y, cb_index; guint n, current_display; current_display = xfce_randr-active_output; @@ -519,7 +519,7 @@ display_setting_guess_positioning (GtkBuilder *builder) display_setting_active_displays_changed, builder, NULL); -index = 0; +cb_index = 0; for (n = 0; n display_settings_get_n_active_outputs (); n++) { @@ -531,7 +531,7 @@ display_setting_guess_positioning (GtkBuilder *builder) if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) (XFCE_RANDR_POS_Y (xfce_randr) == current_y) ) { gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 0 ); -gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), cb_index ); break; } @@ -539,7 +539,7 @@ display_setting_guess_positioning (GtkBuilder *builder) if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) (XFCE_RANDR_POS_X (xfce_randr) current_x) ) { gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 1 ); -gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), cb_index ); break; } @@ -547,7 +547,7 @@ display_setting_guess_positioning (GtkBuilder *builder) if ( (XFCE_RANDR_POS_Y (xfce_randr) == current_y) (XFCE_RANDR_POS_X (xfce_randr) current_x) ) { gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 2 ); -gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), cb_index ); break; } @@ -555,7 +555,7 @@ display_setting_guess_positioning (GtkBuilder *builder) if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) (XFCE_RANDR_POS_Y (xfce_randr) current_y) ) { gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 3 ); -gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), cb_index ); break; } @@ -563,11 +563,11 @@ display_setting_guess_positioning (GtkBuilder *builder) if ( (XFCE_RANDR_POS_X (xfce_randr) == current_x) (XFCE_RANDR_POS_Y (xfce_randr) current_y) ) { gtk_combo_box_set_active( GTK_COMBO_BOX(position_combo), 4 ); -gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), index ); +gtk_combo_box_set_active( GTK_COMBO_BOX(display_combo), cb_index ); break; } -index++; +cb_index++; } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar-vcs-plugin:master l10n: Updated Hungarian (hu) translation to 16%
Updating branch refs/heads/master to d65a3650f2d4455a2969a2f4b3fab2bdd258d2f1 (commit) from f6db76e939e30452edc77579e4c9f0d5abdbc05a (commit) commit d65a3650f2d4455a2969a2f4b3fab2bdd258d2f1 Author: László Horváth leslie.transl...@yahoo.co.uk Date: Thu Sep 27 19:28:19 2012 +0200 l10n: Updated Hungarian (hu) translation to 16% New status: 51 messages complete with 132 fuzzies and 128 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/hu.po | 55 --- 1 files changed, 28 insertions(+), 27 deletions(-) diff --git a/po/hu.po b/po/hu.po index 904cf47..4e06f48 100644 --- a/po/hu.po +++ b/po/hu.po @@ -17,8 +17,9 @@ msgstr #: ../thunar-vcs-plugin/tvp-git-action.c:263 #: ../thunar-vcs-plugin/tvp-svn-action.c:300 +#, fuzzy msgid Menu|Add -msgstr +msgstr Menü|Hozzáadás #: ../thunar-vcs-plugin/tvp-git-action.c:263 #: ../thunar-vcs-plugin/tvp-svn-action.c:300 ../tvp-git-helper/main.c:153 @@ -31,11 +32,12 @@ msgstr Hozzáad #: ../thunar-vcs-plugin/tvp-git-action.c:264 #, fuzzy msgid Menu|Bisect -msgstr SVN _Checkout +msgstr Menü|Bisect #: ../thunar-vcs-plugin/tvp-git-action.c:264 +#, fuzzy msgid Bisect -msgstr +msgstr Bisect #: ../thunar-vcs-plugin/tvp-git-action.c:266 #: ../thunar-vcs-plugin/tvp-svn-action.c:305 @@ -50,61 +52,61 @@ msgid Blame msgstr #: ../thunar-vcs-plugin/tvp-git-action.c:268 -#, fuzzy msgid Menu|Branch -msgstr Vált +msgstr Menü|Ág #: ../thunar-vcs-plugin/tvp-git-action.c:268 ../tvp-git-helper/main.c:161 #: ../tvp-git-helper/tgh-branch-dialog.c:144 #: ../tvp-git-helper/tgh-stash-dialog.c:167 msgid Branch -msgstr +msgstr Ág #: ../thunar-vcs-plugin/tvp-git-action.c:269 #: ../thunar-vcs-plugin/tvp-svn-action.c:322 #, fuzzy msgid Menu|Checkout -msgstr SVN _Checkout +msgstr Menü|Checkout #: ../thunar-vcs-plugin/tvp-git-action.c:269 #: ../thunar-vcs-plugin/tvp-svn-action.c:322 ../tvp-svn-helper/main.c:271 #: ../tvp-svn-helper/tsh-checkout.c:100 ../tvp-svn-helper/tsh-checkout.c:112 #, fuzzy msgid Checkout -msgstr SVN _Checkout +msgstr Checkout #: ../thunar-vcs-plugin/tvp-git-action.c:270 -#, fuzzy msgid Menu|Clean -msgstr Tisztít +msgstr Menü|Tisztítás #: ../thunar-vcs-plugin/tvp-git-action.c:270 ../tvp-git-helper/main.c:165 #: ../tvp-git-helper/tgh-clean.c:152 ../tvp-git-helper/tgh-clean-dialog.c:96 -#, fuzzy msgid Clean -msgstr Tisztít +msgstr Tisztítás #: ../thunar-vcs-plugin/tvp-git-action.c:272 #, fuzzy msgid Menu|Clone -msgstr Kész +msgstr Menü|Klónozás #: ../thunar-vcs-plugin/tvp-git-action.c:272 ../tvp-git-helper/main.c:169 #: ../tvp-git-helper/tgh-clone.c:115 +#, fuzzy msgid Clone -msgstr +msgstr Klónozás #: ../thunar-vcs-plugin/tvp-git-action.c:273 #: ../thunar-vcs-plugin/tvp-svn-action.c:332 +#, fuzzy msgid Menu|Commit -msgstr +msgstr Menü|Commit #: ../thunar-vcs-plugin/tvp-git-action.c:273 #: ../thunar-vcs-plugin/tvp-svn-action.c:332 #: ../tvp-git-helper/tgh-log-dialog.c:153 ../tvp-svn-helper/main.c:279 #: ../tvp-svn-helper/tsh-commit.c:241 ../tvp-svn-helper/tsh-commit.c:254 +#, fuzzy msgid Commit -msgstr +msgstr Commit #: ../thunar-vcs-plugin/tvp-git-action.c:274 #: ../thunar-vcs-plugin/tvp-svn-action.c:347 @@ -118,9 +120,8 @@ msgid Diff msgstr Különbség #: ../thunar-vcs-plugin/tvp-git-action.c:275 -#, fuzzy msgid Menu|Fetch -msgstr Vált +msgstr #: ../thunar-vcs-plugin/tvp-git-action.c:275 msgid Fetch @@ -129,25 +130,27 @@ msgstr #: ../thunar-vcs-plugin/tvp-git-action.c:276 #, fuzzy msgid Menu|Grep -msgstr Tisztít +msgstr Menü|Grep #: ../thunar-vcs-plugin/tvp-git-action.c:276 +#, fuzzy msgid Grep -msgstr +msgstr Grep #: ../thunar-vcs-plugin/tvp-git-action.c:277 #, fuzzy msgid Menu|Init -msgstr Adatok +msgstr Menü|Init #: ../thunar-vcs-plugin/tvp-git-action.c:277 +#, fuzzy msgid Init -msgstr +msgstr Init #: ../thunar-vcs-plugin/tvp-git-action.c:278 #: ../thunar-vcs-plugin/tvp-svn-action.c:377 msgid Menu|Log -msgstr +msgstr Menü|Log #: ../thunar-vcs-plugin/tvp-git-action.c:278 #: ../thunar-vcs-plugin/tvp-svn-action.c:377 ../tvp-git-helper/main.c:173 @@ -157,14 +160,12 @@ msgid Log msgstr Napló #: ../thunar-vcs-plugin/tvp-git-action.c:279 -#, fuzzy msgid Menu|Merge -msgstr Töröl +msgstr Menü|Egyesítés #: ../thunar-vcs-plugin/tvp-git-action.c:279 -#, fuzzy msgid Merge -msgstr Töröl +msgstr Egyesítés #: ../thunar-vcs-plugin/tvp-git-action.c:281 #: ../thunar-vcs-plugin/tvp-svn-action.c:392 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Don't add empty line at end of uri list (bug #9124).
Updating branch refs/heads/master to 3afa40e0582e2a93d5582d66c93e4af464c1c1c4 (commit) from c32ef2bc99a6c8694873400bb4a61647992a5a5d (commit) commit 3afa40e0582e2a93d5582d66c93e4af464c1c1c4 Author: Nick Schermer n...@xfce.org Date: Thu Sep 27 19:42:48 2012 +0200 Don't add empty line at end of uri list (bug #9124). Nautilus doesn't understand empty element at the end of the string. Tested with Nautilus 3.4. thunar/thunar-gio-extensions.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c index 4e5c77f..97cb651 100644 --- a/thunar/thunar-gio-extensions.c +++ b/thunar/thunar-gio-extensions.c @@ -337,7 +337,8 @@ thunar_g_file_list_to_string (GList *list) string = g_string_append (string, uri); g_free (uri); - string = g_string_append (string, \r\n); + if (lp-next != NULL) +string = g_string_append (string, \r\n); } return g_string_free (string, FALSE); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Improve clipboard handing (bug #8271).
Updating branch refs/heads/master to c69f40c34b794567ff890570d7064e555c39b991 (commit) from acc411d36b8c82f105ff0be79beb35f7fe8ce47f (commit) commit c69f40c34b794567ff890570d7064e555c39b991 Author: Nick Schermer n...@xfce.org Date: Thu Sep 27 20:54:10 2012 +0200 Improve clipboard handing (bug #8271). Add case if the caller accepts uris. If normal utf-8 text is requested, return filenames, not uris. thunar/thunar-clipboard-manager.c | 68 ++-- thunar/thunar-gio-extensions.c| 34 +++--- thunar/thunar-gio-extensions.h|1 + thunar/thunar-location-button.c | 15 thunar/thunar-path-entry.c| 17 - thunar/thunar-standard-view.c | 11 -- 6 files changed, 92 insertions(+), 54 deletions(-) diff --git a/thunar/thunar-clipboard-manager.c b/thunar/thunar-clipboard-manager.c index 747ef03..19b50d0 100644 --- a/thunar/thunar-clipboard-manager.c +++ b/thunar/thunar-clipboard-manager.c @@ -52,6 +52,7 @@ enum enum { + TARGET_TEXT_URI_LIST, TARGET_GNOME_COPIED_FILES, TARGET_UTF8_STRING, }; @@ -118,6 +119,7 @@ typedef struct static const GtkTargetEntry clipboard_targets[] = { + { text/uri-list, 0, TARGET_TEXT_URI_LIST }, { x-special/gnome-copied-files, 0, TARGET_GNOME_COPIED_FILES }, { UTF8_STRING, 0, TARGET_UTF8_STRING } }; @@ -404,16 +406,53 @@ thunar_clipboard_manager_targets_received (GtkClipboard *clipboard, +static gchar * +thunar_clipboard_manager_g_file_list_to_string (GList *list, +const gchar *prefix, +gboolean format_for_text, +gsize *len) +{ + GString *string; + gchar *tmp; + GList *lp; + + /* allocate initial string */ + string = g_string_new (prefix); + + for (lp = list; lp != NULL; lp = lp-next) +{ + if (format_for_text) +tmp = g_file_get_parse_name (G_FILE (lp-data)); + else +tmp = g_file_get_uri (G_FILE (lp-data)); + + string = g_string_append (string, tmp); + g_free (tmp); + + if (lp-next != NULL) +string = g_string_append_c (string, '\n'); +} + + if (len != NULL) +*len = string-len; + + return g_string_free (string, FALSE); +} + + + static void thunar_clipboard_manager_get_callback (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint target_info, gpointer user_data) { - ThunarClipboardManager *manager = THUNAR_CLIPBOARD_MANAGER (user_data); - GList *file_list = NULL; - gchar *string_list; - gchar *data; + ThunarClipboardManager *manager = THUNAR_CLIPBOARD_MANAGER (user_data); + GList *file_list; + gchar *str; + gchar **uris; + const gchar *prefix; + gsizelen; _thunar_return_if_fail (GTK_IS_CLIPBOARD (clipboard)); _thunar_return_if_fail (THUNAR_IS_CLIPBOARD_MANAGER (manager)); @@ -422,19 +461,25 @@ thunar_clipboard_manager_get_callback (GtkClipboard *clipboard, /* determine the path list from the file list */ file_list = thunar_file_list_to_thunar_g_file_list (manager-files); - /* determine the string representation of the path list */ - string_list = thunar_g_file_list_to_string (file_list); - switch (target_info) { +case TARGET_TEXT_URI_LIST: + uris = thunar_g_file_list_to_stringv (file_list); + gtk_selection_data_set_uris (selection_data, uris); + g_strfreev (uris); + break; + case TARGET_GNOME_COPIED_FILES: - data = g_strconcat (manager-files_cutted ? cut\n : copy\n, string_list, NULL); - gtk_selection_data_set (selection_data, selection_data-target, 8, (guchar *) data, strlen (data)); - g_free (data); + prefix = manager-files_cutted ? cut\n : copy\n; + str = thunar_clipboard_manager_g_file_list_to_string (file_list, prefix, FALSE, len); + gtk_selection_data_set (selection_data, selection_data-target, 8, (guchar *) str, len); + g_free (str); break; case TARGET_UTF8_STRING: - gtk_selection_data_set (selection_data, selection_data-target, 8, (guchar *) string_list, strlen (string_list)); + str = thunar_clipboard_manager_g_file_list_to_string (file_list, NULL, TRUE, len); + gtk_selection_data_set_text (selection_data, str, len); + g_free (str); break; default: @@ -443,7 +488,6 @@ thunar_clipboard_manager_get_callback (GtkClipboard *clipboard, /* cleanup */ thunar_g_file_list_free (file_list); - g_free (string_list); } diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c index 97cb651..feeb328 100644 ---
[Xfce4-commits] thunar:master Use Path from desktop file as CWD (bug #5760).
Updating branch refs/heads/master to b37271eb6dcdbc943520fc9c7563508f5480d19c (commit) from c69f40c34b794567ff890570d7064e555c39b991 (commit) commit b37271eb6dcdbc943520fc9c7563508f5480d19c Author: Peter de Ridder pe...@xfce.org Date: Thu Sep 27 21:31:09 2012 +0200 Use Path from desktop file as CWD (bug #5760). thunar/thunar-file.c | 48 ++-- 1 files changed, 26 insertions(+), 22 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 45057e6..13fa21b 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -990,7 +990,7 @@ thunar_file_execute (ThunarFile *file, gchar*escaped_location; gchar **argv = NULL; gchar*exec; - gchar*directory; + gchar*directory = NULL; _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); _thunar_return_val_if_fail (GDK_IS_SCREEN (screen), FALSE); @@ -1025,6 +1025,8 @@ thunar_file_execute (ThunarFile *file, NULL); icon = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_ICON, NULL); + directory = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, + G_KEY_FILE_DESKTOP_KEY_PATH, NULL); terminal = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_TERMINAL, NULL); snotify = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, @@ -1089,38 +1091,40 @@ thunar_file_execute (ThunarFile *file, if (G_LIKELY (result)) { - /* determine the working directory */ - if (G_LIKELY (working_directory != NULL)) + /* use other directory if the Path from the desktop file was not set */ + if (G_LIKELY (directory == NULL)) { - /* copy the working directory provided to this method */ - directory = g_file_get_path (working_directory); -} - else if (file_list != NULL) -{ - /* use the directory of the first list item */ - parent = g_file_get_parent (file_list-data); - directory = (parent != NULL) ? thunar_g_file_get_location (parent) : NULL; - g_object_unref (parent); -} - else -{ - /* use the directory of the executable file */ - parent = g_file_get_parent (file-gfile); - directory = (parent != NULL) ? thunar_g_file_get_location (parent) : NULL; - g_object_unref (parent); + /* determine the working directory */ + if (G_LIKELY (working_directory != NULL)) +{ + /* copy the working directory provided to this method */ + directory = g_file_get_path (working_directory); +} + else if (file_list != NULL) +{ + /* use the directory of the first list item */ + parent = g_file_get_parent (file_list-data); + directory = (parent != NULL) ? thunar_g_file_get_location (parent) : NULL; + g_object_unref (parent); +} + else +{ + /* use the directory of the executable file */ + parent = g_file_get_parent (file-gfile); + directory = (parent != NULL) ? thunar_g_file_get_location (parent) : NULL; + g_object_unref (parent); +} } /* execute the command */ result = xfce_spawn_on_screen (screen, directory, argv, NULL, G_SPAWN_SEARCH_PATH, snotify, gtk_get_current_event_time (), icon, error); - - /* release the working directory */ - g_free (directory); } /* clean up */ g_strfreev (argv); g_free (location); + g_free (directory); return result; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Add working directory entry to apr (bug #5760).
Updating branch refs/heads/master to 626b11c4dcf3847ebdf520d7c9c6786a9b0c8126 (commit) from b37271eb6dcdbc943520fc9c7563508f5480d19c (commit) commit 626b11c4dcf3847ebdf520d7c9c6786a9b0c8126 Author: Peter de Ridder pe...@xfce.org Date: Thu Sep 27 21:36:57 2012 +0200 Add working directory entry to apr (bug #5760). plugins/thunar-apr/thunar-apr-desktop-page.c | 71 +++--- 1 files changed, 63 insertions(+), 8 deletions(-) diff --git a/plugins/thunar-apr/thunar-apr-desktop-page.c b/plugins/thunar-apr/thunar-apr-desktop-page.c index 4d5498a..865f559 100644 --- a/plugins/thunar-apr/thunar-apr-desktop-page.c +++ b/plugins/thunar-apr/thunar-apr-desktop-page.c @@ -78,6 +78,7 @@ struct _ThunarAprDesktopPage GtkWidget*description_entry; GtkWidget*command_entry; + GtkWidget*path_entry; GtkWidget*url_entry; GtkWidget*comment_entry; GtkWidget*snotify_button; @@ -93,6 +94,7 @@ struct _ThunarAprDesktopPage */ gchar*description_text; gchar*command_text; + gchar*path_text; gchar*url_text; gchar*comment_text; }; @@ -141,7 +143,7 @@ thunar_apr_desktop_page_init (ThunarAprDesktopPage *desktop_page) attribute-end_index = -1; pango_attr_list_insert (attr_list, attribute); - table = gtk_table_new (7, 2, FALSE); + table = gtk_table_new (8, 2, FALSE); gtk_table_set_col_spacings (GTK_TABLE (table), 12); gtk_table_set_row_spacings (GTK_TABLE (table), 0); gtk_container_add (GTK_CONTAINER (desktop_page), table); @@ -192,17 +194,39 @@ thunar_apr_desktop_page_init (ThunarAprDesktopPage *desktop_page) atk_relation_set_add (relations, relation); g_object_unref (G_OBJECT (relation)); - label = gtk_label_new (_(URL:)); + label = gtk_label_new (_(Working Directory:)); gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); gtk_label_set_attributes (GTK_LABEL (label), attr_list); gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 3); gtk_widget_show (label); + desktop_page-path_entry = gtk_entry_new (); + gtk_widget_set_tooltip_text (desktop_page-path_entry, _(The working directory for the program.)); + g_signal_connect (G_OBJECT (desktop_page-path_entry), activate, G_CALLBACK (thunar_apr_desktop_page_activated), desktop_page); + g_signal_connect (G_OBJECT (desktop_page-path_entry), focus-out-event, G_CALLBACK (thunar_apr_desktop_page_focus_out_event), desktop_page); + gtk_table_attach (GTK_TABLE (table), desktop_page-path_entry, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); + gtk_widget_show (desktop_page-path_entry); + + exo_binding_new (G_OBJECT (desktop_page-path_entry), visible, G_OBJECT (label), visible); + + /* set Atk label relation for the entry */ + object = gtk_widget_get_accessible (desktop_page-path_entry); + relations = atk_object_ref_relation_set (gtk_widget_get_accessible (label)); + relation = atk_relation_new (object, 1, ATK_RELATION_LABEL_FOR); + atk_relation_set_add (relations, relation); + g_object_unref (G_OBJECT (relation)); + + label = gtk_label_new (_(URL:)); + gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); + gtk_label_set_attributes (GTK_LABEL (label), attr_list); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 3); + gtk_widget_show (label); + desktop_page-url_entry = gtk_entry_new (); gtk_widget_set_tooltip_text (desktop_page-url_entry, _(The URL to access.)); g_signal_connect (G_OBJECT (desktop_page-url_entry), activate, G_CALLBACK (thunar_apr_desktop_page_activated), desktop_page); g_signal_connect (G_OBJECT (desktop_page-url_entry), focus-out-event, G_CALLBACK (thunar_apr_desktop_page_focus_out_event), desktop_page); - gtk_table_attach (GTK_TABLE (table), desktop_page-url_entry, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); + gtk_table_attach (GTK_TABLE (table), desktop_page-url_entry, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 3); gtk_widget_show (desktop_page-url_entry); exo_binding_new (G_OBJECT (desktop_page-url_entry), visible, G_OBJECT (label), visible); @@ -217,7 +241,7 @@ thunar_apr_desktop_page_init (ThunarAprDesktopPage *desktop_page) label = gtk_label_new (_(Comment:)); gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f); gtk_label_set_attributes (GTK_LABEL (label), attr_list); - gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 3); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 3); gtk_widget_show (label); desktop_page-comment_entry = gtk_entry_new (); @@ -226,7 +250,7 @@ thunar_apr_desktop_page_init (ThunarAprDesktopPage *desktop_page) description.)); g_signal_connect (G_OBJECT (desktop_page-comment_entry), activate, G_CALLBACK
[Xfce4-commits] thunar:master Use G_KEY_FILE_DESKTOP macros.
Updating branch refs/heads/master to 5f04c77f57bea3786b45b4a0f92430577111adba (commit) from 626b11c4dcf3847ebdf520d7c9c6786a9b0c8126 (commit) commit 5f04c77f57bea3786b45b4a0f92430577111adba Author: Nick Schermer n...@xfce.org Date: Thu Sep 27 21:42:25 2012 +0200 Use G_KEY_FILE_DESKTOP macros. plugins/thunar-apr/thunar-apr-desktop-page.c | 68 ++ 1 files changed, 47 insertions(+), 21 deletions(-) diff --git a/plugins/thunar-apr/thunar-apr-desktop-page.c b/plugins/thunar-apr/thunar-apr-desktop-page.c index 865f559..116f751 100644 --- a/plugins/thunar-apr/thunar-apr-desktop-page.c +++ b/plugins/thunar-apr/thunar-apr-desktop-page.c @@ -347,7 +347,7 @@ thunar_apr_desktop_page_file_changed (ThunarAprAbstractPage *abstract_page, if (filename != NULL g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, NULL)) { /* determine the type of the .desktop file (default to Application) */ - type = g_key_file_get_string (key_file, Desktop Entry, Type, NULL); + type = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, Type, NULL); if (G_UNLIKELY (type == NULL)) type = g_strdup (Application); @@ -360,7 +360,7 @@ thunar_apr_desktop_page_file_changed (ThunarAprAbstractPage *abstract_page, thunarx_property_page_set_label (THUNARX_PROPERTY_PAGE (desktop_page), type); /* update the Description entry */ - value = g_key_file_get_locale_string (key_file, Desktop Entry, GenericName, NULL, NULL); + value = g_key_file_get_locale_string (key_file, G_KEY_FILE_DESKTOP_GROUP, GenericName, NULL, NULL); if (!exo_str_is_equal (value, desktop_page-description_text)) { /* update the entry */ @@ -376,7 +376,7 @@ thunar_apr_desktop_page_file_changed (ThunarAprAbstractPage *abstract_page, } /* update the Comment entry */ - value = g_key_file_get_locale_string (key_file, Desktop Entry, Comment, NULL, NULL); + value = g_key_file_get_locale_string (key_file, G_KEY_FILE_DESKTOP_GROUP, Comment, NULL, NULL); if (!exo_str_is_equal (value, desktop_page-comment_text)) { /* update the entry */ @@ -395,7 +395,7 @@ thunar_apr_desktop_page_file_changed (ThunarAprAbstractPage *abstract_page, if (strcmp (type, Application) == 0) { /* update the Command entry */ - value = g_key_file_get_string (key_file, Desktop Entry, Exec, NULL); + value = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, Exec, NULL); if (!exo_str_is_equal (value, desktop_page-command_text)) { /* update the entry */ @@ -411,7 +411,7 @@ thunar_apr_desktop_page_file_changed (ThunarAprAbstractPage *abstract_page, } /* update the Path entry */ - value = g_key_file_get_string (key_file, Desktop Entry, Path, NULL); + value = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, Path, NULL); if (!exo_str_is_equal (value, desktop_page-path_text)) { /* update the entry */ @@ -427,14 +427,14 @@ thunar_apr_desktop_page_file_changed (ThunarAprAbstractPage *abstract_page, } /* update the Use startup notification button */ - enabled = g_key_file_get_boolean (key_file, Desktop Entry, StartupNotify, error); + enabled = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, StartupNotify, error); g_signal_handlers_block_by_func (G_OBJECT (desktop_page-snotify_button), thunar_apr_desktop_page_toggled, desktop_page); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (desktop_page-snotify_button), (error == NULL enabled)); g_signal_handlers_unblock_by_func (G_OBJECT (desktop_page-snotify_button), thunar_apr_desktop_page_toggled, desktop_page); g_clear_error (error); /* update the Run in terminal button */ - enabled = g_key_file_get_boolean (key_file, Desktop Entry, Terminal, error); + enabled = g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, Terminal, error); g_signal_handlers_block_by_func (G_OBJECT (desktop_page-terminal_button), thunar_apr_desktop_page_toggled, desktop_page); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (desktop_page-terminal_button), (error == NULL enabled)); g_signal_handlers_unblock_by_func (G_OBJECT (desktop_page-terminal_button), thunar_apr_desktop_page_toggled, desktop_page); @@ -450,7 +450,7 @@ thunar_apr_desktop_page_file_changed (ThunarAprAbstractPage *abstract_page, else if (strcmp (type, Link) == 0) { /* update the URL entry */ - value = g_key_file_get_string (key_file, Desktop Entry, URL, NULL); + value = g_key_file_get_string (key_file, G_KEY_FILE_DESKTOP_GROUP, URL, NULL); if (!exo_str_is_equal (value, desktop_page-url_text))
[Xfce4-commits] thunar:master Improve display name creation (bug #8388).
Updating branch refs/heads/master to 99fff9f6aaa3b64547eaf5f2244da310c8ad51bb (commit) from 5f04c77f57bea3786b45b4a0f92430577111adba (commit) commit 99fff9f6aaa3b64547eaf5f2244da310c8ad51bb Author: Nick Schermer n...@xfce.org Date: Thu Sep 27 22:10:07 2012 +0200 Improve display name creation (bug #8388). Better base name creation if the GFileInfo has no name. thunar/thunar-file.c | 38 -- 1 files changed, 24 insertions(+), 14 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 13fa21b..ae1598b 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -707,6 +707,7 @@ thunar_file_load (ThunarFile *file, gchar *p; gchar *thumbnail_dir_path; gchar *uri = NULL; + const gchar *display_name; _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); _thunar_return_val_if_fail (error == NULL || *error == NULL, FALSE); @@ -860,28 +861,37 @@ thunar_file_load (ThunarFile *file, /* determine the display name */ if (file-display_name == NULL) { - if (file-info != NULL) + if (G_LIKELY (file-info != NULL)) { - if (g_strcmp0 (g_file_info_get_display_name (file-info), /) == 0) -file-display_name = g_strdup (_(File System)); - else -file-display_name = g_strdup (g_file_info_get_display_name (file-info)); + display_name = g_file_info_get_display_name (file-info); + if (G_LIKELY (display_name != NULL)) +{ + if (strcmp (display_name, /) == 0) +file-display_name = g_strdup (_(File System)); + else +file-display_name = g_strdup (display_name); +} } - else + + if (file-display_name == NULL) { - if (g_file_is_native (file-gfile)) + base_name = g_file_get_basename (file-gfile); + if (G_LIKELY (base_name != NULL)) { - uri = g_file_get_path (file-gfile); - if (uri == NULL) -uri = thunar_file_dup_uri (file); + if (g_utf8_validate (base_name, -1, NULL)) +{ + file-display_name = base_name; +} + else +{ + file-display_name = g_uri_escape_string (base_name, G_URI_RESERVED_CHARS_ALLOWED_IN_PATH, TRUE); + g_free (base_name); +} } else { - uri = thunar_file_dup_uri (file); + file-display_name = g_strdup (?); } - - file-display_name = g_filename_display_name (uri); - g_free (uri); } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:master Generate thumbnails paths on the fly.
Updating branch refs/heads/master to fa891128e3a3ce06fb2b6c1a227fbbb700cd2b43 (commit) from 99fff9f6aaa3b64547eaf5f2244da310c8ad51bb (commit) commit fa891128e3a3ce06fb2b6c1a227fbbb700cd2b43 Author: Nick Schermer n...@xfce.org Date: Thu Sep 27 22:47:13 2012 +0200 Generate thumbnails paths on the fly. This saves a lot of md5 hash creations, also make the code a bit more efficient. Drop thumbnail::* namespace collection, since we don't use that. thunar/thunar-file.c| 40 +--- thunar/thunar-file.h|2 +- thunarx/thunarx-file-info.h |1 - 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index ae1598b..1c9478e 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -703,10 +703,8 @@ thunar_file_load (ThunarFile *file, GError *err = NULL; GFile *thumbnail_dir; gchar *base_name; - gchar *md5_hash; gchar *p; gchar *thumbnail_dir_path; - gchar *uri = NULL; const gchar *display_name; _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE); @@ -899,18 +897,6 @@ thunar_file_load (ThunarFile *file, file-flags = (file-flags ~THUNAR_FILE_THUMB_STATE_MASK) | THUNAR_FILE_THUMB_STATE_UNKNOWN; - /* determine thumbnail path */ - uri = thunar_file_dup_uri (file); - md5_hash = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1); - base_name = g_strdup_printf (%s.png, md5_hash); - file-thumbnail_path = g_build_filename (xfce_get_homedir (), .thumbnails, - normal, base_name, NULL); - g_free (base_name); - g_free (md5_hash); - g_free (uri); - - /* TODO monitor the thumbnail file for changes */ - if (err != NULL) { g_propagate_error (error, err); @@ -2791,9 +2777,33 @@ thunar_file_is_desktop (const ThunarFile *file) const gchar * -thunar_file_get_thumbnail_path (const ThunarFile *file) +thunar_file_get_thumbnail_path (ThunarFile *file) { + GChecksum *checksum; + gchar *basename; + gchar *uri; + _thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL); + + if (G_UNLIKELY (file-thumbnail_path == NULL)) +{ + checksum = g_checksum_new (G_CHECKSUM_MD5); + if (G_LIKELY (checksum != NULL)) +{ + uri = thunar_file_dup_uri (file); + g_checksum_update (checksum, (const guchar *) uri, strlen (uri)); + g_free (uri); + + basename = g_strconcat (g_checksum_get_string (checksum), .png, NULL); + g_checksum_free (checksum); + + file-thumbnail_path = g_build_filename (xfce_get_homedir (), .thumbnails, + normal, basename, NULL); + + g_free (basename); +} +} + return file-thumbnail_path; } diff --git a/thunar/thunar-file.h b/thunar/thunar-file.h index 70e9df8..289e518 100644 --- a/thunar/thunar-file.h +++ b/thunar/thunar-file.h @@ -222,7 +222,7 @@ gboolean thunar_file_set_custom_icon (ThunarFile *fil const gchar *custom_icon, GError **error); -const gchar *thunar_file_get_thumbnail_path(const ThunarFile *file); +const gchar *thunar_file_get_thumbnail_path(ThunarFile *file); gboolean thunar_file_is_thumbnail (const ThunarFile *file); void thunar_file_set_thumb_state (ThunarFile *file, ThunarFileThumbState state); diff --git a/thunarx/thunarx-file-info.h b/thunarx/thunarx-file-info.h index 0e78600..c8e305f 100644 --- a/thunarx/thunarx-file-info.h +++ b/thunarx/thunarx-file-info.h @@ -43,7 +43,6 @@ G_BEGIN_DECLS; preview::*, \ standard::*, \ time::*, \ - thumbnail::*, \ trash::*, \ unix::*, \ metadata::emblems ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits