[Xfce4-commits] xfce4-embed-plugin:master Make the socket area right-clickable and paintable.

2012-09-21 Thread David Schneider
Updating branch refs/heads/master
 to 6d1fbee7879bd8cf4a68ee3c3f1cdaece031a4af (commit)
   from 92a6e2744225e7bdd13120f3ac04ebd78e0a5d29 (commit)

commit 6d1fbee7879bd8cf4a68ee3c3f1cdaece031a4af
Author: David Schneider dnschn...@gmail.com
Date:   Thu Sep 20 22:49:19 2012 -0700

Make the socket area right-clickable and paintable.

 panel-plugin/embed.c |   28 +++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/embed.c b/panel-plugin/embed.c
index 9370b6a..f37fa7a 100644
--- a/panel-plugin/embed.c
+++ b/panel-plugin/embed.c
@@ -831,6 +831,28 @@ embed_size_allocate (GtkSocket *socket, GdkRectangle 
*allocation,
 
 
 
+/* Callback for when the gtksocket is realized.
+ * Set the window settings and then start a search.
+ */
+static void
+embed_socket_realize (GtkWidget *socket, EmbedPlugin *embed)
+{
+  /* Ensure the socket gets expose and mouse button events.
+   * It needs EXPOSURE_MASK so that it properly gets repainted.
+   * It needs press/release so that the plugin menu can appear.
+   */
+  GdkWindow *socketwindow = gtk_widget_get_window (socket);
+  g_assert (socketwindow);
+  gdk_window_set_events (socketwindow, gdk_window_get_events (socketwindow)
+   | GDK_EXPOSURE_MASK
+   | GDK_BUTTON_PRESS_MASK
+   | GDK_BUTTON_RELEASE_MASK);
+  /* Start searching. */
+  embed_start_search (socket, embed);
+}
+
+
+
 /* Adds a GtkSocket to the plugin and hooks up the signals, optionally updating
  * the size of the plugin to match. Generally update_size should be true unless
  * the plugin is being initialized.
@@ -851,7 +873,9 @@ embed_add_socket (EmbedPlugin *embed, gboolean update_size)
   g_signal_connect (G_OBJECT (embed-socket), plug-removed,
 G_CALLBACK (embed_plug_removed), embed);
   g_signal_connect (G_OBJECT (embed-socket), realize,
-G_CALLBACK (embed_start_search), embed);
+G_CALLBACK (embed_socket_realize), embed);
+
+  xfce_panel_plugin_add_action_widget (embed-plugin, embed-socket);
 
   /* Add it to the plugin hvbox */
   gtk_widget_show (embed-socket);
@@ -880,6 +904,8 @@ embed_add_fake_socket (EmbedPlugin *embed)
   g_signal_connect (G_OBJECT (embed-socket), size-allocate,
 G_CALLBACK (embed_size_allocate), embed);
 
+  xfce_panel_plugin_add_action_widget (embed-plugin, embed-socket);
+
   /* Add it to the plugin hvbox */
   gtk_widget_show (embed-socket);
   gtk_box_pack_start (GTK_BOX (embed-hvbox), embed-socket, TRUE, TRUE, 0);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-embed-plugin:master Use the plug window's expose_event handler to color our socket.

2012-09-21 Thread David Schneider
Updating branch refs/heads/master
 to 796a028bd16c8ce17fbe423a74fda1d633b7f67b (commit)
   from 6d1fbee7879bd8cf4a68ee3c3f1cdaece031a4af (commit)

commit 796a028bd16c8ce17fbe423a74fda1d633b7f67b
Author: David Schneider dnschn...@gmail.com
Date:   Thu Sep 20 23:48:28 2012 -0700

Use the plug window's expose_event handler to color our socket.

 panel-plugin/embed.c |   23 +++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/embed.c b/panel-plugin/embed.c
index f37fa7a..e719c90 100644
--- a/panel-plugin/embed.c
+++ b/panel-plugin/embed.c
@@ -831,6 +831,23 @@ embed_size_allocate (GtkSocket *socket, GdkRectangle 
*allocation,
 
 
 
+/* Callback used when the socket (or fake socket) needs to be painted.
+ * HACK: Let the parent plugin wrapper do the heavy lifting by convincing it to
+ * draw on our window for us.
+ */
+static gint
+embed_expose (GtkWidget *widget, GdkEvent *event, EmbedPlugin *embed)
+{
+  GtkWidget *plugwidget = gtk_widget_get_parent (GTK_WIDGET (embed-plugin));
+  GdkWindow *plugwindow = plugwidget-window;
+  plugwidget-window = widget-window;
+  gtk_widget_send_expose (plugwidget, event);
+  plugwidget-window = plugwindow;
+  return TRUE;
+}
+
+
+
 /* Callback for when the gtksocket is realized.
  * Set the window settings and then start a search.
  */
@@ -874,8 +891,11 @@ embed_add_socket (EmbedPlugin *embed, gboolean update_size)
 G_CALLBACK (embed_plug_removed), embed);
   g_signal_connect (G_OBJECT (embed-socket), realize,
 G_CALLBACK (embed_socket_realize), embed);
+  g_signal_connect (G_OBJECT (embed-socket), expose-event,
+G_CALLBACK (embed_expose), embed);
 
   xfce_panel_plugin_add_action_widget (embed-plugin, embed-socket);
+  gtk_widget_set_app_paintable (embed-socket, TRUE);
 
   /* Add it to the plugin hvbox */
   gtk_widget_show (embed-socket);
@@ -903,8 +923,11 @@ embed_add_fake_socket (EmbedPlugin *embed)
   /* We use the size-allocate signal to keep the size of the plug up-to-date. 
*/
   g_signal_connect (G_OBJECT (embed-socket), size-allocate,
 G_CALLBACK (embed_size_allocate), embed);
+  g_signal_connect (G_OBJECT (embed-socket), expose-event,
+G_CALLBACK (embed_expose), embed);
 
   xfce_panel_plugin_add_action_widget (embed-plugin, embed-socket);
+  gtk_widget_set_app_paintable (embed-socket, TRUE);
 
   /* Add it to the plugin hvbox */
   gtk_widget_show (embed-socket);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master l10n: Updated Uyghur (ug) translation to 97%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to ae6a501348db2c9dd7bc20ab70cc3a3d72ad8a43 (commit)
   from dc842c370634d081f8f155479c39ddfa9ec0e17a (commit)

commit ae6a501348db2c9dd7bc20ab70cc3a3d72ad8a43
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Fri Sep 21 09:34:41 2012 +0200

l10n: Updated Uyghur (ug) translation to 97%

New status: 604 messages complete with 0 fuzzies and 18 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ug.po |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/po/ug.po b/po/ug.po
index f70e552..9d16d05 100644
--- a/po/ug.po
+++ b/po/ug.po
@@ -2385,7 +2385,7 @@ msgstr 
 
 #: ../extensions/external-download-manager.vala:172
 msgid External Download Manager - Aria2
-msgstr 
+msgstr سىرتقى چۈشۈرگۈچ - Aria2
 
 #: ../extensions/external-download-manager.vala:173
 msgid Download files with Aria2
@@ -2393,24 +2393,24 @@ msgstr ھۆججەتلەرنى Aria2 دە چۈشۈرسۇن
 
 #: ../extensions/external-download-manager.vala:199
 msgid External Download Manager - SteadyFlow
-msgstr 
+msgstr سىرتقى چۈشۈرگۈچ - SteadyFlow
 
 #: ../extensions/external-download-manager.vala:200
 msgid Download files with SteadyFlow
-msgstr 
+msgstr ھۆججەتلەرنى SteadyFlow دە چۈشۈرسۇن
 
 #: ../extensions/external-download-manager.vala:245
 msgid Command:
-msgstr 
+msgstr بۇيرۇق:
 
 #: ../extensions/external-download-manager.vala:306
 #, c-format
 msgid Download files with \%s\ or a custom command
-msgstr 
+msgstr ھۆججەتلەرنى «%s» دا ياكى ئىختىيارى بىر چۈشۈرگۈچتە چۈشۈرسۇن
 
 #: ../extensions/external-download-manager.vala:314
 msgid External Download Manager - CommandLine
-msgstr 
+msgstr سىرتقى چۈشۈرگۈچ - CommandLine
 
 #: ../extensions/feed-panel/feed-atom.c:209
 msgid Failed to find required Atom \entry\ elements in XML data.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master l10n: Updated Uyghur (ug) translation to 97%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to 35856b56391db43b5af0beb071da6b6f2741201e (commit)
   from ae6a501348db2c9dd7bc20ab70cc3a3d72ad8a43 (commit)

commit 35856b56391db43b5af0beb071da6b6f2741201e
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Fri Sep 21 09:36:51 2012 +0200

l10n: Updated Uyghur (ug) translation to 97%

New status: 606 messages complete with 0 fuzzies and 16 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ug.po |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/po/ug.po b/po/ug.po
index 9d16d05..1df4698 100644
--- a/po/ug.po
+++ b/po/ug.po
@@ -2367,7 +2367,7 @@ msgstr بارلىق بەتكۈچنىڭ ئادرېسىنى چاپلاش تاخت
 #: ../extensions/delayed-load.vala:24 ../extensions/delayed-load.vala:211
 #, c-format
 msgid Delayed load
-msgstr 
+msgstr كېچىكتۈرۈپ ئوقۇش
 
 #: ../extensions/delayed-load.vala:49
 msgid Delay in seconds until loading the page:
@@ -2381,7 +2381,7 @@ msgstr 
 msgid 
 An error occurred when attempting to download a file with the following 
 plugin:\n
-msgstr 
+msgstr ھۆججەتنى تۆۋەندىكى قىستۇرمىدا چۈشۈرۈۋاتقاندا خاتالىق كۆرۈلدى:\n
 
 #: ../extensions/external-download-manager.vala:172
 msgid External Download Manager - Aria2
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master l10n: Updated Uyghur (ug) translation to 97%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to bb79291d48e2c373b4027cbb5db19e8c2e893208 (commit)
   from 35856b56391db43b5af0beb071da6b6f2741201e (commit)

commit bb79291d48e2c373b4027cbb5db19e8c2e893208
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Fri Sep 21 09:38:20 2012 +0200

l10n: Updated Uyghur (ug) translation to 97%

New status: 609 messages complete with 0 fuzzies and 13 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ug.po |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/po/ug.po b/po/ug.po
index 1df4698..9d06c6a 100644
--- a/po/ug.po
+++ b/po/ug.po
@@ -246,7 +246,7 @@ msgstr شەخسىي كۆرۈش، ئۆزگىرىشلەر ساقلانمىدى
 
 #: ../midori/main.c:1846
 msgid Portable mode, all runtime files are stored in one place
-msgstr 
+msgstr قۇلاي ھالەت، بارلىق ئىجرا بولىدىغان پروگراممىلار بىر يەرگە ساقلىنىدۇ
 
 #: ../midori/main.c:1849
 msgid Plain GTK+ window with WebKit, akin to GtkLauncher
@@ -2124,11 +2124,11 @@ msgstr %s نى تەڭشىكى
 
 #: ../katze/midori-uri.vala:168
 msgid MD5-Checksum:
-msgstr 
+msgstr MD5-Checksum:
 
 #: ../katze/midori-uri.vala:175
 msgid SHA1-Checksum:
-msgstr 
+msgstr SHA1-Checksum:
 
 #: ../extensions/adblock.c:495
 msgid Configure Advertisement filters
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] thunar:master l10n: Updated Uyghur (ug) translation to 98%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to 19aea038c79d988528eb7c6169f97a2c10c2e078 (commit)
   from 8bad097939248431f7ba7142755629788d3a62d8 (commit)

commit 19aea038c79d988528eb7c6169f97a2c10c2e078
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Fri Sep 21 09:41:29 2012 +0200

l10n: Updated Uyghur (ug) translation to 98%

New status: 680 messages complete with 6 fuzzies and 4 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ug.po |  267 +-
 1 files changed, 143 insertions(+), 124 deletions(-)

diff --git a/po/ug.po b/po/ug.po
index a9732f1..8ab4223 100644
--- a/po/ug.po
+++ b/po/ug.po
@@ -7,7 +7,7 @@ msgid 
 msgstr 
 Project-Id-Version: Thunar\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-09-17 23:00+\n
+POT-Creation-Date: 2012-09-21 07:15+\n
 PO-Revision-Date: 2011-11-09 16:10+0900\n
 Last-Translator: Gheyret Kenji ghey...@gmail.com\n
 Language-Team: Uyghur Computer Science Association u...@yahoogroups.com\n
@@ -77,55 +77,55 @@ msgstr ئىجادىيەتچى: Benedikt Meurer be...@xfce.org
 msgid Please report bugs to %s.
 msgstr كەمتۈكنى %s غا دوكلات قىلىڭ.
 
-#: ../thunar/thunar-abstract-icon-view.c:115
+#: ../thunar/thunar-abstract-icon-view.c:116
 msgid Arran_ge Items
 msgstr تۈرلەرنى ئورۇنلاشتۇر(_G)
 
-#: ../thunar/thunar-abstract-icon-view.c:120
+#: ../thunar/thunar-abstract-icon-view.c:121
 msgid Sort By _Name
 msgstr ئاتى بويىچە تەرتىپلە(_N)
 
-#: ../thunar/thunar-abstract-icon-view.c:120
+#: ../thunar/thunar-abstract-icon-view.c:121
 msgid Keep items sorted by their name
 msgstr تۈرلەرنى ئاتى بويىچە تەرتىپلەيدۇ
 
-#: ../thunar/thunar-abstract-icon-view.c:121
+#: ../thunar/thunar-abstract-icon-view.c:122
 msgid Sort By _Size
 msgstr چوڭلۇقى بويىچە تەرتىپلە(_S)
 
-#: ../thunar/thunar-abstract-icon-view.c:121
+#: ../thunar/thunar-abstract-icon-view.c:122
 msgid Keep items sorted by their size
 msgstr تۈرلەرنى چوڭلۇقى بويىچە تەرتىپلەيدۇ
 
-#: ../thunar/thunar-abstract-icon-view.c:122
+#: ../thunar/thunar-abstract-icon-view.c:123
 msgid Sort By _Type
 msgstr تىپى بويىچە تەرتىپلە(_T)
 
-#: ../thunar/thunar-abstract-icon-view.c:122
+#: ../thunar/thunar-abstract-icon-view.c:123
 msgid Keep items sorted by their type
 msgstr تۈرلەرنى تىپى بويىچە تەرتىپلەيدۇ
 
-#: ../thunar/thunar-abstract-icon-view.c:123
+#: ../thunar/thunar-abstract-icon-view.c:124
 msgid Sort By Modification _Date
 msgstr ئۆزگەرتىلگەن ۋاقتى بويىچە تەرتىپلە(_D)
 
-#: ../thunar/thunar-abstract-icon-view.c:123
+#: ../thunar/thunar-abstract-icon-view.c:124
 msgid Keep items sorted by their modification date
 msgstr تۈرلەرنى ئۆزگەرتىلگەن ۋاقتى بويىچە تەرتىپلەيدۇ
 
-#: ../thunar/thunar-abstract-icon-view.c:128
+#: ../thunar/thunar-abstract-icon-view.c:129
 msgid _Ascending
 msgstr كىچىكتىن چوڭغا(_A)
 
-#: ../thunar/thunar-abstract-icon-view.c:128
+#: ../thunar/thunar-abstract-icon-view.c:129
 msgid Sort items in ascending order
 msgstr تۈرلەرنى كىچىكتىن چوڭغا قاراپ تەرتىپلەيدۇ
 
-#: ../thunar/thunar-abstract-icon-view.c:129
+#: ../thunar/thunar-abstract-icon-view.c:130
 msgid _Descending
 msgstr چوڭدىن كىچىككە (_D)
 
-#: ../thunar/thunar-abstract-icon-view.c:129
+#: ../thunar/thunar-abstract-icon-view.c:130
 msgid Sort items in descending order
 msgstr تۈرلەرنى چوڭدىن كىچىككە  قاراپ تەرتىپلەيدۇ
 
@@ -150,21 +150,21 @@ msgstr «%s» نى ئېچىش مەغلۇپ بولدى: %s
 
 #. display an error message
 #: ../thunar/thunar-application.c:1293
-#: ../thunar/thunar-properties-dialog.c:678
-#: ../thunar/thunar-standard-view.c:2255 ../thunar/thunar-tree-view.c:1672
+#: ../thunar/thunar-properties-dialog.c:680
+#: ../thunar/thunar-standard-view.c:2277 ../thunar/thunar-tree-view.c:1672
 #, c-format
 msgid Failed to rename \%s\
 msgstr «%s» نىڭ ئاتىنى ئۆزگەرتىش مەغلۇپ بولدى
 
 #: ../thunar/thunar-application.c:1395
 #: ../thunar/thunar-location-buttons.c:1285
-#: ../thunar/thunar-standard-view.c:1880 ../thunar/thunar-tree-view.c:1569
+#: ../thunar/thunar-standard-view.c:1886 ../thunar/thunar-tree-view.c:1569
 msgid New Folder
 msgstr يېڭى مۇندەرىجە
 
 #: ../thunar/thunar-application.c:1396
 #: ../thunar/thunar-location-buttons.c:1286
-#: ../thunar/thunar-standard-view.c:1881 ../thunar/thunar-tree-view.c:1570
+#: ../thunar/thunar-standard-view.c:1887 ../thunar/thunar-tree-view.c:1570
 msgid Create New Folder
 msgstr يېڭى مۇندەرىجە قۇر
 
@@ -177,7 +177,7 @@ msgid Create New File
 msgstr يېڭى ھۆججەت قۇرۇش
 
 #. generate a title for the create dialog
-#: ../thunar/thunar-application.c:1459 ../thunar/thunar-standard-view.c:1926
+#: ../thunar/thunar-application.c:1459 ../thunar/thunar-standard-view.c:1932
 #, c-format
 msgid Create Document from template \%s\
 msgstr قېلىپ «%s» غا ئاساسەن پۈتۈك قۇر
@@ -584,19 +584,19 @@ msgstr نىشان مۇندەرىجە چوقۇم بېكىتىلىشى كېرەك
 msgid At least one filename must be specified
 msgstr ئاڭ ئاز دېگەندە بىر دانە ھۆججەت بېكىتىلىشى كېرەك
 
-#: ../thunar/thunar-details-view.c:129
+#: ../thunar/thunar-details-view.c:130
 msgid 

[Xfce4-commits] thunar:master l10n: Updated Uyghur (ug) translation to 99%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to e49930178456ff7e6f75880d88609909397af923 (commit)
   from 19aea038c79d988528eb7c6169f97a2c10c2e078 (commit)

commit e49930178456ff7e6f75880d88609909397af923
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Fri Sep 21 09:43:19 2012 +0200

l10n: Updated Uyghur (ug) translation to 99%

New status: 685 messages complete with 2 fuzzies and 3 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ug.po |   14 +-
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/po/ug.po b/po/ug.po
index 8ab4223..a7fda08 100644
--- a/po/ug.po
+++ b/po/ug.po
@@ -1293,23 +1293,20 @@ msgid Owner:
 msgstr ئىگىسى:
 
 #: ../thunar/thunar-permissions-chooser.c:235
-#, fuzzy
 msgid _Access:
-msgstr زىيارەت:
+msgstr زىيارەت(_A):
 
 #: ../thunar/thunar-permissions-chooser.c:259
 msgid Gro_up:
-msgstr 
+msgstr گۇرۇپپا(_U):
 
 #: ../thunar/thunar-permissions-chooser.c:278
-#, fuzzy
 msgid Acce_ss:
-msgstr زىيارەت:
+msgstr زىيارەت(_S):
 
 #: ../thunar/thunar-permissions-chooser.c:302
-#, fuzzy
 msgid O_thers:
-msgstr باشقىلار:
+msgstr باشقىلار(_T):
 
 #: ../thunar/thunar-permissions-chooser.c:326
 msgid Program:
@@ -1750,9 +1747,8 @@ msgid Kind:
 msgstr تىپى:
 
 #: ../thunar/thunar-properties-dialog.c:341
-#, fuzzy
 msgid _Open With:
-msgstr بۇنىڭدا ئاچ:
+msgstr بۇنىڭدا ئاچ(_O):
 
 #: ../thunar/thunar-properties-dialog.c:355
 msgid Link Target:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] thunar:master l10n: Updated Uyghur (ug) translation to 99%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to 327078054248e9fcc181d9d9d74b32ab9398391e (commit)
   from e49930178456ff7e6f75880d88609909397af923 (commit)

commit 327078054248e9fcc181d9d9d74b32ab9398391e
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Fri Sep 21 09:46:54 2012 +0200

l10n: Updated Uyghur (ug) translation to 99%

New status: 689 messages complete with 0 fuzzies and 1 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/ug.po |   10 --
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/po/ug.po b/po/ug.po
index a7fda08..2130893 100644
--- a/po/ug.po
+++ b/po/ug.po
@@ -1333,9 +1333,8 @@ msgstr 
 مۇندەرىجە ئىچىدىكى ھۆججەتلەرنى ئىشلەتكىلى بولماسلىقى مۇمكىن.
 
 #: ../thunar/thunar-permissions-chooser.c:380
-#, fuzzy
 msgid Correct _folder permissions...
-msgstr مۇندەرىجىنىڭ ھوقۇقلىرىنى تۈزىتىش...
+msgstr مۇندەرىجە ئىمتىيازلىرىنى تۈزەت(_F)...
 
 #: ../thunar/thunar-permissions-chooser.c:381
 msgid Click here to automatically fix the folder permissions.
@@ -1414,9 +1413,8 @@ msgid Correct folder permissions automatically?
 msgstr مۇندەرىجە ھوقۇقلىرىنى ئاپتوماتىك تۈزەتسۇنمۇ؟
 
 #: ../thunar/thunar-permissions-chooser.c:1130
-#, fuzzy
 msgid Correct _folder permissions
-msgstr مۇندەرىجە ھوقۇقلىرىنى تۈزىتىدۇ
+msgstr مۇندەرىجە ئىمتىيازلىرىنى تۈزەت(_F)
 
 #: ../thunar/thunar-permissions-chooser.c:1132
 msgid 
@@ -2123,11 +2121,11 @@ msgstr بەلگىلىك ئەندىزىگە چۈشىدىغان بارلىق ھۆ
 
 #: ../thunar/thunar-standard-view.c:372
 msgid _Invert Selection
-msgstr 
+msgstr تەتۈر تاللا(_I)
 
 #: ../thunar/thunar-standard-view.c:372
 msgid Select all and only the items that are not currently selected
-msgstr 
+msgstr ھەممىنى ۋە نۆۋەتتە تاللانمىغان تۈرلەرنىلا تاللايدۇ
 
 #: ../thunar/thunar-standard-view.c:373
 msgid Du_plicate
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-embed-plugin:master Fix GtkSocket functionality that was broken in commit 6d1f

2012-09-21 Thread David Schneider
Updating branch refs/heads/master
 to e3083d3c6e5277629ee31edf7481b8c035965226 (commit)
   from 796a028bd16c8ce17fbe423a74fda1d633b7f67b (commit)

commit e3083d3c6e5277629ee31edf7481b8c035965226
Author: David Schneider dnschn...@gmail.com
Date:   Fri Sep 21 01:21:34 2012 -0700

Fix GtkSocket functionality that was broken in commit 6d1f

 panel-plugin/embed.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/embed.c b/panel-plugin/embed.c
index e719c90..063ff41 100644
--- a/panel-plugin/embed.c
+++ b/panel-plugin/embed.c
@@ -857,13 +857,15 @@ embed_socket_realize (GtkWidget *socket, EmbedPlugin 
*embed)
   /* Ensure the socket gets expose and mouse button events.
* It needs EXPOSURE_MASK so that it properly gets repainted.
* It needs press/release so that the plugin menu can appear.
+   * It needs GDK_SUBSTRUCTURE_MASK, because otherwise GtkSocket breaks.
*/
   GdkWindow *socketwindow = gtk_widget_get_window (socket);
   g_assert (socketwindow);
   gdk_window_set_events (socketwindow, gdk_window_get_events (socketwindow)
| GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK
-   | GDK_BUTTON_RELEASE_MASK);
+   | GDK_BUTTON_RELEASE_MASK
+   | GDK_SUBSTRUCTURE_MASK);
   /* Start searching. */
   embed_start_search (socket, embed);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-embed-plugin:master Handle clicks on the fake socket as well.

2012-09-21 Thread David Schneider
Updating branch refs/heads/master
 to b1d75545051c6c567a8736a8fa2d4e3e6b030c91 (commit)
   from e3083d3c6e5277629ee31edf7481b8c035965226 (commit)

commit b1d75545051c6c567a8736a8fa2d4e3e6b030c91
Author: David Schneider dnschn...@gmail.com
Date:   Fri Sep 21 01:28:44 2012 -0700

Handle clicks on the fake socket as well.

 panel-plugin/embed.c |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/embed.c b/panel-plugin/embed.c
index 063ff41..34fdef6 100644
--- a/panel-plugin/embed.c
+++ b/panel-plugin/embed.c
@@ -849,7 +849,7 @@ embed_expose (GtkWidget *widget, GdkEvent *event, 
EmbedPlugin *embed)
 
 
 /* Callback for when the gtksocket is realized.
- * Set the window settings and then start a search.
+ * Set the window settings.
  */
 static void
 embed_socket_realize (GtkWidget *socket, EmbedPlugin *embed)
@@ -866,8 +866,6 @@ embed_socket_realize (GtkWidget *socket, EmbedPlugin *embed)
| GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
| GDK_SUBSTRUCTURE_MASK);
-  /* Start searching. */
-  embed_start_search (socket, embed);
 }
 
 
@@ -895,6 +893,8 @@ embed_add_socket (EmbedPlugin *embed, gboolean update_size)
 G_CALLBACK (embed_socket_realize), embed);
   g_signal_connect (G_OBJECT (embed-socket), expose-event,
 G_CALLBACK (embed_expose), embed);
+  g_signal_connect_after (G_OBJECT (embed-socket), realize,
+  G_CALLBACK (embed_start_search), embed);
 
   xfce_panel_plugin_add_action_widget (embed-plugin, embed-socket);
   gtk_widget_set_app_paintable (embed-socket, TRUE);
@@ -925,6 +925,8 @@ embed_add_fake_socket (EmbedPlugin *embed)
   /* We use the size-allocate signal to keep the size of the plug up-to-date. 
*/
   g_signal_connect (G_OBJECT (embed-socket), size-allocate,
 G_CALLBACK (embed_size_allocate), embed);
+  g_signal_connect (G_OBJECT (embed-socket), realize,
+G_CALLBACK (embed_socket_realize), embed);
   g_signal_connect (G_OBJECT (embed-socket), expose-event,
 G_CALLBACK (embed_expose), embed);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] midori:master l10n: Updated Czech (cs) translation to 100%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to 4057a00983f7db20749a276dba1afd477ab3f16b (commit)
   from bb79291d48e2c373b4027cbb5db19e8c2e893208 (commit)

commit 4057a00983f7db20749a276dba1afd477ab3f16b
Author: David Štancl dsta...@dstancl.cz
Date:   Fri Sep 21 13:13:50 2012 +0200

l10n: Updated Czech (cs) translation to 100%

New status: 622 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/cs.po |  411 ++---
 1 files changed, 229 insertions(+), 182 deletions(-)

diff --git a/po/cs.po b/po/cs.po
index 8387ae4..9c87d21 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -8,7 +8,7 @@ msgid 
 msgstr 
 Project-Id-Version: midori 0.2.0\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-09-17 06:15+\n
+POT-Creation-Date: 2012-09-21 06:33+\n
 PO-Revision-Date: 2012-02-24 01:20+0100\n
 Last-Translator: Michal Várady miko.v...@gmail.com\n
 Language-Team: Czech  \n
@@ -28,8 +28,8 @@ msgstr Prohlížet internet
 msgid Internet;WWW;Explorer
 msgstr Internet;WWW;Explorer
 
-#: ../data/midori.desktop.in.h:3 ../midori/main.c:1922 ../midori/main.c:1946
-#: ../midori/main.c:1960 ../midori/midori-websettings.c:200
+#: ../data/midori.desktop.in.h:3 ../midori/main.c:1922 ../midori/main.c:1937
+#: ../midori/main.c:1950 ../midori/midori-websettings.c:200
 msgid Midori
 msgstr Midori
 
@@ -61,87 +61,87 @@ msgstr Midori - soukromé prohlížení
 msgid Open a new private browsing window
 msgstr Nové okno soukromého prohlížení
 
-#: ../data/midori-private.desktop.in.h:3 ../midori/midori-view.c:4355
+#: ../data/midori-private.desktop.in.h:3 ../midori/midori-view.c:4310
 msgid Private Browsing
 msgstr Soukromé prohlížení
 
-#: ../midori/main.c:91 ../midori/main.c:97
+#: ../midori/main.c:84 ../midori/main.c:90
 #, c-format
 msgid The configuration couldn't be loaded: %s\n
 msgstr Konfiguraci nelze načíst: %s\n
 
-#: ../midori/main.c:145
+#: ../midori/main.c:138
 #, c-format
 msgid Value '%s' is invalid for %s
 msgstr Hodnota '%s' je pro %s neplatná
 
-#: ../midori/main.c:150 ../midori/main.c:254
+#: ../midori/main.c:143 ../midori/main.c:247
 #, c-format
 msgid Invalid configuration value '%s'
 msgstr Neplatná hodnota '%s' konfigurace
 
-#: ../midori/main.c:365
+#: ../midori/main.c:357
 #, c-format
 msgid The search engines couldn't be loaded. %s\n
 msgstr Vyhledávací nástroje nelze načíst.%s\n
 
-#: ../midori/main.c:419
+#: ../midori/main.c:411
 #, c-format
 msgid Failed to clear history: %s\n
 msgstr Nepodařilo se smazat historii: %s\n
 
-#: ../midori/main.c:441 ../extensions/formhistory/formhistory.c:531
+#: ../midori/main.c:433 ../extensions/formhistory/formhistory.c:531
 #, c-format
 msgid Failed to open database: %s\n
 msgstr Nepodařilo se otevřít databázi: %s\n
 
 #. i18n: Couldn't remove items that are older than n days
-#: ../midori/main.c:513
+#: ../midori/main.c:505
 #, c-format
 msgid Failed to remove old history items: %s\n
 msgstr Nepodařilo se odstranit staré položky historie: %s\n
 
-#: ../midori/main.c:535
+#: ../midori/main.c:527
 #, c-format
 msgid The configuration couldn't be saved. %s
 msgstr Konfiguraci nelze uložit. %s
 
-#: ../midori/main.c:561
+#: ../midori/main.c:553
 #, c-format
 msgid The search engines couldn't be saved. %s
 msgstr Vyhledávací nástroj nelze uložit. %s
 
 #. i18n: Trash, or wastebin, containing closed tabs
-#: ../midori/main.c:598
+#: ../midori/main.c:590
 #, c-format
 msgid The trash couldn't be saved. %s
 msgstr Seznam zavřených karet nelze uložit. %s
 
-#: ../midori/main.c:671 ../panels/midori-extensions.c:90
+#: ../midori/main.c:663 ../panels/midori-extensions.c:90
 msgid Extensions
 msgstr Rozšíření
 
-#: ../midori/main.c:685
+#: ../midori/main.c:677
 msgid Privacy
 msgstr Soukromí
 
-#: ../midori/main.c:687
+#: ../midori/main.c:679
 msgid Delete old Cookies after:
 msgstr Smazat stará cookies po:
 
-#: ../midori/main.c:689 ../midori/main.c:692
+#: ../midori/main.c:681 ../midori/main.c:684
 msgid The maximum number of days to save cookies for
 msgstr Maximální počet dní, po které jsou cookies platná.
 
-#: ../midori/main.c:696
+#: ../midori/main.c:688
 msgid Only accept Cookies from sites you visit
 msgstr Přijímat cookies pouze z navštívených stránek
 
-#: ../midori/main.c:697
+#: ../midori/main.c:689
 msgid Block cookies sent by third-party websites
 msgstr Blokovat cookies z jiných stránek
 
-#: ../midori/main.c:702
+#: ../midori/main.c:694
 msgid 
 Cookies store login data, saved games, or user profiles for advertisement 
 purposes.
@@ -149,47 +149,47 @@ msgstr 
 V cookies se ukládají přihlašovací údaje, stavy her nebo uživatelská data 
 pro reklamní účely.
 
-#: ../midori/main.c:709
+#: ../midori/main.c:701
 msgid Enable offline web application cache
 msgstr Povolit mezipaměť pro offline aplikace
 
-#: ../midori/main.c:712
+#: ../midori/main.c:704
 msgid Enable HTML5 local storage support
 msgstr Povolit místní úložiště pro HTML5
 
 #. i18n: 

[Xfce4-commits] xfce4-mixer:gber/improvements Creating branch gber/improvements

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 as new branch
 to 55c363bff10c6c19213ca11d3738348d8848e9e8 (commit)

Branches are created implicitly by pushing. This mail only exists to 
let you know that there was code pushed to 

  refs/heads/gber/improvements

for the first time. Mails for the commits that lead to the creation 
of the branch will follow after this mail.
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mixer:gber/improvements Handle a negative minimal volume correctly

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 626dbba8864ab23ef406259cfd750f54cfabf391 (commit)
   from c0c6816a9d37f3915ec421e4fab0e58edf5847d7 (commit)

commit 626dbba8864ab23ef406259cfd750f54cfabf391
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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:gber/improvements Fix a potential NULL pointer dereference

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7 (commit)
   from 626dbba8864ab23ef406259cfd750f54cfabf391 (commit)

commit cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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:gber/improvements Do not try to destroy the mixer window twice after a delete-event (bug #8288)

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 2df866c1df3f06834884533dac33f6eb2d966d3d (commit)
   from cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7 (commit)

commit 2df866c1df3f06834884533dac33f6eb2d966d3d
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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:gber/improvements Modernize build system and build panel plugin as a module

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 294b8fcd8e786ae870cd20b9f28daf19fd70c735 (commit)
   from 2df866c1df3f06834884533dac33f6eb2d966d3d (commit)

commit 294b8fcd8e786ae870cd20b9f28daf19fd70c735
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 2012 +0200

Modernize build system and build panel plugin as a module

Modernize configure.in.in.
Build the plugin as a module.
Remove unnecessary trickery with desktop file substitutions.

--HG--
rename : panel-plugin/xfce4-mixer-plugin.desktop.in.in = 
panel-plugin/mixer.desktop.in
rename : xfce4-mixer/xfce4-mixer.desktop.in.in = 
xfce4-mixer/xfce4-mixer.desktop.in

 AUTHORS|1 +
 NEWS   |1 +
 autogen.sh |   30 +-
 configure.in.in|   18 
 panel-plugin/Makefile.am   |   42 
 ...mixer-plugin.desktop.in.in = mixer.desktop.in} |3 +-
 panel-plugin/xfce-mixer-plugin.c   |2 +-
 xfce4-mixer/Makefile.am|   19 +---
 ...-mixer.desktop.in.in = xfce4-mixer.desktop.in} |0
 9 files changed, 62 insertions(+), 54 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/NEWS b/NEWS
index 7bdbf49..6d0998c 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
 - Fix a potential NULL pointer dereference.
 - Do not try to destroy the mixer window twice after a delete-event
   (bug #8288).
+- Modernize build system and build panel plugin as a module.
 
 
 4.8.0
diff --git a/autogen.sh b/autogen.sh
index 2c644e9..ae2cb53 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,6 +3,7 @@
 # vi:set et ai sw=2 sts=2 ts=2: */
 #-
 # Copyright (c) 2009 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
@@ -19,7 +20,32 @@
 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-(type xdt-autogen) /dev/null 21 || {
+# finds the given command in $PATH
+findpath () {
+if [ $# -ne 1 ] || [ -z $1 ]; then
+return 1
+fi
+
+_findpath_cmd=$1
+oIFS=${IFS}
+IFS=:
+set -- ${PATH}
+IFS=${oIFS}
+
+while [ $# -gt 0 ]; do
+if [ -x $1/${_findpath_cmd} ]; then
+printf %s\n $1/${_findpath_cmd}
+unset _findpath_cmd oIFS
+return 0
+fi
+shift
+done
+
+unset _findpath_cmd oIFS
+return 1
+}
+
+xdt_autogen=$(findpath xdt-autogen) || {
   cat 2 EOF
 autogen.sh: You don't seem to have the Xfce development tools installed on
 your system, which are required to build this software.
@@ -29,4 +55,4 @@ EOF
   exit 1
 }
 
-XDT_AUTOGEN_REQUIRED_VERSION=4.7.2 exec xdt-autogen $@
+XDT_AUTOGEN_REQUIRED_VERSION=4.7.2 exec ${xdt_autogen} $@
diff --git a/configure.in.in b/configure.in.in
index e043134..d38a06f 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -1,6 +1,7 @@
 # vi:set et ai sw=2 sts=2 ts=2: */
 #-
 # Copyright (c) 2008-2011 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
@@ -26,25 +27,25 @@ 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], 
[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()])])
+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 ***
 dnl *** Debugging support for SVN snapshots ***
 dnl ***
-m4_define([mixer_debug_default], [ifelse(xfce4_mixer_version_tag(), [svn], 
[full], [minimum])])
+m4_define([mixer_debug_default], [ifelse(xfce4_mixer_version_tag(), [git], 
[full], [minimum])])
 
 dnl ***
 dnl *** Initialize autoconf ***
 dnl 

[Xfce4-commits] xfce4-mixer:gber/improvements Support xfce4-panel 4.10 with its deskbar mode

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 73ecc6e97f485b4fb7a0f6fa64013f4a0ba06076 (commit)
   from 2476a6a1854c820e534fe9a53a1ce056593787f1 (commit)

commit 73ecc6e97f485b4fb7a0f6fa64013f4a0ba06076
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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.in.in   |2 +-
 panel-plugin/xfce-mixer-plugin.c  |6 ++
 panel-plugin/xfce-volume-button.c |6 +-
 4 files changed, 13 insertions(+), 2 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.in.in b/configure.in.in
index c2153a1..e5dd9c8 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -89,7 +89,7 @@ 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([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:gber/improvements Make the panel plugin use sensible default settings

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 26d23803f3b14abe109210432d808cff0b93eb5c (commit)
   from b924d03fefb339aee39062bc266f347ac0bfe69c (commit)

commit 26d23803f3b14abe109210432d808cff0b93eb5c
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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:gber/improvements Clearly indicate in the plugin when there is no valid card and/or element

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 53d9468b2b5c8ac538d661f8f478026c629aa3c7 (commit)
   from 26d23803f3b14abe109210432d808cff0b93eb5c (commit)

commit 53d9468b2b5c8ac538d661f8f478026c629aa3c7
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 de64a92..2bfcefa 100644
--- a/panel-plugin/xfce-mixer-plugin.c
+++ b/panel-plugin/xfce-mixer-plugin.c
@@ -607,10 +607,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;
 }
 
@@ -638,6 +639,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;
 
+  

[Xfce4-commits] xfce4-mixer:gber/improvements Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle tooltips

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to c307eeda920f331185b204da2f8ba0633c316e90 (commit)
   from 53d9468b2b5c8ac538d661f8f478026c629aa3c7 (commit)

commit c307eeda920f331185b204da2f8ba0633c316e90
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 2012 +0200

Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle 
tooltips

 NEWS  |2 +
 panel-plugin/xfce-mixer-plugin.c  |   21 +--
 panel-plugin/xfce-volume-button.c |   72 +
 panel-plugin/xfce-volume-button.h |3 ++
 4 files changed, 78 insertions(+), 20 deletions(-)

diff --git a/NEWS b/NEWS
index 01cfa15..c056db7 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,8 @@
   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).
+- Avoid the deprecated GtkTooltips API and let XfceVolumeButton handle
+  tooltips.
 
 
 4.8.0
diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c
index 2bfcefa..da09a72 100644
--- a/panel-plugin/xfce-mixer-plugin.c
+++ b/panel-plugin/xfce-mixer-plugin.c
@@ -93,9 +93,6 @@ struct _XfceMixerPlugin
   /* Parent type */
   XfcePanelPlugin __parent__;
 
-  /* Tooltips structure */
-  GtkTooltips *tooltips;
-
   /* Sound card being used */
   GstElement  *card;
   gchar   *card_name;
@@ -199,10 +196,6 @@ xfce_mixer_plugin_init (XfceMixerPlugin *mixer_plugin)
   /* Initialize the mixer library */
   xfce_mixer_init ();
 
-  /* Allocate a tooltips structure */
-  mixer_plugin-tooltips = gtk_tooltips_new ();
-  gtk_tooltips_set_delay (mixer_plugin-tooltips, 10);
-
   /* Create container for the plugin */
   mixer_plugin-hvbox = GTK_WIDGET (xfce_hvbox_new 
(GTK_ORIENTATION_HORIZONTAL, FALSE, 0));
   xfce_panel_plugin_add_action_widget (XFCE_PANEL_PLUGIN (mixer_plugin), 
mixer_plugin-hvbox);
@@ -520,7 +513,6 @@ static void
 xfce_mixer_plugin_volume_changed (XfceMixerPlugin  *mixer_plugin,
   gdouble   volume)
 {
-  gchar *tip_text;
   gint  *volumes;
   gint   volume_range;
   gint   new_volume;
@@ -534,11 +526,6 @@ xfce_mixer_plugin_volume_changed (XfceMixerPlugin  
*mixer_plugin,
   mixer_plugin-ignore_bus_messages = TRUE;
 #endif
 
-  /* Set tooltip (e.g. 'Master: 50%') */
-  tip_text = g_strdup_printf (_(%s: %i%%), mixer_plugin-track_label, (gint) 
(volume * 100));
-  gtk_tooltips_set_tip (mixer_plugin-tooltips, mixer_plugin-button, 
tip_text, test);
-  g_free (tip_text);
-
   /* Allocate array for track volumes */
   volumes = g_new (gint, mixer_plugin-track-num_channels);
 
@@ -603,7 +590,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin 
*mixer_plugin)
   gint   volume_range;
   gdoublevolume;
   gint  *volumes;
-  gchar *tip_text;
 
   g_return_if_fail (IS_XFCE_MIXER_PLUGIN (mixer_plugin));
 
@@ -611,7 +597,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin 
*mixer_plugin)
   if (!GST_IS_MIXER (mixer_plugin-card) || !GST_IS_MIXER_TRACK 
(mixer_plugin-track))
 {
   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;
 }
 
@@ -625,11 +610,6 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin 
*mixer_plugin)
   /* 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-min_volume) / 
volume_range;
 
-  /* Set tooltip (e.g. 'Master: 50%') */
-  tip_text = g_strdup_printf (_(%s: %i%%), mixer_plugin-track_label, (gint) 
(volume * 100));
-  gtk_tooltips_set_tip (mixer_plugin-tooltips, mixer_plugin-button, 
tip_text, test);
-  g_free (tip_text);
-
   /* Determine track type */
   track_type = xfce_mixer_track_type_new (mixer_plugin-track);
 
@@ -642,6 +622,7 @@ xfce_mixer_plugin_update_track (XfceMixerPlugin 
*mixer_plugin)
   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);
+  xfce_volume_button_set_track_label (XFCE_VOLUME_BUTTON 
(mixer_plugin-button), mixer_plugin-track_label);
 
   /* Free volume array */
   g_free (volumes);
diff --git a/panel-plugin/xfce-volume-button.c 
b/panel-plugin/xfce-volume-button.c
index 3b5d90e..ca2236b 100644
--- a/panel-plugin/xfce-volume-button.c
+++ b/panel-plugin/xfce-volume-button.c
@@ -46,6 +46,7 @@
 enum
 {
   PROP_0,
+  PROP_TRACK_LABEL,
   PROP_IS_CONFIGURED,
   N_PROPERTIES,
 };
@@ -137,6 +138,9 @@ struct _XfceVolumeButton
   /* Array of preloaded icons */
   GdkPixbuf **pixbufs;
 
+  /* Track label used in tooltip */
+  gchar

[Xfce4-commits] xfce4-mixer:gber/improvements Indicate in the plugin tooltip whether the track is muted

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 521f16c2f9904c11af1d1a0ee09db504ac727771 (commit)
   from c307eeda920f331185b204da2f8ba0633c316e90 (commit)

commit 521f16c2f9904c11af1d1a0ee09db504ac727771
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 da09a72..82f7db3 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);
@@ -553,9 +554,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));
@@ -564,6 +568,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:gber/improvements Mute a track when the volume is set to 0% and unmute when set to a higher value

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 488d88259619f24c45c878159e227b48d995fa36 (commit)
   from 521f16c2f9904c11af1d1a0ee09db504ac727771 (commit)

commit 488d88259619f24c45c878159e227b48d995fa36
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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.in.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.in.in b/configure.in.in
index e5dd9c8..e38c539 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -80,6 +80,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 82f7db3..75570ff 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
@@ -534,7 +538,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 = 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)
@@ 

[Xfce4-commits] xfce4-mixer:gber/improvements Add an item to the panel plugin context menu for muting (bug #7944)

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 6b489027ba0a6fe7054340f36ae2851dc204f144 (commit)
   from 488d88259619f24c45c878159e227b48d995fa36 (commit)

commit 6b489027ba0a6fe7054340f36ae2851dc204f144
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 75570ff..f708789 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);
 
@@ -558,13 +571,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));
 
@@ -572,19 +581,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
@@ -593,6 

[Xfce4-commits] xfce4-mixer:gber/improvements Make name and description more meaningful (bug #5817)

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to ba12818b6b2bcc11b7724f2b72e58d2c2875acd1 (commit)
   from 6b489027ba0a6fe7054340f36ae2851dc204f144 (commit)

commit ba12818b6b2bcc11b7724f2b72e58d2c2875acd1
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 715eb86..87b9deb 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:gber/improvements Add global keyboard shortcuts (bug #5314)

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 55c863fed1600579a886104029e86dfd25964b1e (commit)
   from e2656dab9c66887b491acb14d0d96b53c2f46c3d (commit)

commit 55c863fed1600579a886104029e86dfd25964b1e
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 2012 +0200

Add global keyboard shortcuts (bug #5314)

Add global keyboard shortcuts for raising and lowering the volume as well as
muting.
Make the plugin single-instance.

 NEWS |2 +
 configure.in.in  |1 +
 panel-plugin/Makefile.am |6 +-
 panel-plugin/mixer.desktop.in|2 +-
 panel-plugin/xfce-mixer-plugin.c |  139 ++
 5 files changed, 147 insertions(+), 3 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.in.in b/configure.in.in
index 91250d8..d0175e3 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -97,6 +97,7 @@ 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.10.0])
+XDT_CHECK_PACKAGE([KEYBINDER], [keybinder], [0.2.2])
 
 dnl ***
 dnl *** Check for debugging support ***
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 7e7a8cc..aa5ed41 100644
--- a/panel-plugin/xfce-mixer-plugin.c
+++ b/panel-plugin/xfce-mixer-plugin.c
@@ -36,6 +36,8 @@
 #include libxfce4panel/libxfce4panel.h
 #include xfconf/xfconf.h
 
+#include keybinder.h
+
 #include xfce-mixer-plugin.h
 
 #include libxfce4mixer/libxfce4mixer.h
@@ -56,6 +58,12 @@ enum
 
 
 
+#define XFCE_MIXER_PLUGIN_RAISE_VOLUME_KEY  XF86AudioRaiseVolume
+#define XFCE_MIXER_PLUGIN_LOWER_VOLUME_KEY  XF86AudioLowerVolume
+#define XFCE_MIXER_PLUGIN_MUTE_KEY  XF86AudioMute
+
+
+
 static void xfce_mixer_plugin_construct   (XfcePanelPlugin 
 *plugin);
 static void xfce_mixer_plugin_set_property(GObject 
 *object,
guint   
  prop_id,
@@ -83,6 +91,10 @@ static void xfce_mixer_plugin_update_track   
 (XfceMixerPlugin
 static void xfce_mixer_plugin_bus_message (GstBus  
 *bus,
GstMessage  
 *message,
XfceMixerPlugin 
 *mixer_plugin);
+static void xfce_mixer_plugin_volume_key_pressed  (const char  
*keystring,
+   void
*user_data);
+static void xfce_mixer_plugin_mute_pressed(const char  
*keystring,
+   void
*user_data);
 
 
 
@@ -202,6 +214,9 @@ xfce_mixer_plugin_init (XfceMixerPlugin 

[Xfce4-commits] xfce4-mixer:gber/improvements Do not use deprecated APIs and adjust requirements to Xfce 4.10

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to e2656dab9c66887b491acb14d0d96b53c2f46c3d (commit)
   from ba12818b6b2bcc11b7724f2b72e58d2c2875acd1 (commit)

commit e2656dab9c66887b491acb14d0d96b53c2f46c3d
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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.in.in   |   32 +++-
 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(+), 78 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.in.in b/configure.in.in
index e38c539..91250d8 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -89,27 +89,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([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 ***
@@ -152,10 +139,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)
 {
   g_return_if_fail (GST_IS_MIXER (card));
 
-#ifdef 

[Xfce4-commits] xfce4-mixer:gber/improvements Set the main window to normal rather than dialog type (bug #7623)

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 0e3a152d919a492a84972dab0ab82ca89ba085ea (commit)
   from 55c863fed1600579a886104029e86dfd25964b1e (commit)

commit 0e3a152d919a492a84972dab0ab82ca89ba085ea
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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:gber/improvements Populate the mixer with whitelisted controls by default (bug #4945)

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 262dc4c272c28b0d4411fb8dfbdf8a58574f96bd (commit)
   from e44805b64256bf4c62820c30576e3e1953ffc35d (commit)

commit 262dc4c272c28b0d4411fb8dfbdf8a58574f96bd
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 2012 +0200

Populate the mixer with whitelisted controls by default (bug #4945)

Populate the mixer with whitelisted controls in the absence of an existing
configuration. Select controls either based on the whitelist flag for mixers
that support it or fall back to a static whitelist.

 NEWS   |2 +
 libxfce4mixer/libxfce4mixer.c  |   80 ++--
 libxfce4mixer/libxfce4mixer.h  |1 +
 libxfce4mixer/xfce-mixer-preferences.c |   59 +++-
 4 files changed, 126 insertions(+), 16 deletions(-)

diff --git a/NEWS b/NEWS
index f2e2825..6d04cab 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,8 @@
   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.
+- Populate the mixer with whitelisted controls in the absence of an existing
+  configuration (bug #4945).
 
 
 4.8.0
diff --git a/libxfce4mixer/libxfce4mixer.c b/libxfce4mixer/libxfce4mixer.c
index 7bb9293..6ca9466 100644
--- a/libxfce4mixer/libxfce4mixer.c
+++ b/libxfce4mixer/libxfce4mixer.c
@@ -42,10 +42,25 @@ static void _xfce_mixer_destroy_mixer (GstMixer *mixer);
 
 
 
-static guint   refcount = 0;
-static GList  *mixers = NULL;
-static GstBus *bus = NULL;
-static GstElement *selected_card = NULL;
+static guintrefcount = 0;
+static GList   *mixers = NULL;
+static GstBus  *bus = NULL;
+static GstElement  *selected_card = NULL;
+static const gchar *tracks_whitelist[] =
+{
+  cd,
+  digital output,
+  front,
+  headphone,
+  line,
+  master,
+  mic,
+  pcm,
+  recording,
+  speaker,
+  volume,
+  NULL
+};
 
 
 
@@ -235,6 +250,63 @@ xfce_mixer_get_default_track (GstElement *card)
 
 
 
+GList *
+xfce_mixer_get_default_track_list (GstElement *card)
+{
+  gboolean   mixer_has_whitelist = FALSE;
+  const GList   *iter;
+  GList *track_list = NULL;
+  GstMixerTrack *track;
+  gchar *track_label;
+  gchar *track_label_lower;
+  gint   i;
+
+  g_return_val_if_fail (GST_IS_MIXER (card), NULL);
+
+  if (gst_mixer_get_mixer_flags (GST_MIXER (card))  
GST_MIXER_FLAG_HAS_WHITELIST)
+mixer_has_whitelist = TRUE;
+
+  for (iter = gst_mixer_list_tracks (GST_MIXER (card)); iter != NULL; iter = 
g_list_next (iter))
+{
+  track = GST_MIXER_TRACK (iter-data);
+
+  /* Use the whitelist flag when available and fall back to a static 
whitelist */
+  if (mixer_has_whitelist)
+{
+  if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_WHITELIST))
+track_list = g_list_prepend (track_list, track);
+}
+  else
+{
+  track_label = NULL;
+
+  if (g_object_class_find_property (G_OBJECT_GET_CLASS (track), 
untranslated-label))
+g_object_get (track, untranslated-label, track_label, NULL);
+
+  if (track_label == NULL)
+g_object_get (track, label, track_label, NULL);
+
+  track_label_lower = g_utf8_strdown (track_label, -1);
+
+  for (i = 0; tracks_whitelist[i] != NULL; ++i)
+{
+  if (strstr (track_label_lower, tracks_whitelist[i]) != NULL)
+{
+  track_list = g_list_prepend (track_list, track);
+  break;
+}
+}
+
+  g_free (track_label_lower);
+  g_free (track_label);
+}
+}
+
+  return track_list;
+}
+
+
+
 guint
 xfce_mixer_bus_connect (GCallback callback,
 gpointer  user_data)
diff --git a/libxfce4mixer/libxfce4mixer.h b/libxfce4mixer/libxfce4mixer.h
index 187db3f..473817c 100644
--- a/libxfce4mixer/libxfce4mixer.h
+++ b/libxfce4mixer/libxfce4mixer.h
@@ -49,6 +49,7 @@ 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);
+GList *xfce_mixer_get_default_track_list (GstElement*card);
 guint  xfce_mixer_bus_connect(GCallback  callback,
   gpointer   user_data);
 void   xfce_mixer_bus_disconnect (guint  
signal_handler_id);
diff --git a/libxfce4mixer/xfce-mixer-preferences.c 
b/libxfce4mixer/xfce-mixer-preferences.c
index 2cb7edb..21faefc 100644
--- a/libxfce4mixer/xfce-mixer-preferences.c
+++ b/libxfce4mixer/xfce-mixer-preferences.c
@@ -44,17 +44,18 @@ enum
 
 
 
-static void   

[Xfce4-commits] xfce4-mixer:gber/improvements Keep the sound card and controls in sync between the mixer and xfconf

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to e44805b64256bf4c62820c30576e3e1953ffc35d (commit)
   from 0e3a152d919a492a84972dab0ab82ca89ba085ea (commit)

commit e44805b64256bf4c62820c30576e3e1953ffc35d
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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.in.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.in.in b/configure.in.in
index d0175e3..cbefa48 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -91,6 +91,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   

[Xfce4-commits] xfce4-mixer:gber/improvements Make xfce4-mixer a singleton application (bug #5676)

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 9ebcc4e61a394cecf298f859810f2ae81b3df1fa (commit)
   from 94fe3cdf3f8a1b9d49db6a4c360c584e2fd66709 (commit)

commit 9ebcc4e61a394cecf298f859810f2ae81b3df1fa
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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.in.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.in.in b/configure.in.in
index cbefa48..a1f7c12 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -94,6 +94,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:gber/improvements Add popup with a scale for setting the volume to the panel plugin

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 94fe3cdf3f8a1b9d49db6a4c360c584e2fd66709 (commit)
   from 262dc4c272c28b0d4411fb8dfbdf8a58574f96bd (commit)

commit 94fe3cdf3f8a1b9d49db6a4c360c584e2fd66709
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 |  657 
 panel-plugin/xfce-volume-button.h |   36 ++-
 6 files changed, 646 insertions(+), 234 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 aa5ed41..ca0166c 100644
--- a/panel-plugin/xfce-mixer-plugin.c
+++ b/panel-plugin/xfce-mixer-plugin.c
@@ -64,37 +64,42 @@ 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_volume_key_pressed  (const char  
*keystring,
-   void
*user_data);
-static void xfce_mixer_plugin_mute_pressed

[Xfce4-commits] xfce4-mixer:gber/improvements Remove UI for configuring the mixer command from the panel plugin

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 0ba34e52028d6e448151738ceaebe579e0cc72f9 (commit)
   from 9ebcc4e61a394cecf298f859810f2ae81b3df1fa (commit)

commit 0ba34e52028d6e448151738ceaebe579e0cc72f9
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 ca0166c..ec7e60b 100644
--- a/panel-plugin/xfce-mixer-plugin.c
+++ b/panel-plugin/xfce-mixer-plugin.c
@@ -247,6 +247,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);
 
@@ -257,7 +258,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);
@@ -620,26 +624,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 7167dd0..85a319a 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,

[Xfce4-commits] xfce4-mixer:gber/improvements Add tooltips to scale widgets in the mixer

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 3805dc99e574268e8c08a42e6b1d129025fed21c (commit)
   from 0ba34e52028d6e448151738ceaebe579e0cc72f9 (commit)

commit 3805dc99e574268e8c08a42e6b1d129025fed21c
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 2012 +0200

Add tooltips to scale widgets in the mixer

 NEWS   |1 +
 xfce4-mixer/xfce-mixer-track.c |   24 +++-
 2 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 4cb9822..2286c16 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@
 - 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.
+- Add tooltips to scale widgets in the mixer.
 
 
 4.8.0
diff --git a/xfce4-mixer/xfce-mixer-track.c b/xfce4-mixer/xfce-mixer-track.c
index 579f562..366a557 100644
--- a/xfce4-mixer/xfce-mixer-track.c
+++ b/xfce4-mixer/xfce-mixer-track.c
@@ -185,6 +185,7 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track)
   GtkWidget   *fader;
   gdouble  step;
   gchar   *track_label;
+  gchar   *tooltip_text;
   gint channel;
   gint columns;
   gint*volumes;
@@ -203,7 +204,6 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track)
   /* Put the name of the track on top of the other elements */
   g_object_get (track-gst_track, label, track_label, NULL);
   label = gtk_label_new (track_label);
-  g_free (track_label);
   gtk_misc_set_alignment (GTK_MISC (label), 0.5f, 0.5f);
   gtk_table_attach (GTK_TABLE (track), label, 0, columns, 0, 1, GTK_FILL, 
GTK_SHRINK, 0, 0);
   gtk_widget_show (label);
@@ -213,15 +213,20 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track)
   /* Create a fader for each channel */
   for (channel = 0; channel  track-gst_track-num_channels; ++channel)
 {
+  tooltip_text = g_strdup_printf (_(Volume of channel %d on %s), 
channel, track_label);
+
   fader = gtk_vscale_new_with_range (track-gst_track-min_volume, 
track-gst_track-max_volume, step);
   gtk_scale_set_draw_value (GTK_SCALE (fader), FALSE);
   gtk_range_set_inverted (GTK_RANGE (fader), TRUE);
   gtk_range_set_value (GTK_RANGE (fader), volumes[channel]);
+  gtk_widget_set_tooltip_text (fader, tooltip_text);
   g_signal_connect (fader, value-changed, G_CALLBACK 
(xfce_mixer_track_fader_changed), track);
   gtk_table_attach (GTK_TABLE (track), fader, channel, channel + 1, 1, 2, 
GTK_SHRINK, GTK_FILL|GTK_EXPAND, 0, 0);
   gtk_widget_show (fader);
 
   track-channel_faders = g_list_append (track-channel_faders, fader);
+
+  g_free (tooltip_text);
 }
 
   /* Create a horizontal for the control buttons */
@@ -232,34 +237,49 @@ xfce_mixer_track_create_contents (XfceMixerTrack *track)
   /* Create mute button for playback tracks */
   if (G_LIKELY (xfce_mixer_track_type_new (track-gst_track) == 
XFCE_MIXER_TRACK_TYPE_PLAYBACK))
 {
+  tooltip_text = g_strdup_printf (_(Mute/unmute %s), track_label);
+
   track-mute_button = gtk_toggle_button_new ();
   image = gtk_image_new_from_icon_name (audio-volume-high, 
XFCE_MIXER_ICON_SIZE); 
   gtk_button_set_image (GTK_BUTTON (track-mute_button), image);
+  gtk_widget_set_tooltip_text (track-mute_button, tooltip_text);
   g_signal_connect (track-mute_button, toggled, G_CALLBACK 
(xfce_mixer_track_mute_toggled), track);
   gtk_box_pack_start (GTK_BOX (button_box), track-mute_button, FALSE, 
FALSE, 0);
   gtk_widget_show (track-mute_button);
+
+  g_free (tooltip_text);
 }
 
   if (G_LIKELY (track-gst_track-num_channels = 2))
 {
+  tooltip_text = g_strdup_printf (_(Lock channels for %s together), 
track_label);
+
   track-lock_button = gtk_toggle_button_new ();
   image = gtk_image_new_from_file (DATADIR 
/pixmaps/xfce4-mixer/chain.png);
   gtk_button_set_image (GTK_BUTTON (track-lock_button), image);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (track-lock_button), 
TRUE);
+  gtk_widget_set_tooltip_text (track-lock_button, tooltip_text);
   g_signal_connect (track-lock_button, toggled, G_CALLBACK 
(xfce_mixer_track_lock_toggled), track);
   gtk_box_pack_start (GTK_BOX (button_box), track-lock_button, FALSE, 
FALSE, 0);
   gtk_widget_show (track-lock_button);
+
+  g_free (tooltip_text);
 }
 
   /* Create record button for capture tracks */
   if (G_UNLIKELY (xfce_mixer_track_type_new (track-gst_track) == 
XFCE_MIXER_TRACK_TYPE_CAPTURE))
 {
+  tooltip_text = g_strdup_printf (_(Enable/disable audible input from %s 
in output), track_label);
+
   track-record_button = gtk_toggle_button_new ();
   image = gtk_image_new_from_icon_name (audio-input-microphone-muted, 
XFCE_MIXER_ICON_SIZE);
   gtk_button_set_image (GTK_BUTTON (track-record_button), image);
+  gtk_widget_set_tooltip_text (track-record_button, 

[Xfce4-commits] xfce4-mixer:gber/improvements Use CPPFLAGS in Makefiles

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 7d7a0be13c09457d40fb27e5161bc1dd14cacc4e (commit)
   from f89cede2c468f683f3c99593f320073d99f19c1e (commit)

commit 7d7a0be13c09457d40fb27e5161bc1dd14cacc4e
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 2012 +0200

Use CPPFLAGS in Makefiles

 libxfce4mixer/Makefile.am |6 --
 panel-plugin/Makefile.am  |6 --
 xfce4-mixer/Makefile.am   |8 +---
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/libxfce4mixer/Makefile.am b/libxfce4mixer/Makefile.am
index 4107cdd..792a95e 100644
--- a/libxfce4mixer/Makefile.am
+++ b/libxfce4mixer/Makefile.am
@@ -19,13 +19,15 @@ libxfce4mixer_la_SOURCES =  
\
xfce-mixer-debug.h  \
xfce-mixer-debug.c
 
-libxfce4mixer_la_CFLAGS =  \
+libxfce4mixer_la_CPPFLAGS =\
-I$(top_builddir)   \
-I$(top_srcdir) \
-DDATADIR=\$(datadir)\\
-DPACKAGE_LOCALE_DIR=\$(localedir)\   \
-DG_LOG_DOMAIN=\libxfce4mixer\\
-   -DMIXER_DATADIR=\$(pkgdatadir)\   \
+   -DMIXER_DATADIR=\$(pkgdatadir)\
+
+libxfce4mixer_la_CFLAGS =  \
$(PLATFORM_CFLAGS)  \
$(GLIB_CFLAGS)  \
$(GTK_FLAGS)\
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index fa27e29..a494682 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -12,12 +12,14 @@ libmixer_la_SOURCES =   
\
xfce-mixer-plugin.h \
xfce-mixer-plugin.c
 
-libmixer_la_CFLAGS =   \
+libmixer_la_CPPFLAGS = \
-I$(top_builddir)   \
-I$(top_srcdir) \
-DDATADIR=\$(datadir)\\
-DPACKAGE_LOCALE_DIR=\$(localedir)\   \
-   -DG_LOG_DOMAIN=\xfce4-mixer-plugin\   \
+   -DG_LOG_DOMAIN=\xfce4-mixer-plugin\
+
+libmixer_la_CFLAGS =   \
$(PLATFORM_CFLAGS)  \
$(GLIB_CFLAGS)  \
$(GTK_CFLAGS)   \
diff --git a/xfce4-mixer/Makefile.am b/xfce4-mixer/Makefile.am
index 8735737..819ab28 100644
--- a/xfce4-mixer/Makefile.am
+++ b/xfce4-mixer/Makefile.am
@@ -18,13 +18,15 @@ xfce4_mixer_SOURCES =   
\
xfce-mixer-window.h \
xfce-mixer-window.c
 
-xfce4_mixer_CFLAGS =   \
+xfce4_mixer_CPPFLAGS = 
\
-I$(top_builddir)   \
-I$(top_srcdir) \
-DPACKAGE_LOCALE_DIR=\$(localedir)\   \
-DDATADIR=\$(datadir)\\
-DMIXER_DATADIR=\$(pkgdatadir)\   \
-   -DG_LOG_DOMAIN=\xfce4-mixer\  \
+   -DG_LOG_DOMAIN=\xfce4-mixer\
+
+xfce4_mixer_CFLAGS =   \
$(GLIB_CFLAGS)  \
$(GTK_CFLAGS)   \
$(UNIQUE_CFLAGS)\
@@ -35,7 +37,7 @@ xfce4_mixer_CFLAGS =  
\
 
 xfce4_mixer_DEPENDENCIES = \
$(top_builddir)/libxfce4mixer/libxfce4mixer.la
-   
+
 xfce4_mixer_LDFLAGS =  \
$(top_builddir)/libxfce4mixer/libxfce4mixer.la  \
$(GLIB_LIBS)\
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mixer:gber/improvements Add man page for xfce4-mixer

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to bdb4f9ff7fb216a224f864447806d4ce912cc475 (commit)
   from 7d7a0be13c09457d40fb27e5161bc1dd14cacc4e (commit)

commit bdb4f9ff7fb216a224f864447806d4ce912cc475
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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:gber/improvements Add runtime debugging mode

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to f89cede2c468f683f3c99593f320073d99f19c1e (commit)
   from 3805dc99e574268e8c08a42e6b1d129025fed21c (commit)

commit f89cede2c468f683f3c99593f320073d99f19c1e
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 |  259 ++
 libxfce4mixer/xfce-mixer-debug.h |   53 
 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, 398 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..a5b6205
--- /dev/null
+++ b/libxfce4mixer/xfce-mixer-debug.c
@@ -0,0 +1,259 @@
+/* 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 

[Xfce4-commits] xfce4-mixer:gber/improvements Handle identically named tracks by making use of the track index property

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 3c50d140ccf8b220de5efb9b7965abb3936f8774 (commit)
   from bdb4f9ff7fb216a224f864447806d4ce912cc475 (commit)

commit 3c50d140ccf8b220de5efb9b7965abb3936f8774
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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);
+}
+}
+
+
+

[Xfce4-commits] xfce4-mixer:gber/improvements Handle GST_MIXER_MESSAGE_OPTIONS_LIST_CHANGED messages in XfceMixerOption

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to fc0f8d26f5bcd194a1e69118086b847ee55de251 (commit)
   from fb97549cd34ed3fdc3f8a9d5b1d58a0e9facf65e (commit)

commit fc0f8d26f5bcd194a1e69118086b847ee55de251
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 2012 +0200

Handle GST_MIXER_MESSAGE_OPTIONS_LIST_CHANGED messages in XfceMixerOption

 NEWS|2 +
 xfce4-mixer/xfce-mixer-option.c |  120 +++
 2 files changed, 99 insertions(+), 23 deletions(-)

diff --git a/NEWS b/NEWS
index eedf761..0d0eb5b 100644
--- a/NEWS
+++ b/NEWS
@@ -46,6 +46,8 @@
   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.
+- Handle options list changed messages which indicate that the available
+  options of a track have changed.
 
 
 4.8.0
diff --git a/xfce4-mixer/xfce-mixer-option.c b/xfce4-mixer/xfce-mixer-option.c
index e965378..8ad8682 100644
--- a/xfce4-mixer/xfce-mixer-option.c
+++ b/xfce4-mixer/xfce-mixer-option.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
@@ -34,6 +35,10 @@
 
 
 
+#define OPTION_COLUMN 0
+
+
+
 static void xfce_mixer_option_class_init  (XfceMixerOptionClass *klass);
 static void xfce_mixer_option_init(XfceMixerOption  *option);
 static void xfce_mixer_option_dispose (GObject  *object);
@@ -41,6 +46,9 @@ static void xfce_mixer_option_finalize(GObject
  *object);
 static void xfce_mixer_option_create_contents (XfceMixerOption  *option);
 static void xfce_mixer_option_changed (GtkComboBox  *combo,
XfceMixerOption  *option);
+static void xfce_mixer_option_bus_message (GstBus   *bus,
+   GstMessage   *message,
+   XfceMixerOption  *option);
 
 
 
@@ -53,8 +61,11 @@ struct _XfceMixerOption
 {
   GtkHBox __parent__;
 
+  GtkListStore  *list_store;
+
   GstElement*card;
   GstMixerTrack *track;
+  guint  signal_handler_id;
 
   GtkWidget *combo;
 
@@ -115,6 +126,8 @@ static void
 xfce_mixer_option_init (XfceMixerOption *option)
 {
   option-ignore_signals = FALSE;
+
+  option-signal_handler_id = xfce_mixer_bus_connect (G_CALLBACK 
(xfce_mixer_option_bus_message), option);
 }
 
 
@@ -130,6 +143,16 @@ xfce_mixer_option_dispose (GObject *object)
 static void
 xfce_mixer_option_finalize (GObject *object)
 {
+  XfceMixerOption *option = XFCE_MIXER_OPTION (object);
+
+  if (option-signal_handler_id  0)
+{
+  xfce_mixer_bus_disconnect (option-signal_handler_id);
+  option-signal_handler_id = 0;
+}
+
+  gtk_list_store_clear (option-list_store);
+  g_object_unref (option-list_store);
 }
 
 
@@ -159,11 +182,14 @@ xfce_mixer_option_create_contents (XfceMixerOption 
*option)
 {
   GstMixerOptions *options;
   GtkWidget   *label;
-  const GList *iter;
+  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);
@@ -178,22 +204,29 @@ xfce_mixer_option_create_contents (XfceMixerOption 
*option)
   options = GST_MIXER_OPTIONS (option-track);
   active_option = gst_mixer_get_option (GST_MIXER (option-card), options);
 
-  option-combo = gtk_combo_box_new_text ();
+  option-list_store = gtk_list_store_new (2, G_TYPE_STRING, 
GST_TYPE_MIXER_TRACK);
 
-  for (iter = options-values, i = 0; iter != NULL; iter = g_list_next (iter), 
++i)
+  for (options_iter = gst_mixer_options_get_values (options), i = 0; 
options_iter != NULL; options_iter = g_list_next (options_iter), ++i)
 {
-  gtk_combo_box_append_text (GTK_COMBO_BOX (option-combo), iter-data);
+  gtk_list_store_append (option-list_store, tree_iter);
+  gtk_list_store_set (option-list_store, tree_iter, OPTION_COLUMN, 
options_iter-data, -1);
 
-  if (G_UNLIKELY (g_utf8_collate (active_option, iter-data) == 0))
-gtk_combo_box_set_active (GTK_COMBO_BOX (option-combo), i);
+  if (G_UNLIKELY (g_utf8_collate (active_option, options_iter-data) == 0))
+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);
   /* Make read-only options insensitive */
 

[Xfce4-commits] xfce4-mixer:gber/improvements Handle read-only tracks or tracks with no mute/record functionality

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 1cc5a806d513be3e3424ea270342ed72e0a18739 (commit)
   from 3c50d140ccf8b220de5efb9b7965abb3936f8774 (commit)

commit 1cc5a806d513be3e3424ea270342ed72e0a18739
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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.in.in|2 +-
 libxfce4mixer/libxfce4mixer.c  |   47 +++-
 libxfce4mixer/xfce-mixer-track-combo.c |   16 +--
 panel-plugin/xfce-mixer-plugin.c   |   65 +--
 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, 200 insertions(+), 39 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.in.in b/configure.in.in
index a1f7c12..05cbd93 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -92,7 +92,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:gber/improvements Improve the mixer widgets

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 504d1ac40d5dfc393510d9979f2df8761017a1ae (commit)
   from fc0f8d26f5bcd194a1e69118086b847ee55de251 (commit)

commit 504d1ac40d5dfc393510d9979f2df8761017a1ae
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 

[Xfce4-commits] xfce4-mixer:gber/improvements Handle GST_MIXER_MESSAGE_MIXER_CHANGED messages

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to fb97549cd34ed3fdc3f8a9d5b1d58a0e9facf65e (commit)
   from 1cc5a806d513be3e3424ea270342ed72e0a18739 (commit)

commit fb97549cd34ed3fdc3f8a9d5b1d58a0e9facf65e
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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 |  432 +-
 xfce4-mixer/xfce-mixer.h |4 +-
 8 files changed, 430 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 

[Xfce4-commits] xfce4-mixer:gber/improvements Improve usability of the mixer and plugin configuration dialog

2012-09-21 Thread Guido Berhoerster
Updating branch refs/heads/gber/improvements
 to 55c363bff10c6c19213ca11d3738348d8848e9e8 (commit)
   from 3188fdb09b84ef7fcea91c1a82293f1a147db425 (commit)

commit 55c363bff10c6c19213ca11d3738348d8848e9e8
Author: Guido Berhoerster guido+x...@berhoerster.name
Date:   Fri Sep 21 12:00:36 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  |   45 
 xfce4-mixer/xfce-mixer-container.c |   29 ---
 xfce4-mixer/xfce-mixer-window.c|6 +---
 4 files changed, 48 insertions(+), 38 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 7c16644..cae8a44 100644
--- a/panel-plugin/xfce-plugin-dialog.c
+++ b/panel-plugin/xfce-plugin-dialog.c
@@ -143,10 +143,9 @@ 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 +156,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);
 
   /* Hack to initialize the widget 

[Xfce4-commits] libxfce4ui:nick/gtk3-optional Compile GTK3 version of kbd library.

2012-09-21 Thread Nick Schermer
Updating branch refs/heads/nick/gtk3-optional
 to 98761eb96827354c7ce7ab75fe787dd2cc8b4edb (commit)
   from 562954da30fd0e4ec3f301345335e994d526b0e8 (commit)

commit 98761eb96827354c7ce7ab75fe787dd2cc8b4edb
Author: Nick Schermer n...@xfce.org
Date:   Fri Sep 21 18:43:44 2012 +0200

Compile GTK3 version of kbd library.

 configure.ac.in|1 +
 libxfce4kbd-private/Makefile.am|   66 +---
 ...private-2.pc.in = libxfce4kbd-private-3.pc.in} |6 +-
 libxfce4kbd-private/xfce-shortcut-dialog.c |   53 +++-
 libxfce4kbd-private/xfce-shortcuts-grabber.c   |   14 +++-
 5 files changed, 122 insertions(+), 18 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 676dc77..f5fcc52 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -307,6 +307,7 @@ glade/icons/22x22/Makefile
 icons/Makefile
 icons/48x48/Makefile
 libxfce4kbd-private/libxfce4kbd-private-2.pc
+libxfce4kbd-private/libxfce4kbd-private-3.pc
 libxfce4kbd-private/Makefile
 libxfce4ui/libxfce4ui-1.pc
 libxfce4ui/libxfce4ui-2.pc
diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
index 284cf21..145d175 100644
--- a/libxfce4kbd-private/Makefile.am
+++ b/libxfce4kbd-private/Makefile.am
@@ -11,8 +11,6 @@ INCLUDES = \
-DPREFIX=\$(prefix)\ \
$(PLATFORM_CPPFLAGS)
 
-lib_LTLIBRARIES = libxfce4kbd-private-2.la
-
 libxfce4kbd_headers = \
xfce-shortcuts-provider.h \
xfce-shortcuts-grabber.h \
@@ -23,6 +21,16 @@ libxfce4kbd_built_sources = \
xfce-shortcuts-marshal.c \
xfce-shortcuts-marshal.h
 
+libxfce4kbd_sources = \
+   $(libxfce4kbd_headers) \
+   $(libxfce4kbd_built_sources) \
+   xfce-shortcuts-provider.c \
+   xfce-shortcuts-grabber.c \
+   xfce-shortcut-dialog.c \
+   xfce-shortcuts.c
+
+lib_LTLIBRARIES = libxfce4kbd-private-2.la
+
 libxfce4kbd_private_includedir = \

$(includedir)/xfce4/libxfce4kbd-private-$(LIBXFCE4KBD_PRIVATE_VERSION_API)/libxfce4kbd-private
 
@@ -30,20 +38,16 @@ libxfce4kbd_private_include_HEADERS = \
$(libxfce4kbd_headers)
 
 libxfce4kbd_private_2_la_SOURCES = \
-   $(libxfce4kbd_headers) \
-   $(libxfce4kbd_built_sources) \
-   xfce-shortcuts-provider.c \
-   xfce-shortcuts-grabber.c \
-   xfce-shortcut-dialog.c \
-   xfce-shortcuts.c
+   $(libxfce4kbd_sources)
 
 libxfce4kbd_private_2_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
-   $(GLIB_CFLAGS)  \
+   $(GLIB_CFLAGS) \
$(GTK2_CFLAGS) \
$(LIBX11_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
-   $(XFCONF_CFLAGS)
+   $(XFCONF_CFLAGS) \
+   $(PLATFORM_CFLAGS)
 
 libxfce4kbd_private_2_la_LDFLAGS = \
-export-dynamic \
@@ -67,6 +71,48 @@ settings_DATA = xfce4-keyboard-shortcuts.xml
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libxfce4kbd-private-2.pc
 
+if ENABLE_GTK3_LIBRARY
+
+lib_LTLIBRARIES += libxfce4kbd-private-3.la
+
+libxfce4kbd3_private_includedir = \
+   $(includedir)/xfce4/libxfce4kbd-private-3/libxfce4kbd-private
+
+libxfce4kbd3_private_include_HEADERS = \
+   $(libxfce4kbd_headers)
+
+libxfce4kbd_private_3_la_SOURCES = \
+   $(libxfce4kbd_sources)
+
+libxfce4kbd_private_3_la_CFLAGS = \
+   $(PLATFORM_CFLAGS) \
+   $(GLIB_CFLAGS) \
+   $(GTK3_CFLAGS) \
+   $(LIBX11_CFLAGS) \
+   $(LIBXFCE4UTIL_CFLAGS) \
+   $(XFCONF_CFLAGS) \
+   $(PLATFORM_CFLAGS)
+
+libxfce4kbd_private_3_la_LDFLAGS = \
+   -export-dynamic \
+   -version-info $(LIBXFCE4KBD_PRIVATE_VERINFO) \
+   -export-symbols-regex ^[^_].* \
+   -no-undefined \
+   $(LIBX11_LDFLAGS) \
+   $(PLATFORM_LDFLAGS)
+
+libxfce4kbd_private_3_la_LIBADD = \
+   $(top_builddir)/libxfce4ui/libxfce4ui-2.la \
+   $(GLIB_LIBS) \
+   $(GTK3_LIBS) \
+   $(LIBX11_LIBS) \
+   $(LIBXFCE4UTIL_LIBS) \
+   $(XFCONF_LIBS)
+
+pkgconfig_DATA += libxfce4kbd-private-3.pc
+
+endif
+
 if MAINTAINER_MODE
 xfce-shortcuts-marshal.h: xfce-shortcuts-marshal.list Makefile
$(AM_V_GEN) glib-genmarshal --prefix=_xfce_shortcuts_marshal --internal 
--header $  $@
diff --git a/libxfce4kbd-private/libxfce4kbd-private-2.pc.in 
b/libxfce4kbd-private/libxfce4kbd-private-3.pc.in
similarity index 59%
copy from libxfce4kbd-private/libxfce4kbd-private-2.pc.in
copy to libxfce4kbd-private/libxfce4kbd-private-3.pc.in
index b813376..9daadc5 100644
--- a/libxfce4kbd-private/libxfce4kbd-private-2.pc.in
+++ b/libxfce4kbd-private/libxfce4kbd-private-3.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libxfce4kbd-private
 Description: Private Xfce library for shared code between xfwm4 and 
xfce4-settings
-Requires: gdk-2.0 gtk+-2.0 libxfce4util-1.0 libxfconf-0 libxfce4ui-1
+Requires: gdk-3.0 gtk+-3.0 libxfce4util-1.0 libxfconf-0 libxfce4ui-2
 Version: @PACKAGE_VERSION@
-Libs: @LIBX11_LDFLAGS@ -L${libdir} 
-lxfce4kbd-private-@LIBXFCE4KBD_PRIVATE_VERSION_API@
-Cflags: 

[Xfce4-commits] xfce4-appfinder:master Make compilation to GTK3 optional.

2012-09-21 Thread Nick Schermer
Updating branch refs/heads/master
 to 1e4edbf86e47e92f4dcfc6706d09a784e667ed63 (commit)
   from 5865abb99861614124cecbd1415370d42624c4e7 (commit)

commit 1e4edbf86e47e92f4dcfc6706d09a784e667ed63
Author: Nick Schermer n...@xfce.org
Date:   Sat May 5 11:24:52 2012 +0200

Make compilation to GTK3 optional.

Code is GSEAL-ed and can optionally compile against gtk3
with --enable-gtk3. By default it will always compile
against gtk2.

 configure.ac.in |   35 +++---
 src/appfinder-preferences.c |4 +-
 src/appfinder-window.c  |  103 +--
 3 files changed, 107 insertions(+), 35 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 4d66210..98d4ca3 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -71,15 +71,29 @@ XDT_I18N([@LINGUAS@])
 dnl ***
 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([GTK], [gtk+-2.0], [2.20.0])
-XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.20.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0])
-XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.1.7])
+XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.28.0])
+XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.28.0])
+XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.28.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0])
+XDT_CHECK_PACKAGE([GARCON], [garcon-1], [0.2.0])
 XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84])
-XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
+XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.10.0])
+
+dnl 
+dnl *** Compile against GTK3 or GTK2 ***
+dnl 
+AC_ARG_ENABLE([gtk3],
+  [AC_HELP_STRING([--enable-gtk3],
+  [Compile against GTK+-3.0 (default=disabled)])],
+  [enable_gtk3=$enableval], [enable_gtk3=no])
+if test x$enable_gtk3 = xyes; then
+  XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.10.0])
+  XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.2.0])
+else
+  XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0])
+  XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.24.0])
+fi
+AM_CONDITIONAL([ENABLE_GTK3], [test x$enable_gtk3 = xyes])
 
 dnl ***
 dnl *** Check for debugging support ***
@@ -117,6 +131,11 @@ dnl ***
 echo
 echo Build Configuration:
 echo
+if test x$enable_gtk3 = xyes; then
+echo  * Toolkit:   GTK+-3
+else
+echo  * Toolkit:   GTK+-2
+fi
 echo  * Debugging Support: $enable_debug
 echo
 
diff --git a/src/appfinder-preferences.c b/src/appfinder-preferences.c
index becc111..147ee9c 100644
--- a/src/appfinder-preferences.c
+++ b/src/appfinder-preferences.c
@@ -192,10 +192,8 @@ xfce_appfinder_preferences_response (GtkWidget 
   *window,
   else
 {
   g_signal_handler_disconnect (preferences-channel, 
preferences-property_watch_id);
-
-  gtk_widget_destroy (window);
-
   g_object_unref (G_OBJECT (preferences));
+  gtk_widget_destroy (window);
 }
 }
 
diff --git a/src/appfinder-window.c b/src/appfinder-window.c
index 4f99c6a..021334a 100644
--- a/src/appfinder-window.c
+++ b/src/appfinder-window.c
@@ -42,7 +42,7 @@
 
 #ifdef GDK_WINDOWING_X11
 #include gdk/gdkx.h
-#define APPFINDER_WIDGET_XID(widget) ((guint) GDK_WINDOW_XID (GDK_WINDOW 
(GTK_WIDGET (widget)-window)))
+#define APPFINDER_WIDGET_XID(widget) ((guint) GDK_WINDOW_XID 
(gtk_widget_get_window (GTK_WIDGET (widget
 #else
 #define APPFINDER_WIDGET_XID(widget) (0)
 #endif
@@ -220,16 +220,27 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
   integer = xfconf_channel_get_int (window-channel, /last/window-width, 
DEFAULT_WINDOW_WIDTH);
   gtk_window_set_default_size (GTK_WINDOW (window), integer, -1);
   gtk_window_set_icon_name (GTK_WINDOW (window), GTK_STOCK_EXECUTE);
+#if GTK_CHECK_VERSION (3, 0, 0)
+  gtk_window_set_has_resize_grip (GTK_WINDOW (window), FALSE);
+#endif
 
   if (xfconf_channel_get_bool (window-channel, /always-center, FALSE))
 gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
 
+#if GTK_CHECK_VERSION (3, 0, 0)
+  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
   vbox = gtk_vbox_new (FALSE, 6);
+#endif
   gtk_container_add (GTK_CONTAINER (window), vbox);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
   gtk_widget_show (vbox);
 
+#if GTK_CHECK_VERSION (3, 0, 0)
+  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
   hbox = gtk_hbox_new (FALSE, 6);
+#endif
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
   gtk_widget_show (hbox);
 
@@ -243,7 +254,11 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
   gtk_container_add (GTK_CONTAINER (align), image);
   gtk_widget_show 

[Xfce4-commits] xfce4-appfinder:nick/gtk3 Deleting branch nick/gtk3

2012-09-21 Thread well, not really
Deleting branch refs/heads/nick/gtk3

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Depend on GTK 2.24 and Glib 2.28.

2012-09-21 Thread Nick Schermer
Updating branch refs/heads/master
 to 6df44d29a4e8bda569d371ad3050f4a31c964dd0 (commit)
   from c2054ccb6cf01fa7c171174769fcf04c2dc340b7 (commit)

commit 6df44d29a4e8bda569d371ad3050f4a31c964dd0
Author: Nick Schermer n...@xfce.org
Date:   Wed Sep 19 21:32:39 2012 +0200

Depend on GTK 2.24 and Glib 2.28.

 configure.ac.in |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 9889a15..676dc77 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -125,9 +125,9 @@ XDT_CHECK_LIBSM()
 dnl ***
 dnl *** Check for required packages ***
 dnl ***
-XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.24.0])
-XDT_CHECK_PACKAGE([GTK2], [gtk+-2.0], [2.20.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
+XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.28.0])
+XDT_CHECK_PACKAGE([GTK2], [gtk+-2.0], [2.24.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0])
 
 dnl ***
 dnl *** Optional support for a GTK+3 version of the library ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Compile GTK+-3 version of libxfce4ui when possible.

2012-09-21 Thread Nick Schermer
Updating branch refs/heads/master
 to c2054ccb6cf01fa7c171174769fcf04c2dc340b7 (commit)
   from 163435879ff61423da8960df486402a8db06ffdf (commit)

commit c2054ccb6cf01fa7c171174769fcf04c2dc340b7
Author: Nick Schermer n...@xfce.org
Date:   Wed Sep 19 18:57:55 2012 +0200

Compile GTK+-3 version of libxfce4ui when possible.

Provide a GTK3 version of the library next to the GTK2
version if GTK3 is found on the system. The same code
is compiled twice.

Porting of this code is also work of Stephan Arts.

 configure.ac.in|   11 +-
 libxfce4kbd-private/Makefile.am|4 +-
 libxfce4ui/Makefile.am |   64 ++--
 .../{libxfce4ui-1.pc.in = libxfce4ui-2.pc.in} |6 +-
 libxfce4ui/xfce-gdk-extensions.c   |   15 ++-
 libxfce4ui/xfce-heading.c  |  189 
 libxfce4ui/xfce-sm-client.c|7 +-
 libxfce4ui/xfce-spawn.c|   13 +-
 libxfce4ui/xfce-titled-dialog.c|   27 ++-
 xfce4-about/Makefile.am|4 +-
 10 files changed, 271 insertions(+), 69 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 414bcdb..9889a15 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -126,9 +126,17 @@ dnl ***
 dnl *** Check for required packages ***
 dnl ***
 XDT_CHECK_PACKAGE([GOBJECT], [gobject-2.0], [2.24.0])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0])
+XDT_CHECK_PACKAGE([GTK2], [gtk+-2.0], [2.20.0])
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
 
+dnl ***
+dnl *** Optional support for a GTK+3 version of the library ***
+dnl ***
+XDT_CHECK_OPTIONAL_PACKAGE([GTK3],
+   [gtk+-3.0], [3.2.0], [gtk3],
+   [GTK+ 3 support])
+AM_CONDITIONAL([ENABLE_GTK3_LIBRARY], [test x$GTK3_FOUND = xyes])
+
 dnl *
 dnl *** Optional support for startup notification ***
 dnl *
@@ -301,6 +309,7 @@ icons/48x48/Makefile
 libxfce4kbd-private/libxfce4kbd-private-2.pc
 libxfce4kbd-private/Makefile
 libxfce4ui/libxfce4ui-1.pc
+libxfce4ui/libxfce4ui-2.pc
 libxfce4ui/libxfce4ui-config.h
 libxfce4ui/Makefile
 xfce4-about/Makefile
diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
index abff01e..284cf21 100644
--- a/libxfce4kbd-private/Makefile.am
+++ b/libxfce4kbd-private/Makefile.am
@@ -40,7 +40,7 @@ libxfce4kbd_private_2_la_SOURCES = \
 libxfce4kbd_private_2_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
$(GLIB_CFLAGS)  \
-   $(GTK_CFLAGS) \
+   $(GTK2_CFLAGS) \
$(LIBX11_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
$(XFCONF_CFLAGS)
@@ -56,7 +56,7 @@ libxfce4kbd_private_2_la_LDFLAGS = \
 libxfce4kbd_private_2_la_LIBADD = \
$(top_builddir)/libxfce4ui/libxfce4ui-$(LIBXFCE4UI_VERSION_API).la \
$(GLIB_LIBS) \
-   $(GTK_LIBS) \
+   $(GTK2_LIBS) \
$(LIBX11_LIBS) \
$(LIBXFCE4UTIL_LIBS) \
$(XFCONF_LIBS)
diff --git a/libxfce4ui/Makefile.am b/libxfce4ui/Makefile.am
index 0c3b8f9..d70f161 100644
--- a/libxfce4ui/Makefile.am
+++ b/libxfce4ui/Makefile.am
@@ -11,8 +11,6 @@ INCLUDES = \
-DPACKAGE_LOCALE_DIR=\$(localedir)\ \
$(PLATFORM_CPPFLAGS)
 
-lib_LTLIBRARIES = libxfce4ui-1.la
-
 libxfce4ui_enum_headers = \
xfce-sm-client.h
 
@@ -35,13 +33,7 @@ libxfce4ui_built_sources = \
libxfce4ui-marshal.c \
libxfce4ui-marshal.h
 
-libxfce4ui_includedir = \
-   $(includedir)/xfce4/libxfce4ui-$(LIBXFCE4UI_VERSION_API)/libxfce4ui
-
-libxfce4ui_include_HEADERS = \
-   $(libxfce4ui_headers)
-
-libxfce4ui_1_la_SOURCES = \
+libxfce4ui_sources = \
$(libxfce4ui_headers) \
$(libxfce4ui_built_sources) \
libxfce4ui-config.c \
@@ -55,9 +47,20 @@ libxfce4ui_1_la_SOURCES = \
xfce-spawn.c \
xfce-titled-dialog.c
 
+libxfce4ui_includedir = \
+   $(includedir)/xfce4/libxfce4ui-$(LIBXFCE4UI_VERSION_API)/libxfce4ui
+
+libxfce4ui_include_HEADERS = \
+   $(libxfce4ui_headers)
+
+lib_LTLIBRARIES = libxfce4ui-1.la
+
+libxfce4ui_1_la_SOURCES = \
+   $(libxfce4ui_sources)
+
 libxfce4ui_1_la_CFLAGS = \
$(LIBSM_CFLAGS) \
-   $(GTK_CFLAGS) \
+   $(GTK2_CFLAGS) \
$(LIBSTARTUP_NOTIFICATION_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
$(PLATFORM_CFLAGS)
@@ -71,13 +74,52 @@ libxfce4ui_1_la_LDFLAGS = \
 
 libxfce4ui_1_la_LIBADD = \
$(LIBSM_LIBS) \
-   $(GTK_LIBS) \
+   $(GTK2_LIBS) \
$(LIBSTARTUP_NOTIFICATION_LIBS) \
$(LIBXFCE4UTIL_LIBS)
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libxfce4ui-1.pc
 
+##
+## GTK+ 3 support 

[Xfce4-commits] libxfce4ui:master Fix background color in gtk2 header code.

2012-09-21 Thread Nick Schermer
Updating branch refs/heads/master
 to 585dc915b8a792170ca423405689a3823804f28f (commit)
   from 6df44d29a4e8bda569d371ad3050f4a31c964dd0 (commit)

commit 585dc915b8a792170ca423405689a3823804f28f
Author: Nick Schermer n...@xfce.org
Date:   Thu Sep 20 19:33:20 2012 +0200

Fix background color in gtk2 header code.

Removed a bit too much code.

 libxfce4ui/xfce-heading.c |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/libxfce4ui/xfce-heading.c b/libxfce4ui/xfce-heading.c
index 83e1de7..afcfff5 100644
--- a/libxfce4ui/xfce-heading.c
+++ b/libxfce4ui/xfce-heading.c
@@ -156,20 +156,38 @@ _xfce_heading_realize (GtkWidget *widget)
   attributes.y = allocation.y;
   attributes.width = allocation.width;
   attributes.height = allocation.height;
+#if !GTK_CHECK_VERSION (3, 0, 0)
+  attributes.colormap = gtk_widget_get_colormap (widget);
+#endif
   attributes.wclass = GDK_INPUT_OUTPUT;
   attributes.window_type = GDK_WINDOW_CHILD;
   attributes.visual = gtk_widget_get_visual (widget);
   attributes.event_mask = gtk_widget_get_events (widget)
 | GDK_EXPOSURE_MASK;
 
+#if GTK_CHECK_VERSION (3, 0, 0)
   /* allocate the widget window */
   window = gdk_window_new (gtk_widget_get_parent_window (widget), attributes,
GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL);
   gtk_widget_set_window (widget, window);
   gdk_window_set_user_data (window, widget);
+#else
+  /* allocate the widget window */
+  window = gdk_window_new (gtk_widget_get_parent_window (widget), attributes,
+   GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | 
GDK_WA_COLORMAP);
+  gtk_widget_set_window (widget, window);
+  gdk_window_set_user_data (window, widget);
+
+  /* connect the style to the window */
+  widget-style = gtk_style_attach (widget-style, widget-window);
+
+  /* set background color (using the base color) */
+  gdk_window_set_background (widget-window, 
widget-style-base[GTK_STATE_NORMAL]);
+#endif
 }
 
 
+
 #if GTK_CHECK_VERSION (3, 0, 0)
 static void
 _xfce_heading_get_preferred_width (GtkWidget *widget,
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:master Compile with gseal enabled.

2012-09-21 Thread Nick Schermer
Updating branch refs/heads/master
 to efde953ab16a3fdbb0b21161fa5414cce89bdc26 (commit)
   from 585dc915b8a792170ca423405689a3823804f28f (commit)

commit efde953ab16a3fdbb0b21161fa5414cce89bdc26
Author: Nick Schermer n...@xfce.org
Date:   Thu Sep 20 19:53:15 2012 +0200

Compile with gseal enabled.

 glade/libxfce4ui-glade.c   |5 +++
 libxfce4kbd-private/xfce-shortcut-dialog.c |5 +--
 libxfce4ui/xfce-heading.c  |   51 ---
 3 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/glade/libxfce4ui-glade.c b/glade/libxfce4ui-glade.c
index 7b8c282..2c98909 100644
--- a/glade/libxfce4ui-glade.c
+++ b/glade/libxfce4ui-glade.c
@@ -25,6 +25,11 @@
 #include string.h
 #endif
 
+/* else glade is not working */
+#ifdef SEAL_ENABLE
+typedef struct gpointer GtkCombo;
+#endif
+
 #include gtk/gtk.h
 #include gladeui/glade.h
 #include libxfce4ui/libxfce4ui.h
diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c 
b/libxfce4kbd-private/xfce-shortcut-dialog.c
index 5f1b058..e16a8e8 100644
--- a/libxfce4kbd-private/xfce-shortcut-dialog.c
+++ b/libxfce4kbd-private/xfce-shortcut-dialog.c
@@ -219,9 +219,6 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   gtk_window_set_title (GTK_WINDOW (dialog), title);
   gtk_window_set_icon_name (GTK_WINDOW (dialog), input-keyboard);
 
-  /* Configure dialog */
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
-
   /* Create clear button for xfwm4 */
   if (g_utf8_collate (provider, xfwm4) == 0)
 {
@@ -239,7 +236,7 @@ xfce_shortcut_dialog_create_contents (XfceShortcutDialog 
*dialog,
   gtk_table_set_row_spacings (GTK_TABLE (table), 6);
   gtk_table_set_col_spacings (GTK_TABLE (table), 12);
   gtk_container_set_border_width (GTK_CONTAINER (table), 12);
-  gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)-vbox), table);
+  gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG 
(dialog))), table);
   gtk_widget_show (table);
 
   label = gtk_label_new (action_label);
diff --git a/libxfce4ui/xfce-heading.c b/libxfce4ui/xfce-heading.c
index afcfff5..7a0560f 100644
--- a/libxfce4ui/xfce-heading.c
+++ b/libxfce4ui/xfce-heading.c
@@ -179,10 +179,11 @@ _xfce_heading_realize (GtkWidget *widget)
   gdk_window_set_user_data (window, widget);
 
   /* connect the style to the window */
-  widget-style = gtk_style_attach (widget-style, widget-window);
+  gtk_widget_style_attach (widget);
 
   /* set background color (using the base color) */
-  gdk_window_set_background (widget-window, 
widget-style-base[GTK_STATE_NORMAL]);
+  gdk_window_set_background (gtk_widget_get_window (widget),
+ gtk_widget_get_style 
(widget)-base[GTK_STATE_NORMAL]);
 #endif
 }
 
@@ -339,10 +340,11 @@ _xfce_heading_style_set (GtkWidget *widget,
  GtkStyle  *previous_style)
 {
   /* check if we're already realized */
-  if (GTK_WIDGET_REALIZED (widget))
+  if (gtk_widget_get_realized (widget))
 {
   /* set background color (using the base color) */
-  gdk_window_set_background (widget-window, 
widget-style-base[GTK_STATE_NORMAL]);
+  gdk_window_set_background (gtk_widget_get_window (widget),
+ gtk_widget_get_style 
(widget)-base[GTK_STATE_NORMAL]);
 }
 }
 
@@ -352,20 +354,24 @@ static gboolean
 _xfce_heading_expose_event (GtkWidget  *widget,
 GdkEventExpose *event)
 {
-  XfceHeading *heading = XFCE_HEADING (widget);
-  PangoLayout *layout;
-  GdkPixbuf   *pixbuf;
-  gboolean rtl;
-  gint width;
-  gint height;
-  gint x;
-  gint y;
+  XfceHeading   *heading = XFCE_HEADING (widget);
+  PangoLayout   *layout;
+  GdkPixbuf *pixbuf;
+  gboolean   rtl;
+  gint   width;
+  gint   height;
+  gint   x;
+  gint   y;
+  cairo_t   *cr;
+  GtkAllocation  allocation;
+
+  gtk_widget_get_allocation (widget, allocation);
 
   /* check if we should render from right to left */
   rtl = (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL);
 
   /* determine the initial horizontal position */
-  x = (rtl ? widget-allocation.width - XFCE_HEADING_BORDER : 
XFCE_HEADING_BORDER);
+  x = (rtl ? allocation.width - XFCE_HEADING_BORDER : XFCE_HEADING_BORDER);
 
   /* check if we have a pixbuf to render */
   pixbuf = _xfce_heading_make_pixbuf (heading);
@@ -376,12 +382,13 @@ _xfce_heading_expose_event (GtkWidget  *widget,
   height = gdk_pixbuf_get_height (pixbuf);
 
   /* determine the vertical position */
-  y = (widget-allocation.height - height) / 2;
+  y = (allocation.height - height) / 2;
 
   /* render the pixbuf */
-  gdk_draw_pixbuf (widget-window, widget-style-black_gc, pixbuf, 0, 0,
-   (rtl ? x - width : x), y, width, height,
-   GDK_RGB_DITHER_NORMAL, 0, 0);
+  cr = gdk_cairo_create (GDK_DRAWABLE 

[Xfce4-commits] libxfce4ui:master Compile GTK3 version of kbd library.

2012-09-21 Thread Nick Schermer
Updating branch refs/heads/master
 to 4f3084cea2901cda3d333f5a8ca2019e866e5c32 (commit)
   from efde953ab16a3fdbb0b21161fa5414cce89bdc26 (commit)

commit 4f3084cea2901cda3d333f5a8ca2019e866e5c32
Author: Nick Schermer n...@xfce.org
Date:   Fri Sep 21 18:43:44 2012 +0200

Compile GTK3 version of kbd library.

 configure.ac.in|1 +
 libxfce4kbd-private/Makefile.am|   66 +---
 ...private-2.pc.in = libxfce4kbd-private-3.pc.in} |6 +-
 libxfce4kbd-private/xfce-shortcut-dialog.c |   53 +++-
 libxfce4kbd-private/xfce-shortcuts-grabber.c   |   14 +++-
 5 files changed, 122 insertions(+), 18 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 676dc77..f5fcc52 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -307,6 +307,7 @@ glade/icons/22x22/Makefile
 icons/Makefile
 icons/48x48/Makefile
 libxfce4kbd-private/libxfce4kbd-private-2.pc
+libxfce4kbd-private/libxfce4kbd-private-3.pc
 libxfce4kbd-private/Makefile
 libxfce4ui/libxfce4ui-1.pc
 libxfce4ui/libxfce4ui-2.pc
diff --git a/libxfce4kbd-private/Makefile.am b/libxfce4kbd-private/Makefile.am
index 284cf21..145d175 100644
--- a/libxfce4kbd-private/Makefile.am
+++ b/libxfce4kbd-private/Makefile.am
@@ -11,8 +11,6 @@ INCLUDES = \
-DPREFIX=\$(prefix)\ \
$(PLATFORM_CPPFLAGS)
 
-lib_LTLIBRARIES = libxfce4kbd-private-2.la
-
 libxfce4kbd_headers = \
xfce-shortcuts-provider.h \
xfce-shortcuts-grabber.h \
@@ -23,6 +21,16 @@ libxfce4kbd_built_sources = \
xfce-shortcuts-marshal.c \
xfce-shortcuts-marshal.h
 
+libxfce4kbd_sources = \
+   $(libxfce4kbd_headers) \
+   $(libxfce4kbd_built_sources) \
+   xfce-shortcuts-provider.c \
+   xfce-shortcuts-grabber.c \
+   xfce-shortcut-dialog.c \
+   xfce-shortcuts.c
+
+lib_LTLIBRARIES = libxfce4kbd-private-2.la
+
 libxfce4kbd_private_includedir = \

$(includedir)/xfce4/libxfce4kbd-private-$(LIBXFCE4KBD_PRIVATE_VERSION_API)/libxfce4kbd-private
 
@@ -30,20 +38,16 @@ libxfce4kbd_private_include_HEADERS = \
$(libxfce4kbd_headers)
 
 libxfce4kbd_private_2_la_SOURCES = \
-   $(libxfce4kbd_headers) \
-   $(libxfce4kbd_built_sources) \
-   xfce-shortcuts-provider.c \
-   xfce-shortcuts-grabber.c \
-   xfce-shortcut-dialog.c \
-   xfce-shortcuts.c
+   $(libxfce4kbd_sources)
 
 libxfce4kbd_private_2_la_CFLAGS = \
$(PLATFORM_CFLAGS) \
-   $(GLIB_CFLAGS)  \
+   $(GLIB_CFLAGS) \
$(GTK2_CFLAGS) \
$(LIBX11_CFLAGS) \
$(LIBXFCE4UTIL_CFLAGS) \
-   $(XFCONF_CFLAGS)
+   $(XFCONF_CFLAGS) \
+   $(PLATFORM_CFLAGS)
 
 libxfce4kbd_private_2_la_LDFLAGS = \
-export-dynamic \
@@ -67,6 +71,48 @@ settings_DATA = xfce4-keyboard-shortcuts.xml
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libxfce4kbd-private-2.pc
 
+if ENABLE_GTK3_LIBRARY
+
+lib_LTLIBRARIES += libxfce4kbd-private-3.la
+
+libxfce4kbd3_private_includedir = \
+   $(includedir)/xfce4/libxfce4kbd-private-3/libxfce4kbd-private
+
+libxfce4kbd3_private_include_HEADERS = \
+   $(libxfce4kbd_headers)
+
+libxfce4kbd_private_3_la_SOURCES = \
+   $(libxfce4kbd_sources)
+
+libxfce4kbd_private_3_la_CFLAGS = \
+   $(PLATFORM_CFLAGS) \
+   $(GLIB_CFLAGS) \
+   $(GTK3_CFLAGS) \
+   $(LIBX11_CFLAGS) \
+   $(LIBXFCE4UTIL_CFLAGS) \
+   $(XFCONF_CFLAGS) \
+   $(PLATFORM_CFLAGS)
+
+libxfce4kbd_private_3_la_LDFLAGS = \
+   -export-dynamic \
+   -version-info $(LIBXFCE4KBD_PRIVATE_VERINFO) \
+   -export-symbols-regex ^[^_].* \
+   -no-undefined \
+   $(LIBX11_LDFLAGS) \
+   $(PLATFORM_LDFLAGS)
+
+libxfce4kbd_private_3_la_LIBADD = \
+   $(top_builddir)/libxfce4ui/libxfce4ui-2.la \
+   $(GLIB_LIBS) \
+   $(GTK3_LIBS) \
+   $(LIBX11_LIBS) \
+   $(LIBXFCE4UTIL_LIBS) \
+   $(XFCONF_LIBS)
+
+pkgconfig_DATA += libxfce4kbd-private-3.pc
+
+endif
+
 if MAINTAINER_MODE
 xfce-shortcuts-marshal.h: xfce-shortcuts-marshal.list Makefile
$(AM_V_GEN) glib-genmarshal --prefix=_xfce_shortcuts_marshal --internal 
--header $  $@
diff --git a/libxfce4kbd-private/libxfce4kbd-private-2.pc.in 
b/libxfce4kbd-private/libxfce4kbd-private-3.pc.in
similarity index 59%
copy from libxfce4kbd-private/libxfce4kbd-private-2.pc.in
copy to libxfce4kbd-private/libxfce4kbd-private-3.pc.in
index b813376..9daadc5 100644
--- a/libxfce4kbd-private/libxfce4kbd-private-2.pc.in
+++ b/libxfce4kbd-private/libxfce4kbd-private-3.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
 
 Name: libxfce4kbd-private
 Description: Private Xfce library for shared code between xfwm4 and 
xfce4-settings
-Requires: gdk-2.0 gtk+-2.0 libxfce4util-1.0 libxfconf-0 libxfce4ui-1
+Requires: gdk-3.0 gtk+-3.0 libxfce4util-1.0 libxfconf-0 libxfce4ui-2
 Version: @PACKAGE_VERSION@
-Libs: @LIBX11_LDFLAGS@ -L${libdir} 
-lxfce4kbd-private-@LIBXFCE4KBD_PRIVATE_VERSION_API@
-Cflags: @LIBX11_CFLAGS@ 

[Xfce4-commits] libxfce4ui:nick/gtk3-optional Deleting branch nick/gtk3-optional

2012-09-21 Thread well, not really
Deleting branch refs/heads/nick/gtk3-optional

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] libxfce4ui:stephan/gtk3 Deleting branch stephan/gtk3

2012-09-21 Thread well, not really
Deleting branch refs/heads/stephan/gtk3

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] thunar:master l10n: Updated Italian (it) translation to 98%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to c861731d5ace6fe538763f411885663cc8627527 (commit)
   from 327078054248e9fcc181d9d9d74b32ab9398391e (commit)

commit c861731d5ace6fe538763f411885663cc8627527
Author: Cristian Marchi cri.pe...@gmail.com
Date:   Fri Sep 21 21:09:15 2012 +0200

l10n: Updated Italian (it) translation to 98%

New status: 680 messages complete with 6 fuzzies and 4 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/it.po |  386 --
 1 files changed, 197 insertions(+), 189 deletions(-)

diff --git a/po/it.po b/po/it.po
index f3c1a59..2488e92 100644
--- a/po/it.po
+++ b/po/it.po
@@ -5,20 +5,19 @@
 # Roberto Pariset robdeb...@gmail.com, 2009.
 # Gianluca Foddis gianluca.fod...@gmail.com, 2009
 # Cristian Marchi cri.pe...@gmail.com, 2010
-#
+# 
 msgid 
 msgstr 
 Project-Id-Version: Thunar trunk\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-09-16 22:33+0200\n
+POT-Creation-Date: 2012-09-21 17:57+\n
 PO-Revision-Date: 2010-07-02 16:42+0100\n
 Last-Translator: Cristian Marchi cri.pe...@gmail.com\n
-Language-Team: Italian Translation Team xfce-it-translators@googlegroups.
-com\n
-Language: \n
+Language-Team: Italian Translation Team 
xfce-it-translat...@googlegroups.com\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
 
 #: ../thunar/main.c:62
@@ -79,55 +78,55 @@ msgstr Scritto da Benedikt Meurer be...@xfce.org.
 msgid Please report bugs to %s.
 msgstr Segnalare i problemi a %s.
 
-#: ../thunar/thunar-abstract-icon-view.c:115
+#: ../thunar/thunar-abstract-icon-view.c:116
 msgid Arran_ge Items
 msgstr _Ordina gli elementi
 
-#: ../thunar/thunar-abstract-icon-view.c:120
+#: ../thunar/thunar-abstract-icon-view.c:121
 msgid Sort By _Name
 msgstr Ordina per _nome
 
-#: ../thunar/thunar-abstract-icon-view.c:120
+#: ../thunar/thunar-abstract-icon-view.c:121
 msgid Keep items sorted by their name
 msgstr Mantiene gli elementi ordinati per nome
 
-#: ../thunar/thunar-abstract-icon-view.c:121
+#: ../thunar/thunar-abstract-icon-view.c:122
 msgid Sort By _Size
 msgstr Ordina per dimen_sione
 
-#: ../thunar/thunar-abstract-icon-view.c:121
+#: ../thunar/thunar-abstract-icon-view.c:122
 msgid Keep items sorted by their size
 msgstr Mantiene gli elementi ordinati per dimensione
 
-#: ../thunar/thunar-abstract-icon-view.c:122
+#: ../thunar/thunar-abstract-icon-view.c:123
 msgid Sort By _Type
 msgstr Ordina per _tipo
 
-#: ../thunar/thunar-abstract-icon-view.c:122
+#: ../thunar/thunar-abstract-icon-view.c:123
 msgid Keep items sorted by their type
 msgstr Mantiene gli elementi ordinati per tipo
 
-#: ../thunar/thunar-abstract-icon-view.c:123
+#: ../thunar/thunar-abstract-icon-view.c:124
 msgid Sort By Modification _Date
 msgstr Ordina per data di _modifica
 
-#: ../thunar/thunar-abstract-icon-view.c:123
+#: ../thunar/thunar-abstract-icon-view.c:124
 msgid Keep items sorted by their modification date
 msgstr Mantiene gli elementi ordinati per data di modifica
 
-#: ../thunar/thunar-abstract-icon-view.c:128
+#: ../thunar/thunar-abstract-icon-view.c:129
 msgid _Ascending
 msgstr _Ascendente
 
-#: ../thunar/thunar-abstract-icon-view.c:128
+#: ../thunar/thunar-abstract-icon-view.c:129
 msgid Sort items in ascending order
 msgstr Ordina gli elementi in ordine ascendente
 
-#: ../thunar/thunar-abstract-icon-view.c:129
+#: ../thunar/thunar-abstract-icon-view.c:130
 msgid _Descending
 msgstr _Discendente
 
-#: ../thunar/thunar-abstract-icon-view.c:129
+#: ../thunar/thunar-abstract-icon-view.c:130
 msgid Sort items in descending order
 msgstr Ordina gli elementi in ordine discendente
 
@@ -152,21 +151,21 @@ msgstr Impossibile aprire \%s\: %s
 
 #. display an error message
 #: ../thunar/thunar-application.c:1293
-#: ../thunar/thunar-properties-dialog.c:678
-#: ../thunar/thunar-standard-view.c:2255 ../thunar/thunar-tree-view.c:1672
+#: ../thunar/thunar-properties-dialog.c:680
+#: ../thunar/thunar-standard-view.c:2277 ../thunar/thunar-tree-view.c:1672
 #, c-format
 msgid Failed to rename \%s\
 msgstr Impossibile rinominare \%s\
 
 #: ../thunar/thunar-application.c:1395
 #: ../thunar/thunar-location-buttons.c:1285
-#: ../thunar/thunar-standard-view.c:1880 ../thunar/thunar-tree-view.c:1569
+#: ../thunar/thunar-standard-view.c:1886 ../thunar/thunar-tree-view.c:1569
 msgid New Folder
 msgstr Nuova cartella
 
 #: ../thunar/thunar-application.c:1396
 #: ../thunar/thunar-location-buttons.c:1286
-#: ../thunar/thunar-standard-view.c:1881 ../thunar/thunar-tree-view.c:1570
+#: ../thunar/thunar-standard-view.c:1887 ../thunar/thunar-tree-view.c:1570
 msgid Create New Folder
 msgstr Crea nuova cartella
 
@@ -179,7 +178,7 @@ msgid Create New File
 msgstr Crea un nuovo file
 
 #. generate a title for the create dialog
-#: ../thunar/thunar-application.c:1459 ../thunar/thunar-standard-view.c:1926
+#: 

[Xfce4-commits] midori:master l10n: Updated Italian (it) translation to 96%

2012-09-21 Thread Transifex
Updating branch refs/heads/master
 to bad3cdd682c099f4aa4896c5078ae26a2445065a (commit)
   from 4057a00983f7db20749a276dba1afd477ab3f16b (commit)

commit bad3cdd682c099f4aa4896c5078ae26a2445065a
Author: Cristian Marchi cri.pe...@gmail.com
Date:   Fri Sep 21 21:10:08 2012 +0200

l10n: Updated Italian (it) translation to 96%

New status: 600 messages complete with 8 fuzzies and 14 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

 po/it.po |  431 +++---
 1 files changed, 243 insertions(+), 188 deletions(-)

diff --git a/po/it.po b/po/it.po
index 4a10ef3..3b58199 100644
--- a/po/it.po
+++ b/po/it.po
@@ -9,7 +9,7 @@ msgid 
 msgstr 
 Project-Id-Version: midori 0.1.7\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-09-16 14:12+\n
+POT-Creation-Date: 2012-09-21 17:15+\n
 PO-Revision-Date: 2011-12-24 09:51+0100\n
 Last-Translator: Cristian Marchi cri.pe...@gmail.com\n
 Language-Team: Italian xfce-it-translat...@googlegroups.com\n
@@ -27,8 +27,8 @@ msgstr Naviga nel web
 msgid Internet;WWW;Explorer
 msgstr Internet;WWW;Explorer
 
-#: ../data/midori.desktop.in.h:3 ../midori/main.c:1922 ../midori/main.c:1946
-#: ../midori/main.c:1960 ../midori/midori-websettings.c:200
+#: ../data/midori.desktop.in.h:3 ../midori/main.c:1922 ../midori/main.c:1937
+#: ../midori/main.c:1950 ../midori/midori-websettings.c:200
 msgid Midori
 msgstr Midori
 
@@ -60,87 +60,87 @@ msgstr Navigazione privata di Midori
 msgid Open a new private browsing window
 msgstr Apre una nuova finestra di navigazione privata
 
-#: ../data/midori-private.desktop.in.h:3 ../midori/midori-view.c:4355
+#: ../data/midori-private.desktop.in.h:3 ../midori/midori-view.c:4310
 msgid Private Browsing
 msgstr Navigazione privata
 
-#: ../midori/main.c:91 ../midori/main.c:97
+#: ../midori/main.c:84 ../midori/main.c:90
 #, c-format
 msgid The configuration couldn't be loaded: %s\n
 msgstr Le impostazioni non possono essere caricate: %s\n
 
-#: ../midori/main.c:145
+#: ../midori/main.c:138
 #, c-format
 msgid Value '%s' is invalid for %s
 msgstr Il valore «%s» non è valido per %s
 
-#: ../midori/main.c:150 ../midori/main.c:254
+#: ../midori/main.c:143 ../midori/main.c:247
 #, c-format
 msgid Invalid configuration value '%s'
 msgstr Valore di configurazione «%s» non valido
 
-#: ../midori/main.c:365
+#: ../midori/main.c:357
 #, c-format
 msgid The search engines couldn't be loaded. %s\n
 msgstr I motori di ricerca non possono essere caricati. %s\n
 
-#: ../midori/main.c:419
+#: ../midori/main.c:411
 #, c-format
 msgid Failed to clear history: %s\n
 msgstr Errore nella cancellazione della cronologia: %s\n
 
-#: ../midori/main.c:441 ../extensions/formhistory/formhistory.c:531
+#: ../midori/main.c:433 ../extensions/formhistory/formhistory.c:531
 #, c-format
 msgid Failed to open database: %s\n
 msgstr Errore nella connessione al database: %s\n
 
 #. i18n: Couldn't remove items that are older than n days
-#: ../midori/main.c:513
+#: ../midori/main.c:505
 #, c-format
 msgid Failed to remove old history items: %s\n
 msgstr Errore nella cancellazione dei vecchi elementi della cronologia: %s\n
 
-#: ../midori/main.c:535
+#: ../midori/main.c:527
 #, c-format
 msgid The configuration couldn't be saved. %s
 msgstr Le impostazioni non possono essere salvate. %s
 
-#: ../midori/main.c:561
+#: ../midori/main.c:553
 #, c-format
 msgid The search engines couldn't be saved. %s
 msgstr I motori di ricerca non possono essere salvati. %s
 
 #. i18n: Trash, or wastebin, containing closed tabs
-#: ../midori/main.c:598
+#: ../midori/main.c:590
 #, c-format
 msgid The trash couldn't be saved. %s
 msgstr Il cestino non può essere salvato. %s
 
-#: ../midori/main.c:671 ../panels/midori-extensions.c:90
+#: ../midori/main.c:663 ../panels/midori-extensions.c:90
 msgid Extensions
 msgstr Estensioni
 
-#: ../midori/main.c:685
+#: ../midori/main.c:677
 msgid Privacy
 msgstr Privacy
 
-#: ../midori/main.c:687
+#: ../midori/main.c:679
 msgid Delete old Cookies after:
 msgstr Elimina i cookie obsoleti dopo:
 
-#: ../midori/main.c:689 ../midori/main.c:692
+#: ../midori/main.c:681 ../midori/main.c:684
 msgid The maximum number of days to save cookies for
 msgstr Numero massimo di giorni per cui possono essere validi i cookie
 
-#: ../midori/main.c:696
+#: ../midori/main.c:688
 msgid Only accept Cookies from sites you visit
 msgstr Accettare i cookie solo dai siti visitati
 
-#: ../midori/main.c:697
+#: ../midori/main.c:689
 msgid Block cookies sent by third-party websites
 msgstr Blocca i cookie inviati da siti di terze parti
 
-#: ../midori/main.c:702
+#: ../midori/main.c:694
 msgid 
 Cookies store login data, saved games, or user profiles for advertisement 
 purposes.
@@ -148,45 +148,45 @@ msgstr 
 I cookie immagazzinano i dati di accesso, i giochi salvati o i profili 
 dell'utente per scopi pubblicitari.
 
-#: ../midori/main.c:709
+#: ../midori/main.c:701
 msgid Enable offline web