[Xfce4-commits] xfce4-mpc-plugin:master Merge branch 'master' of ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

2009-08-20 Thread Landry Breuil
Updating branch refs/heads/master
 to 9a642d13078eb2d8423d0c67fcccdff03686c12c (commit)
   from 505fbc09bbcbc8f3685a71eb7c89c26cb5b5b908 (commit)

commit 9a642d13078eb2d8423d0c67fcccdff03686c12c
Merge: 505fbc09bbcbc8f3685a71eb7c89c26cb5b5b908 
4b6298762f377f8f185f4097630cd4cdc843c868
Author: Landry Breuil lan...@xfce.org
Date:   Thu Aug 20 22:24:18 2009 +0200

Merge branch 'master' of 
ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

commit 4b6298762f377f8f185f4097630cd4cdc843c868
Author: Piarres Beobide p...@beobide.net
Date:   Tue Aug 18 07:46:19 2009 +

l10n: Basque translation update

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

 po/eu.po |   32 +---
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/po/eu.po b/po/eu.po
index e78e4aa..b4590d6 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -1,22 +1,24 @@
+# translation of xfce4-mpc-plugin.master.po to Euskara
 # Basque translations for xfce package.
 # Copyright (C) 2006 THE xfce'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the xfce package.
-# pi p...@beobide.net, 2006.
 #
+# pi p...@beobide.net, 2006.
+# Piarres Beobide p...@beobide.net, 2009.
 msgid 
 msgstr 
-Project-Id-Version: xfce 4-mpc-plugin\n
+Project-Id-Version: xfce4-mpc-plugin.master\n
 Report-Msgid-Bugs-To: \n
 POT-Creation-Date: 2009-07-24 18:13+0200\n
-PO-Revision-Date: 2008-11-09 15:42+0200\n
+PO-Revision-Date: 2009-08-18 09:45+0200\n
 Last-Translator: Piarres Beobide p...@beobide.net\n
-Language-Team: Basque librez...@lbrezale.org\n
+Language-Team: Euskara debian-l10n...@lists.debian.org\n
 MIME-Version: 1.0\n
 Content-Type: text/plain; charset=UTF-8\n
 Content-Transfer-Encoding: 8bit\n
 Language: eu\n
 Plural-Forms: nplurals=2; plural=(n != 1);\n
-X-Generator: Pootle 1.2.0\n
+X-Generator: KBabel 1.11.4\n
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:116
 #: ../panel-plugin/xfce4-mpc-plugin.c:192
@@ -45,39 +47,38 @@ msgid Password : 
 msgstr Pasahitza : 
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:269
-#, fuzzy
 msgid MPD Client : 
-msgstr Bezeroa : 
+msgstr MPD bezeroa : 
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:270
 msgid Tooltip Format : 
-msgstr 
+msgstr Argibide formatua : 
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:271
 msgid Playlist Format : 
-msgstr 
+msgstr Erreprodukzio-zerrenda formatua:
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:305
 msgid Hostname or IP address
-msgstr 
+msgstr Ostalari-izen edo IP helbidea
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:306
 msgid Graphical MPD Client to launch in plugin context menu
-msgstr 
+msgstr MPD bezero grafikoa plugin kontestu menutik abiarazteko
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:307
 msgid Variables : %artist%, %album%, %track% and %title%
-msgstr 
+msgstr Aldagaiak: %artista%, %albuma%, %pista% eta %izenburua%
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:308
 msgid 
 Variables : %vol%, %status%, %newline%, %artist%, %album%, %track% and %title
 %
-msgstr 
+msgstr Aldagaiak: %bol%, %egoera%, %newline%, %artista%, %albuma%, %pista% 
eta %izenburua%
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:313
 msgid Show _frame
-msgstr _Markoa ikusi
+msgstr Ikusi _markoa
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:382
 #: ../panel-plugin/xfce4-mpc-plugin.c:612
@@ -118,4 +119,5 @@ msgstr MPD (Music Player Daemon) bezeroa
 
 #: ../panel-plugin/xfce4-mpc-plugin.desktop.in.in.h:2
 msgid MPD Client Plugin
-msgstr MPD Bezero Plugin-a
+msgstr MPD bezero plugina
+
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Be sure to have libxfcegui4 cflags/libs for xfce_err(), fixes compilation with xfce4-panel 4.7. (Bug #6609) Still needs to be converted to libxfce4ui tho

2010-08-08 Thread Landry Breuil
Updating branch refs/heads/master
 to 35af6821c13a7d20fe7fc31f964178e9fb369dfb (commit)
   from a7198453d027f4a6c0ee59e4561ce67bd8e86b64 (commit)

commit 35af6821c13a7d20fe7fc31f964178e9fb369dfb
Author: Landry Breuil lan...@rhaalovely.net
Date:   Sun Aug 8 10:44:58 2010 +0200

Be sure to have libxfcegui4 cflags/libs for xfce_err(), fixes
compilation with xfce4-panel 4.7. (Bug #6609)
Still needs to be converted to libxfce4ui though..

 configure.in.in  |1 +
 panel-plugin/Makefile.am |6 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index 6ea6bfb..8bbcf55 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -52,6 +52,7 @@ dnl ***
 dnl *** Check for required packages ***
 dnl ***
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.90])
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.90])
 
 dnl ***
 dnl *** Check for debugging support ***
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 604e7be..3c6b0f1 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -22,10 +22,12 @@ xfce4_diskperf_plugin_SOURCES = 
\
devperf.h
 
 xfce4_diskperf_plugin_CFLAGS = \
-   $(LIBXFCE4PANEL_CFLAGS)
+   $(LIBXFCE4PANEL_CFLAGS) \
+   $(LIBXFCEGUI4_CFLAGS)
 
 xfce4_diskperf_plugin_LDADD=   \
-   $(LIBXFCE4PANEL_LIBS)
+   $(LIBXFCE4PANEL_LIBS)   \
+   $(LIBXFCEGUI4_LIBS)
 
 #
 # Desktop file
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Add libxfcegui4 cflags/libs checks to fix build with xfce4-panel 4.7. Bug #6615.

2010-08-08 Thread Landry Breuil
Updating branch refs/heads/master
 to d7f5b8bd8e2b1c5d8fc1e9db8e6f4c8364cdb2c4 (commit)
   from f8e2bf350b828a38c7f914d37a3e78d82c465444 (commit)

commit d7f5b8bd8e2b1c5d8fc1e9db8e6f4c8364cdb2c4
Author: Landry Breuil lan...@rhaalovely.net
Date:   Sun Aug 8 10:58:49 2010 +0200

Add libxfcegui4 cflags/libs checks to fix build with xfce4-panel 4.7.
Bug #6615.

 configure.in.in  |1 +
 panel-plugin/Makefile.am |6 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index a61f2ad..c95bac8 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -50,6 +50,7 @@ XDT_I18N([...@linguas@])
 dnl configure the panel plugin
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.20])
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.20])
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.20])
 XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
 
 dnl Check for debugging support
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index a54e647..5e06216 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -11,7 +11,8 @@ plugin_PROGRAMS = xfce4-wavelan-plugin
 #  libwavelan.la
 
 xfce4_wavelan_plugin_LDFLAGS = 
\
-   @LIBXFCE4PANEL_LIBS@
+   @LIBXFCE4PANEL_LIBS@
\
+   @LIBXFCEGUI4L_LIBS@
 
 xfce4_wavelan_plugin_SOURCES = 
\
wavelan.c   \
@@ -21,7 +22,8 @@ xfce4_wavelan_plugin_SOURCES =
\
wi_linux.c
 
 xfce4_wavelan_plugin_CFLAGS =  
\
-   @LIBXFCE4PANEL_CFLAGS@
+   @LIBXFCE4PANEL_CFLAGS@  
\
+   @LIBXFCEGUI4_CFLAGS@
 
 # .desktop file
 #
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Merge branch 'master' of ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

2010-08-30 Thread Landry Breuil
Updating branch refs/heads/master
 to 2a189d535d93cfba40447bc18b68ecedbc848676 (commit)
   from b3a3084ffe72cbd4e576c282c666365c792718b0 (commit)

commit 2a189d535d93cfba40447bc18b68ecedbc848676
Merge: b3a3084ffe72cbd4e576c282c666365c792718b0 
c416a387cb3d77d06fd79a5bbdfa30f235cdf222
Author: Landry Breuil lan...@xfce.org
Date:   Mon Aug 30 21:19:53 2010 +0200

Merge branch 'master' of 
ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

commit c416a387cb3d77d06fd79a5bbdfa30f235cdf222
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Thu Aug 5 10:00:45 2010 +0200

l10n: Updated Uyghur (ug) translation to 83%

New status: 20 messages complete with 0 fuzzies and 4 untranslated.

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

commit 4b37ccbedff721c932a88e7f8c953d4f853030b7
Author: Gheyret Kenji ghey...@yahoo.com
Date:   Fri Jul 30 04:02:38 2010 +0200

l10n: Uyghur translation

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

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

commit ad7ad2245d396a7a88eb89c42c09ade1b0c01a98
Author: Andres Kovtunos kovtu...@yandex.ru
Date:   Tue May 18 14:03:50 2010 +0200

l10n: Updated Russian (ru) translation to 100%

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

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

 po/ru.po|8 +-
 po/{ja.po = ug.po} |  237 +--
 2 files changed, 121 insertions(+), 124 deletions(-)

diff --git a/po/ru.po b/po/ru.po
index 11f2900..3c56a21 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -22,7 +22,7 @@ msgstr Запустить
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:247
 msgid Mpd Client Plugin
-msgstr Апплет клиента MPD
+msgstr Модуль клиента MPD
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:253
 msgid Properties
@@ -91,11 +91,11 @@ msgstr Повтор
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:697
 msgid Xfce4 Mpc Plugin
-msgstr Xfce4 Mpc апплет
+msgstr Модуль MPC для Xfce4
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:698
 msgid A simple panel-plugin client for Music Player Daemon
-msgstr Простой апплет клиента MPD для панели Xfce
+msgstr Простой модуль клиента MPD для панели Xfce
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:699
 msgid Copyright (c) 2006-2008 Landry Breuil\n
@@ -111,4 +111,4 @@ msgstr Клиент для музыкального сервера MPD
 
 #: ../panel-plugin/xfce4-mpc-plugin.desktop.in.in.h:2
 msgid MPD Client Plugin
-msgstr Апплет клиента MPD
+msgstr Модуль клиента MPD
diff --git a/po/ja.po b/po/ug.po
similarity index 65%
copy from po/ja.po
copy to po/ug.po
index 9b9e928..c80821f 100644
--- a/po/ja.po
+++ b/po/ug.po
@@ -1,120 +1,117 @@
-# Japanese translation of xfce4-mpc-plugin.
-# Copyright (C) 2008 THE xfce4-mpc-plugin'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the xfce4-mpc-plugin 
package.
-# Nobuhiro Iwamatsu iwama...@nigauri.org, 2008.
-#
-# Music Player Daemon(MPD)はそのまま Music Player Daemon としています。
-msgid 
-msgstr 
-Project-Id-Version: xfce4-mpc-plugin\n
-Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2009-07-27 01:40+0900\n
-PO-Revision-Date: 2009-07-26 16:34+0900\n
-Last-Translator: Masato Hashimoto cabezon.hashim...@gmail.com\n
-Language-Team: Japanese xfce-i...@xfce.org@xfce.org\n
-MIME-Version: 1.0\n
-Content-Type: text/plain; charset=utf-8\n
-Content-Transfer-Encoding: 8bit\n
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:119
-#: ../panel-plugin/xfce4-mpc-plugin.c:195
-#: ../panel-plugin/xfce4-mpc-plugin.c:670
-msgid Launch
-msgstr 起動
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:250
-msgid Mpd Client Plugin
-msgstr Mpd クライアントプラグイン
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:256
-msgid Properties
-msgstr 設定
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:269
-msgid Host : 
-msgstr ホスト : 
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:270
-msgid Port : 
-msgstr ポート : 
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:271
-msgid Password : 
-msgstr パスワード : 
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:272
-msgid MPD Client : 
-msgstr MPD クライアント : 
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:273
-msgid Tooltip Format : 
-msgstr ツールチップの形式 : 
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:274
-msgid Playlist Format : 
-msgstr プレイリストの形式 : 
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:308
-msgid Hostname or IP address
-msgstr ホスト名または IP アドレス
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:309
-msgid Graphical MPD Client to launch in plugin context menu
-msgstr 
-プラグインのコンテキストメニューから起動するグラフィカル MPD クライアント
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:310
-msgid Variables : %artist%, %album%, %track% and %title%
-msgstr 変数 : %artist%, %album%, %track% and %title%
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:311
-msgid 
-Variables : %vol%, %status%, %newline%, %artist%, %album%, %track% and %title
-%
-msgstr 
-変数 : %vol%, %status%, %newline%, %artist%, %album%, %track% and %title%
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:316
-msgid Show _frame
-msgstr フレームを表示する(_F)
-
-#: ../panel-plugin/xfce4-mpc-plugin.c:384
-#: ../panel-plugin

[Xfce4-commits] xfce4-mpc-plugin:master Fix build with xfce4-panel 4.7/exo 0.5

2010-08-30 Thread Landry Breuil
Updating branch refs/heads/master
 to b3a3084ffe72cbd4e576c282c666365c792718b0 (commit)
   from 9c85bf33aae319a71d50b5c1c1da283fcc12932b (commit)

commit b3a3084ffe72cbd4e576c282c666365c792718b0
Author: Landry Breuil lan...@xfce.org
Date:   Mon Aug 30 21:17:01 2010 +0200

Fix build with xfce4-panel 4.7/exo 0.5

- when exo-0.3 is not found, try to find exo-1 from exo 0.5 package
- Also link/detect libxfcegui4 now that xfce4-panel in master
doesn't add the corresponding LIBS/CFLAGS
From Samuli Suominen in bz #6623, thanks!

 configure.ac.in  |4 +++-
 panel-plugin/Makefile.am |2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 7b9e80e..9261f53 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -35,7 +35,9 @@ AC_HEADER_STDC
 
 dnl configure the panel plugin
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.22])
-XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.1])
+XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.22])
+XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.1], [],
+   [XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5.0])])
 
 dnl check for libmpd presence
 AC_ARG_WITH(libmpd,
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index d81a4c9..e233a9b 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -4,10 +4,12 @@ plugin_PROGRAMS = xfce4-mpc-plugin
 xfce4_mpc_plugin_CFLAGS =  \
-DPACKAGE_LOCALE_DIR=\$(localedir)\   \
@EXO_CFLAGS@\
+   @LIBXFCEGUI4_CFLAGS@\
@LIBXFCE4PANEL_CFLAGS@
 
 xfce4_mpc_plugin_LDADD =   \
@EXO_LIBS@  \
+   @LIBXFCEGUI4_LIBS@  \
@LIBXFCE4PANEL_LIBS@
 
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master update autogen.sh for newer xdt

2010-01-23 Thread Landry Breuil
Updating branch refs/heads/master
 to 1691c13adcbb682435271dd5634f9e53d3dcc5ab (commit)
   from de1e13e5087d9fa6b43ba0c79bee884f1a85756b (commit)

commit 1691c13adcbb682435271dd5634f9e53d3dcc5ab
Author: Landry Breuil lan...@rhaalovely.net
Date:   Sat Jan 23 12:17:52 2010 +0100

update autogen.sh for newer xdt

 autogen.sh |   34 --
 1 files changed, 12 insertions(+), 22 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 72c275d..d3b7588 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,35 +1,25 @@
 #!/bin/sh
 #
-# $Id: autogen.sh 2257 2006-12-19 19:49:00Z nick $
-#
-# Copyright (c) 2002-2007
+# Copyright (c) 2002-2009
 # The Xfce development team. All rights reserved.
 #
+# Written for Xfce by Benedikt Meurer be...@xfce.org
+# and Brian Tarricone br...@tarricone.org.
+#
+
+export XDT_AUTOGEN_REQUIRED_VERSION=4.7.0
 
 (type xdt-autogen) /dev/null 21 || {
   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.
-Please install the xfce4-dev-tools package first, it is available
+autogen.sh: You don't seem to have the Xfce development tools (at least
+version $XDT_REQURED_VERSION) installed on your system, which
+are required to build this software.
+Please install the xfce4-dev-tools package first; it is available
 from http://www.xfce.org/.
 EOF
   exit 1
 }
 
-# verify that po/LINGUAS is present
-(test -f po/LINGUAS) /dev/null 21 || {
-  cat 2 EOF
-autogen.sh: The file po/LINGUAS could not be found. Please check your snapshot
-or try to checkout again.
-EOF
-  exit 1
-}
-
-# substitute revision and linguas
-linguas=`sed -e '/^#/d' po/LINGUAS`
-revision=`LC_ALL=C svn info $0 | awk '/^Revision: / {printf %04d\n, $2}'`
-sed -e s/@LINGUAS@/${linguas}/g \
--e s/@REVISION@/${revision}/g \
- configure.in.in  configure.in
+exec xdt-autogen $@
 
-exec xdt-autogen $@
+# vi:set ts=2 sw=2 et ai:
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Don't disable the input title entry in config dialog when label is not shown

2010-01-23 Thread Landry Breuil
Updating branch refs/heads/master
 to 27cfb3cdcea2ea0b6bcaf42fa16332abee207ace (commit)
   from 50b6646f085b5ca14533f5c8428af90ee75c7826 (commit)

commit 27cfb3cdcea2ea0b6bcaf42fa16332abee207ace
Author: Landry Breuil lan...@rhaalovely.net
Date:   Sat Jan 23 12:18:33 2010 +0100

Don't disable the input title entry in config dialog when label is not shown

Regardless of label being shown or not in the panel,
the title appears in plugin tooltip, so it should still
be configurable.
From bug #6176

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

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 1e3c07f..fe6d508 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -654,8 +654,6 @@ static void ToggleTitle (Widget_t p_w, void *p_pvPlugin)
 
 poConf-fTitleDisplayed =
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (p_w));
-gtk_widget_set_sensitive (GTK_WIDGET (poGUI-wTF_Title),
- poConf-fTitleDisplayed);
 if (poConf-fTitleDisplayed)
gtk_widget_show (GTK_WIDGET (poMonitor-wTitle));
 else
@@ -947,8 +945,6 @@ static void diskperf_create_options (XfcePanelPlugin 
*plugin,
 
 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (poGUI-wTB_Title),
  poConf-fTitleDisplayed);
-gtk_widget_set_sensitive (GTK_WIDGET (poGUI-wTF_Title),
- poConf-fTitleDisplayed);
 g_signal_connect (GTK_WIDGET (poGUI-wTB_Title), toggled,
  G_CALLBACK (ToggleTitle), poPlugin);
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master use git for version_tag

2010-01-23 Thread Landry Breuil
Updating branch refs/heads/master
 to 50b6646f085b5ca14533f5c8428af90ee75c7826 (commit)
   from 1691c13adcbb682435271dd5634f9e53d3dcc5ab (commit)

commit 50b6646f085b5ca14533f5c8428af90ee75c7826
Author: Landry Breuil lan...@rhaalovely.net
Date:   Sat Jan 23 12:18:23 2010 +0100

use git for version_tag

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

diff --git a/configure.in.in b/configure.in.in
index b74ab97..6ea6bfb 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -8,9 +8,9 @@ dnl
 m4_define([diskperf_version_major], [2])
 m4_define([diskperf_version_minor], [2])
 m4_define([diskperf_version_micro], [0])
-m4_define([diskperf_version_build], [...@revision@])
-m4_define([diskperf_version_tag], []) # leave empty for releases
-m4_define([diskperf_version], 
[diskperf_version_major().diskperf_version_minor().diskperf_version_micro()ifelse(diskperf_version_tag(),
 [svn], [diskperf_version_tag()-diskperf_version_build()], 
[diskperf_version_tag()])])
+m4_define([diskperf_version_build], [...@revision@])
+m4_define([diskperf_version_tag], [git]) # leave empty for releases
+m4_define([diskperf_version], 
[diskperf_version_major().diskperf_version_minor().diskperf_version_micro()ifelse(diskperf_version_tag(),
 [git], [diskperf_version_tag()-diskperf_version_build()], 
[diskperf_version_tag()])])
 
 dnl ***
 dnl *** Initialize autoconf ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master drop .pot file

2010-01-23 Thread Landry Breuil
Updating branch refs/heads/master
 to de1e13e5087d9fa6b43ba0c79bee884f1a85756b (commit)
   from 6ec6fca2e448739be609c33c8e2cb51fd70b3495 (commit)

commit de1e13e5087d9fa6b43ba0c79bee884f1a85756b
Author: Landry Breuil lan...@rhaalovely.net
Date:   Sat Jan 23 12:17:16 2010 +0100

drop .pot file

 po/xfce4-diskperf-plugin.pot |  263 --
 1 files changed, 0 insertions(+), 263 deletions(-)

diff --git a/po/xfce4-diskperf-plugin.pot b/po/xfce4-diskperf-plugin.pot
deleted file mode 100644
index 8a9480e..000
--- a/po/xfce4-diskperf-plugin.pot
+++ /dev/null
@@ -1,263 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR em...@address, YEAR.
-#
-#, fuzzy
-msgid 
-msgstr 
-Project-Id-Version: PACKAGE VERSION\n
-Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2006-09-10 21:29+0200\n
-PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n
-Last-Translator: FULL NAME em...@address\n
-Language-Team: LANGUAGE l...@li.org\n
-MIME-Version: 1.0\n
-Content-Type: text/plain; charset=CHARSET\n
-Content-Transfer-Encoding: 8bit\n
-
-#: ../panel-plugin/config_gui.c:108
-msgid About...
-msgstr 
-
-#: ../panel-plugin/config_gui.c:123
-msgid Disk Performance
-msgstr 
-
-#: ../panel-plugin/config_gui.c:136
-msgid Device
-msgstr 
-
-#: ../panel-plugin/config_gui.c:150
-msgid Input the device name, then press Enter
-msgstr 
-
-#: ../panel-plugin/config_gui.c:153
-msgid /dev/hda1
-msgstr 
-
-#: ../panel-plugin/config_gui.c:171
-msgid Data collection period
-msgstr 
-
-#: ../panel-plugin/config_gui.c:174
-msgid Update interval (s) 
-msgstr 
-
-#: ../panel-plugin/config_gui.c:182
-msgid Label
-msgstr 
-
-#: ../panel-plugin/config_gui.c:187
-msgid Tick to display label
-msgstr 
-
-#: ../panel-plugin/config_gui.c:196
-msgid Input the label, then press Enter
-msgstr 
-
-#: ../panel-plugin/config_gui.c:198
-msgid hda1
-msgstr 
-
-#: ../panel-plugin/config_gui.c:208
-msgid Monitor
-msgstr 
-
-#: ../panel-plugin/config_gui.c:213
-msgid I/O transfer
-msgstr 
-
-#: ../panel-plugin/config_gui.c:216
-msgid MB transferred / second
-msgstr 
-
-#: ../panel-plugin/config_gui.c:222
-msgid Busy time
-msgstr 
-
-#: ../panel-plugin/config_gui.c:226
-msgid Percentage of time the device is busy
-msgstr 
-
-#: ../panel-plugin/config_gui.c:237
-msgid Max. I/O rate (MB/s) 
-msgstr 
-
-#: ../panel-plugin/config_gui.c:248
-msgid Input the maximum I/O transfer rate of the device, then press Enter
-msgstr 
-
-#: ../panel-plugin/config_gui.c:251
-msgid 35
-msgstr 
-
-#: ../panel-plugin/config_gui.c:258
-msgid Combine Read/Write data
-msgstr 
-
-#: ../panel-plugin/config_gui.c:263
-msgid Combine Read/Write data into one single monitor?
-msgstr 
-
-#: ../panel-plugin/config_gui.c:270
-msgid Bar color 
-msgstr 
-
-#: ../panel-plugin/config_gui.c:284 ../panel-plugin/config_gui.c:349
-#: ../panel-plugin/config_gui.c:357
-msgid Press to change color
-msgstr 
-
-#: ../panel-plugin/config_gui.c:290
-msgid Read bar color 
-msgstr 
-
-#: ../panel-plugin/config_gui.c:298
-msgid Write bar color 
-msgstr 
-
-#: ../panel-plugin/config_gui.c:306
-msgid Bar order
-msgstr 
-
-#: ../panel-plugin/config_gui.c:321
-msgid Read-Write
-msgstr 
-
-#: ../panel-plugin/config_gui.c:326
-msgid \Read\ monitor first
-msgstr 
-
-#: ../panel-plugin/config_gui.c:333
-msgid Write-Read
-msgstr 
-
-#: ../panel-plugin/config_gui.c:338
-msgid \Write\ monitor first
-msgstr 
-
-#: ../panel-plugin/main.c:809
-msgid Select color
-msgstr 
-
-#: ../panel-plugin/main.c:858
-#, c-format
-msgid 
-%s\n
-%s: %s (%d)\n
-\n
-This monitor will not work!\n
-Please remove it.
-msgstr 
-
-#: ../panel-plugin/main.c:868
-#, c-format
-msgid 
-%s: No disk extended statistics found!\n
-Either old kernel ( 2.4.20) or not\n
-compiled with CONFIG_BLK_STATS turned on.\n
-\n
-This monitor will not work!\n
-Please remove it.
-msgstr 
-
-#: ../panel-plugin/main.c:875
-#, c-format
-msgid 
-%s: Unknown error\n
-\n
-This monitor will not work!\n
-Please remove it.
-msgstr 
-
-#: ../panel-plugin/main.c:887
-#, c-format
-msgid 
-%s %s - Disk Performance Monitor\n
-Display instantaneous disk I/O transfer rates and busy times on Linux and 
-NetBSD systems\n
-\n
-(c) 2003, 2004 Roger Seguin roger_seg...@msn.com\n
-NetBSD statistics collection: (c) 2003 Benedikt Meurer\n
-\tbenedikt.meu...@unix-ag.uni-siegen.de
-msgstr 
-
-#: ../panel-plugin/main.c:926
-msgid Configuration
-msgstr 
-
-#. 
-#.
-#. $Log: main.c,v $
-#. Revision 1.7  2004/08/25 10:08:40  rogerms
-#. DiskPerf 1.5
-#.
-#. Revision 1.14  2004/08/25 08:51:02  RogerSeguin
-#. MT support and About... dialog box added
-#.
-#. Revision 1.6  2003/11/11 12:40:34  rogerms
-#. Release 1.4
-#.
-#. Revision 1.13  2003/11/11 12:12:42  RogerSeguin
-#. Force to single total busy time monitor when platform doesn't provide 
separate read and write data (e.g. NetBSD

[Xfce4-commits] xfce4-diskperf-plugin:master Apply color settings upon plugin startup.

2010-01-23 Thread Landry Breuil
Updating branch refs/heads/master
 to 3e94c2c0f40f81098676c6839b5f6feb357307da (commit)
   from 27cfb3cdcea2ea0b6bcaf42fa16332abee207ace (commit)

commit 3e94c2c0f40f81098676c6839b5f6feb357307da
Author: Landry Breuil lan...@rhaalovely.net
Date:   Sat Jan 23 12:59:51 2010 +0100

Apply color settings upon plugin startup.

From Launchpad #232123, fwded' by Lionel Le Folgoc, thanks!

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

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index fe6d508..b43201b 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -553,6 +553,7 @@ static void diskperf_read_config (XfcePanelPlugin *plugin,
 if ((value = xfce_rc_read_entry (rc, (CONF_READ_WRITE_COLOR), NULL))) {
 gdk_color_parse (value, poConf-aoColor + RW_DATA);
 }
+SetMonitorBarColor (poPlugin);
 
 xfce_rc_close (rc);
 }  /* diskperf_read_config() */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Update for 0.3.4 release.

2009-11-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 8776e8dc12bc8649f2756c305501c7138f60d011 (commit)
   from 7189c143a0e7becec7ebfe4fa21f1a883c196098 (commit)

commit 8776e8dc12bc8649f2756c305501c7138f60d011
Author: Landry Breuil lan...@xfce.org
Date:   Tue Nov 3 21:46:35 2009 +0100

Update for 0.3.4 release.

 ChangeLog   |2 +-
 README  |2 +-
 TODO|2 --
 configure.ac.in |4 ++--
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5aa1f6f..5045601 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-xx-xx-2009 Landry Breuil landry at fr.homeunix.org
+03-11-2009 Landry Breuil landry at fr.homeunix.org
* release 0.3.4
* add user-configurable markup for playlist and tooltip
* properly resize buttons icons
diff --git a/README b/README
index 7bf74bb..e711ed2 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 Xfce4-Mpc-Plugin
 
 
-This is a simple Musicpd (http://www.musicpd.org) client plugin for the Xfce 
4.4 panel.
+This is a simple Musicpd (http://www.musicpd.org) client plugin for the Xfce 
panel.
 Features :
 - next/stop/play/pause/previous buttons
 - current volume/status/playing track when mouse passes over the plugin
diff --git a/TODO b/TODO
index c5b3075..5e7af2d 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
-- improve playlist management, keep it persistent instead of creating it on 
each middle-click
-- add configurable title display string (with %artist%, %title%, %track%, 
%album%...) in tooltip and playlist
 - support multiple outputs enabling/disabling
 - add volume progressbar/slider ?
 - fix all strings length checking
diff --git a/configure.ac.in b/configure.ac.in
index 0d9a292..1c113c4 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -5,8 +5,8 @@ dnl
 
 m4_define([mpc_version_major], [0])
 m4_define([mpc_version_minor], [3])
-m4_define([mpc_version_micro], [3])
-m4_define([mpc_version_tag], [git]) # Leave empty for releases
+m4_define([mpc_version_micro], [4])
+m4_define([mpc_version_tag], []) # Leave empty for releases
 m4_define([mpc_version_build], [...@revision@])
 m4_define([mpc_version], 
[mpc_version_major().mpc_version_minor().mpc_version_micro()ifelse(mpc_version_tag(),
 [], [], [mpc_version_tag()-mpc_version_build()])])
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin|xfce4-mpc-plugin-0.3.4 Creating annotated tag xfce4-mpc-plugin-0.3.4

2009-11-03 Thread Landry Breuil
Updating annotated tag refs/tags/xfce4-mpc-plugin-0.3.4
 as new annotated tag
 to 7aa5c590b1c0f90b7981e528b9efb27baea1e292 (tag)
   succeeds 0.3.3-64-g7189c14
  tagged by Landry Breuil lan...@xfce.org
 on 2009-11-03 20:50 +

Landry Breuil (1):
  Update for 0.3.4 release.

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-taskmanager:master Implement fetching of swap stats

2010-05-13 Thread Landry Breuil
Updating branch refs/heads/master
 to 10247249ebb5aec6041876151c53085ce20c6192 (commit)
   from e5ad1842bf9721567ad0c93e7081ba5c24496088 (commit)

commit 10247249ebb5aec6041876151c53085ce20c6192
Author: Landry Breuil lan...@rhaalovely.net
Date:   Thu May 13 19:56:51 2010 +0200

Implement fetching of swap stats

 src/task-manager-bsd.c |   27 ---
 1 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/src/task-manager-bsd.c b/src/task-manager-bsd.c
index 1c21974..5c73d91 100644
--- a/src/task-manager-bsd.c
+++ b/src/task-manager-bsd.c
@@ -163,6 +163,8 @@ gboolean get_memory_usage (guint64 *memory_total, guint64 
*memory_free, guint64
 {
int mib[] = {CTL_VM, VM_METER};
struct vmtotal vmtotal;
+   struct swapent *swdev;
+   int nswap, i;
size_t size;
size = sizeof(vmtotal);
if (sysctl(mib, 2, vmtotal, size, NULL, 0)  0)
@@ -172,9 +174,28 @@ gboolean get_memory_usage (guint64 *memory_total, guint64 
*memory_free, guint64
*memory_free = pagetok(vmtotal.t_free);
*memory_cache = 0;
*memory_buffers = pagetok(vmtotal.t_rm - vmtotal.t_arm);
-   /* XXX:TODO */
-   *swap_total = 0;
-   *swap_free = 0;
+
+   /* get swap stats */
+   if ((nswap = swapctl(SWAP_NSWAP, 0, 0)) == 0)
+   errx(1,failed to get swap device count);
+
+   if ((swdev = calloc(nswap, sizeof(*swdev))) == NULL)
+   errx(1,failed to allocate memory for swdev structures);
+
+   if (swapctl(SWAP_STATS, swdev, nswap) == -1) {
+   free(swdev);
+   errx(1,failed to get swap stats);
+   }
+
+   /* Total things up */
+   *swap_total = *swap_free = 0;
+   for (i = 0; i  nswap; i++) {
+   if (swdev[i].se_flags  SWF_ENABLE) {
+   *swap_free += ((swdev[i].se_nblks - swdev[i].se_inuse) 
/ (1024 / DEV_BSIZE));
+   *swap_total += (swdev[i].se_nblks / (1024 / DEV_BSIZE));
+   }
+   }
+   free(swdev);
return TRUE;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-taskmanager:master Fix missing includes, remove unused variables

2010-05-13 Thread Landry Breuil
Updating branch refs/heads/master
 to e5ad1842bf9721567ad0c93e7081ba5c24496088 (commit)
   from 3acd33040055d460b7c901bd88a6ffc40e9fc827 (commit)

commit e5ad1842bf9721567ad0c93e7081ba5c24496088
Author: Landry Breuil lan...@rhaalovely.net
Date:   Thu May 13 19:56:10 2010 +0200

Fix missing includes, remove unused variables

 src/task-manager-bsd.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/task-manager-bsd.c b/src/task-manager-bsd.c
index 2e94083..1c21974 100644
--- a/src/task-manager-bsd.c
+++ b/src/task-manager-bsd.c
@@ -24,10 +24,15 @@
 #include sys/param.h
 #include sys/sched.h
 #include sys/sysctl.h
+/* for swapctl() */
+#include sys/swap.h
 /* for kill() */
 #include signal.h
 #include err.h
-
+/* for strlcpy() */
+#include string.h
+/* for getpagesize() */
+#include unistd.h
 #include task-manager.h
 
 char   *state_abbrev[] = {
@@ -41,14 +46,9 @@ gboolean get_task_list (GArray *task_list)
struct kinfo_proc2 *kp;
Task t;
struct passwd *passwdp;
-   double d;
char **args, **ptr;
char buf[127];
int nproc, i;
-   fixpt_t ccpu; /* The scheduler exponential decay value. */
-   int fscale; /* The kernel fixed-point scale factor. */
-
-// task_list = g_array_new (FALSE, FALSE, sizeof (struct task));
 
mib[0] = CTL_KERN;
mib[1] = KERN_PROC2;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-taskmanager:master correctly implement set_priority/send_signal_to_pid()

2010-05-13 Thread Landry Breuil
Updating branch refs/heads/master
 to 44dc437214888be0b21d25830976a76a88a4bd20 (commit)
   from 10247249ebb5aec6041876151c53085ce20c6192 (commit)

commit 44dc437214888be0b21d25830976a76a88a4bd20
Author: Landry Breuil lan...@rhaalovely.net
Date:   Thu May 13 19:57:37 2010 +0200

correctly implement set_priority/send_signal_to_pid()

 src/task-manager-bsd.c |   36 ++--
 1 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/src/task-manager-bsd.c b/src/task-manager-bsd.c
index 5c73d91..a7fd71f 100644
--- a/src/task-manager-bsd.c
+++ b/src/task-manager-bsd.c
@@ -203,27 +203,35 @@ gboolean send_signal_to_pid (guint task_id, gint signal)
 {
gint ret = 0;
if(task_id  0  signal != 0)
-   {
-   
ret = kill(task_id, signal);
-/*
-   if(ret != 0)
-   xfce_err(_(Couldn't send signal %d to the task with ID 
%d), signal, task_id);
-*/ }
-   return ret;
+   return (ret == 0) ? TRUE : FALSE;
 }
 
 
 gboolean set_priority_to_pid (guint task_id, gint prio)
 {
-   if(task_id  0)
+   gint res;
+   switch (prio)
{
-   gchar command[128] = ;
-   /* TODO : syscall */
-   g_snprintf(command, 128, renice %d %d  /dev/null, prio, 
task_id);
-   
-   if(system(command) != 0)
-   ;//xfce_err(_(Couldn't set priority %d to the task 
with ID %d), prio, task_id);
+   case XTM_PRIORITY_VERY_LOW:
+   prio = 15;
+   break;
+   case XTM_PRIORITY_LOW:
+   prio = 5;
+   break;
+   case XTM_PRIORITY_NORMAL:
+   prio = 0;
+   break;
+   case XTM_PRIORITY_HIGH:
+   prio = -5;
+   break;
+   case XTM_PRIORITY_VERY_HIGH:
+   prio = -15;
+   break;
+   default:
+   return TRUE;
}
+   res = setpriority (PRIO_PROCESS, task_id, prio);
+   return (res == 0) ? TRUE : FALSE;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Add checkitems in rightclick menu to enable/disable mpd outputs

2010-05-13 Thread Landry Breuil
Updating branch refs/heads/master
 to 8f2a1057581138457e7a1d29ab279d7002c87b57 (commit)
   from d652109b6c91a31285e9fc479f1c7a7ca3106b03 (commit)

commit 8f2a1057581138457e7a1d29ab279d7002c87b57
Author: Landry Breuil lan...@xfce.org
Date:   Thu May 13 23:01:45 2010 +0200

Add checkitems in rightclick menu to enable/disable mpd outputs

- add mpc_output_toggled() callback for checkitems to change output device 
status on mpd server
- add mpc_update_outputs() called when mouse hovers the plugin :
  traverse the list of known output, update their status
  if not found, create a new checkitem and add it to rightclick menu
- add corresponding t_mpd_output struct in headers

currently, this requires mpd_server_set_output_device(),
mpd_server_get_output_devices() and mpd_data_get_next(),
so this will only work when built against libmpd.
Equivalent code to come in simple-libmpd.{c,h}...

 panel-plugin/xfce4-mpc-plugin.c |   54 +++
 panel-plugin/xfce4-mpc-plugin.h |9 ++
 2 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/xfce4-mpc-plugin.c b/panel-plugin/xfce4-mpc-plugin.c
index b073146..37f6f48 100644
--- a/panel-plugin/xfce4-mpc-plugin.c
+++ b/panel-plugin/xfce4-mpc-plugin.c
@@ -347,6 +347,57 @@ mpc_repeat_toggled(GtkWidget *widget, t_mpc* mpc)
mpd_player_set_repeat(mpc-mo, 
gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)));
 }
 
+static void
+mpc_output_toggled(GtkWidget *widget, t_mpc* mpc)
+{
+   DBG(!);
+   int i;
+   /* lookup menuitem */
+   for (i = 0; i  mpc-nb_outputs  mpc-mpd_outputs[i]-menuitem != widget; 
i++);
+   if (i != mpc-nb_outputs) /* oops case ? */
+  /* set corresponding mpd output status */
+  mpd_server_set_output_device(mpc-mo, mpc-mpd_outputs[i]-id, 
gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)));
+}
+
+/* get output list from mpd, add a checkbox to rightclick menu for each */
+static void
+mpc_update_outputs(t_mpc* mpc)
+{
+   DBG(!);
+   int i,j=0;
+   MpdData * data = mpd_server_get_output_devices(mpc-mo);
+   do {
+  DBG(got output %d with name %s, 
enabled=%d,data-output_dev-id,data-output_dev-name,data-output_dev-enabled);
+  /* check if this output doesn't already exist */
+  for (i = 0; i  mpc-nb_outputs  mpc-mpd_outputs[i]-id != 
data-output_dev-id ; i++);
+
+  if (i == mpc-nb_outputs) {
+ DBG(output not found, adding a new checkitem at pos %d,i);
+ GtkWidget* chkitem = gtk_check_menu_item_new_with_label 
(data-output_dev-name);
+ g_signal_connect (G_OBJECT(chkitem), toggled, G_CALLBACK 
(mpc_output_toggled), mpc);
+ 
xfce_panel_plugin_menu_insert_item(mpc-plugin,GTK_MENU_ITEM(chkitem));
+ gtk_widget_show (chkitem);
+ mpc-mpd_outputs[i] = g_new(t_mpd_output,1);
+ mpc-mpd_outputs[i]-id = data-output_dev-id;
+ mpc-mpd_outputs[i]-menuitem = chkitem;
+ mpc-nb_outputs++;
+  }
+  mpc-mpd_outputs[i]-enabled = data-output_dev-enabled;
+  
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mpc-mpd_outputs[i]-menuitem),
 mpc-mpd_outputs[i]-enabled);
+  j++;
+   } while (NULL != (data = mpd_data_get_next (data)));
+   /* something changed, better prune the list and recreate it */
+   /* TODO: test this codepath */
+   if (j != mpc-nb_outputs) {
+  DBG(didnt found same amount of outputs (was %d got %d), resetting 
output list, mpc-nb_outputs, j);
+  for (i = 0; i  mpc-nb_outputs ; i++) {
+ gtk_widget_destroy(mpc-mpd_outputs[i]-menuitem);
+ g_free(mpc-mpd_outputs[i]);
+  }
+  mpc-nb_outputs = 0;
+  mpc_update_outputs(mpc);
+   }
+}
 
 void
 str_replace(GString *str, gchar* pattern, gchar* replacement)
@@ -418,6 +469,7 @@ enter_cb(GtkWidget *widget, GdkEventCrossing* event, t_mpc* 
mpc)
 
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mpc-random), 
mpd_player_get_random(mpc-mo));
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(mpc-repeat), 
mpd_player_get_repeat(mpc-mo));
+   mpc_update_outputs(mpc);
 
gtk_widget_set_tooltip_text (widget, str-str);
g_string_free(str, TRUE);
@@ -736,6 +788,8 @@ mpc_construct (XfcePanelPlugin * plugin)
mpc-playlist_format = g_strdup(%artist% - %album% -/- (#%track%) 
%title%);
mpc-show_frame = TRUE;
mpc-playlist = NULL;
+   mpc-mpd_outputs = g_new(t_mpd_output*,1);
+   mpc-nb_outputs = 0;
 
mpc_read_config (plugin, mpc);
 
diff --git a/panel-plugin/xfce4-mpc-plugin.h b/panel-plugin/xfce4-mpc-plugin.h
index 8f8e6e8..c128078 100644
--- a/panel-plugin/xfce4-mpc-plugin.h
+++ b/panel-plugin/xfce4-mpc-plugin.h
@@ -32,6 +32,13 @@
 #endif /* !HAVE_LIBMPD */
 
 typedef struct {
+   GtkWidget* menuitem;
+   gchar* name;
+   gint id;
+   gint enabled;
+} t_mpd_output;
+
+typedef struct {
XfcePanelPlugin *plugin;
GtkWidget 
*frame,*ebox,*box,*prev,*stop,*toggle,*next,*random,*repeat,*appl,*about;
GtkWidget *playlist

[Xfce4-commits] xfce4-mpc-plugin:master Merge branch 'master' of ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

2010-05-13 Thread Landry Breuil
Updating branch refs/heads/master
 to d652109b6c91a31285e9fc479f1c7a7ca3106b03 (commit)
   from 77d2f38bb35b6ba7d9e5e06a517ef5cc480bd48c (commit)

commit d652109b6c91a31285e9fc479f1c7a7ca3106b03
Merge: 77d2f38bb35b6ba7d9e5e06a517ef5cc480bd48c 
d2d820b382dbf2d8fdd9b6cfdf4408b9f181ba3a
Author: Landry Breuil lan...@xfce.org
Date:   Mon May 10 22:17:21 2010 +0200

Merge branch 'master' of 
ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

commit d2d820b382dbf2d8fdd9b6cfdf4408b9f181ba3a
Author: Fabian Nowak timyst...@arcor.de
Date:   Sat Mar 27 20:11:23 2010 +0100

l10n: Updated German (de) translation to 100%

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

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

commit d77c46f8afc0f81ac3ebaa0f039b67d5fe747ad1
Author: Fabian Nowak timyst...@arcor.de
Date:   Sat Mar 27 20:09:08 2010 +0100

l10n: Updated German (de) translation to 100%

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

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

commit 78516bc366444298319bbd196cd48447f64cae88
Author: Fabian Nowak timyst...@arcor.de
Date:   Sat Mar 27 20:07:21 2010 +0100

l10n: Updated German (de) translation to 95%

New status: 23 messages complete with 1 fuzzy and 0 untranslated.

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

commit 39e77746c55fed338237425aa0e4689cff7fe102
Author: Dmitry Nikitin luckas...@mail.ru
Date:   Wed Mar 17 12:51:25 2010 +0100

l10n: Updated Ukrainian (uk) translation to 100%

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

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

commit d342474db4707c8a30d78340214b733defa72a5b
Author: Dmitrij Smirnov a...@cnc-parts.info
Date:   Tue Mar 9 19:50:07 2010 +0100

l10n: Updated Russian (ru) translation to 100%

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

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

commit 6d4fcf13bf266865836e6e4c461b57d7900f2758
Author: Andres Kovtunos kovtu...@yandex.ru
Date:   Tue Mar 9 18:42:26 2010 +0100

l10n: Initial Russian translation.

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

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

commit 7eddcd7088d7b70d22c3889f6d9df49c84096b77
Author: Robert Hartl hartl.rob...@gmail.com
Date:   Mon Mar 8 10:47:47 2010 +0100

l10n: Updated Slovak (sk) translation to 95%

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

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

commit 66228766267df6a12aaeb0ec2df2816dea1c920a
Author: Paul Seyfert pseyf...@mathphys.fsk.uni-heidelberg.de
Date:   Sat Feb 27 21:37:14 2010 +0100

l10n: Updated German (de) translation to 87%

New status: 21 messages complete with 1 fuzzy and 2 untranslated.

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

commit 002e0ff37121f66135dd4b0a8a819d43f65d71f0
Author: Michal Várady miko.v...@gmail.com
Date:   Mon Jan 4 17:51:10 2010 +

l10n: Updates to Czech (cs) translation

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

commit b8c969205ed4e397aaf44597aee558930b18c65c
Author: Cristian Marchi cri.pe...@gmail.com
Date:   Wed Dec 30 20:05:31 2009 +

l10n: Updates to Italian (it) translation

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

commit 5712671a6951a762181dce4a7d507d3f172de2f4
Author: Cristian Marchi cri.pe...@gmail.com
Date:   Wed Dec 30 19:53:17 2009 +

l10n: Updates to Italian (it) translation

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

commit 7293c9fb9b7e9929c6abd3ba949e5e1f68804961
Author: Daniel Nylander p...@danielnylander.se
Date:   Wed Dec 16 16:28:13 2009 +

l10n: Updates to Swedish (sv) translation

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

commit 06c5bb82e775fb44f64d42d7b7be234b2b761015
Author: Xu Meihong mhun...@gmail.com
Date:   Mon Nov 9 12:07:21 2009 +

l10n: Updates to Chinese (China) (zh_CN) translation

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

commit 672748208e02fe52e3a793c3f5f7382b06d30b7b
Author: Robert Hartl hartl.rob...@gmail.com
Date:   Thu Nov 5 16:06:14 2009 +

l10n: Slovak translation

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

 po/cs.po|   28 +
 po/de.po|   31 +++-
 po/it.po|   32 +++-
 po/{es.po = ru.po} |   63 +++-
 po/{cs.po = sk.po} |   66 +++---
 po/sv.po|   22 +++-
 po/uk.po|   21 +++-
 po/zh_CN.po |   34 +-
 8 files changed, 137 insertions(+), 160 deletions(-)

diff --git a/po/cs.po b/po/cs.po
index 87c101a..67ef1c0

[Xfce4-commits] xfce4-mpc-plugin:master switch back to dev mode

2010-05-13 Thread Landry Breuil
Updating branch refs/heads/master
 to 77d2f38bb35b6ba7d9e5e06a517ef5cc480bd48c (commit)
   from 8776e8dc12bc8649f2756c305501c7138f60d011 (commit)

commit 77d2f38bb35b6ba7d9e5e06a517ef5cc480bd48c
Author: Landry Breuil lan...@xfce.org
Date:   Tue Nov 3 22:25:11 2009 +0100

switch back to dev mode

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

diff --git a/configure.ac.in b/configure.ac.in
index 1c113c4..29cf8eb 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -6,7 +6,7 @@ dnl
 m4_define([mpc_version_major], [0])
 m4_define([mpc_version_minor], [3])
 m4_define([mpc_version_micro], [4])
-m4_define([mpc_version_tag], []) # Leave empty for releases
+m4_define([mpc_version_tag], [git]) # Leave empty for releases
 m4_define([mpc_version_build], [...@revision@])
 m4_define([mpc_version], 
[mpc_version_major().mpc_version_minor().mpc_version_micro()ifelse(mpc_version_tag(),
 [], [], [mpc_version_tag()-mpc_version_build()])])
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Add add_separator_and_label_with_markup() helper and use it in mpc_create()

2010-05-14 Thread Landry Breuil
Updating branch refs/heads/master
 to 7e0dbc4b630506ee65e0428d4a64e0f67e6aa55b (commit)
   from 8f2a1057581138457e7a1d29ab279d7002c87b57 (commit)

commit 7e0dbc4b630506ee65e0428d4a64e0f67e6aa55b
Author: Landry Breuil lan...@xfce.org
Date:   Fri May 14 18:00:35 2010 +0200

Add add_separator_and_label_with_markup() helper and use it in mpc_create()

Adds a GtkSeparatorMenuItem + a GtkMenuItem set as insensitive and using 
markup
This commits adds two new strings for translators..

 panel-plugin/xfce4-mpc-plugin.c |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/xfce4-mpc-plugin.c b/panel-plugin/xfce4-mpc-plugin.c
index 37f6f48..595b04e 100644
--- a/panel-plugin/xfce4-mpc-plugin.c
+++ b/panel-plugin/xfce4-mpc-plugin.c
@@ -687,6 +687,21 @@ new_button_with_cbk(XfcePanelPlugin * plugin, GtkWidget 
*parent, gpointer cb, gp
return button;
 }
 
+static void
+add_separator_and_label_with_markup(XfcePanelPlugin* plugin, gchar* lbl)
+{
+   GtkWidget *separator, *menuitem, *label;
+   separator = gtk_separator_menu_item_new();
+   menuitem = gtk_menu_item_new_with_label(_(lbl));
+   gtk_widget_set_sensitive(menuitem, FALSE);
+   label = gtk_bin_get_child(GTK_BIN(menuitem));
+   gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
+   xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(separator));
+   xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(menuitem));
+   gtk_widget_show (separator);
+   gtk_widget_show (menuitem);
+}
+
 static t_mpc*
 mpc_create (XfcePanelPlugin * plugin)
 {
@@ -723,9 +738,12 @@ mpc_create (XfcePanelPlugin * plugin)
g_signal_connect (G_OBJECT(mpc-repeat), toggled, G_CALLBACK 
(mpc_repeat_toggled), mpc);
mpc-appl = gtk_menu_item_new_with_label (_(Launch));
g_signal_connect (G_OBJECT(mpc-appl), activate, G_CALLBACK 
(mpc_launch_client), mpc);
+
+   add_separator_and_label_with_markup(plugin, biCommands/i/b);
xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(mpc-random));
xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(mpc-repeat));
xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(mpc-appl));
+   add_separator_and_label_with_markup(plugin, biOutputs/i/b);
gtk_widget_show (mpc-repeat);
gtk_widget_show (mpc-random);
gtk_widget_show (mpc-appl);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master wip on MpdData output/song

2010-05-14 Thread Landry Breuil
Updating branch refs/heads/master
 to d4c56c062c3918c3ab112d9bb578d2f27ec026e2 (commit)
   from c33b5635fe368f7f38f4568185aa14ff4c7d8198 (commit)

commit d4c56c062c3918c3ab112d9bb578d2f27ec026e2
Author: Landry Breuil lan...@xfce.org
Date:   Fri May 14 18:39:32 2010 +0200

wip on MpdData output/song

- skeleton for parse_outputs_answer()
- basic implem for mpd_server_get_output_devices() ripped from 
mpd_playlist_get_current_song()
- switch on md-type in mpd_data_get_next() to correctly work on output/song

 panel-plugin/simple-libmpd.c |   49 --
 1 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index 232591e..c597634 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -434,6 +434,12 @@ void parse_playlistinfo_answer(MpdObj *mo, void *param)
DBG(Got 'OK', md-nb = %d, md-nb);
 }
 
+void parse_outputs_answer(MpdObj *mo, void *param)
+{
+   MpdData* md = (MpdData*) param;
+   mpd_Song* ms;
+}
+
 mpd_Song* mpd_playlist_get_current_song(MpdObj* mo)
 {
DBG(!);
@@ -471,6 +477,7 @@ MpdData* mpd_playlist_get_changes(MpdObj* mo, int 
old_playlist_id)
 {
MpdData* md = g_new0(MpdData,1);
md-cur = md-nb = 0;
+   md-type = MPD_DATA_TYPE_SONG;
md-allsongs = g_new(mpd_Song, mo-playlistlength);
DBG(!);
send_complex_cmd(mo, playlistinfo\n, parse_playlistinfo_answer, (void*) 
md);
@@ -486,23 +493,51 @@ MpdData* mpd_data_get_next(MpdData* md)
{
   for (md-cur--; md-cur; md-cur--)
   {
- if (md-allsongs[md-cur].file) free(md-allsongs[md-cur].file);
- if (md-allsongs[md-cur].artist) free(md-allsongs[md-cur].artist);
- if (md-allsongs[md-cur].album) free(md-allsongs[md-cur].album);
- if (md-allsongs[md-cur].title) free(md-allsongs[md-cur].title);
- if (md-allsongs[md-cur].track) free(md-allsongs[md-cur].track);
+ switch (md-type) {
+case MPD_DATA_TYPE_OUTPUT_DEV:
+if (md-alloutputs[md-cur].name) 
free(md-alloutputs[md-cur].name);
+break;
+case MPD_DATA_TYPE_SONG:
+if (md-allsongs[md-cur].file) free(md-allsongs[md-cur].file);
+if (md-allsongs[md-cur].artist) 
free(md-allsongs[md-cur].artist);
+if (md-allsongs[md-cur].album) free(md-allsongs[md-cur].album);
+if (md-allsongs[md-cur].title) free(md-allsongs[md-cur].title);
+if (md-allsongs[md-cur].track) free(md-allsongs[md-cur].track);
+break;
+ }
+  }
+  switch (md-type) {
+ case MPD_DATA_TYPE_OUTPUT_DEV:
+g_free(md-alloutputs);
+break;
+ case MPD_DATA_TYPE_SONG:
+g_free(md-allsongs);
+break;
   }
-  g_free(md-allsongs);
   g_free(md);
   DBG(Free()'d md);
   return NULL;
}
-   md-song = (md-allsongs[md-cur]);
+   switch (md-type) {
+  case MPD_DATA_TYPE_OUTPUT_DEV:
+ md-output_dev = (md-alloutputs[md-cur]);
+ break;
+  case MPD_DATA_TYPE_SONG:
+ md-song = (md-allsongs[md-cur]);
+ break;
+   }
return md;
 }
 
 MpdData* mpd_server_get_output_devices(MpdObj* mo)
 {
+   MpdData* md = g_new0(MpdData,1);
+   DBG(!);
+   md-cur = md-nb = 0;
+   md-type = MPD_DATA_TYPE_OUTPUT_DEV;
+   send_complex_cmd(mo, outputs\n, parse_outputs_answer, (void*) md);
+   md-output_dev = (md-alloutputs[0]);
+   return ((!mo-error) ? md : NULL);
 }
 
 int mpd_server_set_output_device (MpdObj* mo, int id, int state)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Add skeleton for getting/setting outputs in simple-libmpd

2010-05-14 Thread Landry Breuil
Updating branch refs/heads/master
 to 43bea1d2dccfc9c124f2bda144d5ae33b1943e4b (commit)
   from 7e0dbc4b630506ee65e0428d4a64e0f67e6aa55b (commit)

commit 43bea1d2dccfc9c124f2bda144d5ae33b1943e4b
Author: Landry Breuil lan...@xfce.org
Date:   Fri May 14 18:22:27 2010 +0200

Add skeleton for getting/setting outputs in simple-libmpd

adds mpd_server_get_output_devices(), mpd_server_set_output_device(),
mpd_Output struct and amend MpdData struct to also hold it.

 panel-plugin/simple-libmpd.c |8 
 panel-plugin/simple-libmpd.h |   19 +++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index d62e8ac..232591e 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -501,6 +501,14 @@ MpdData* mpd_data_get_next(MpdData* md)
return md;
 }
 
+MpdData* mpd_server_get_output_devices(MpdObj* mo)
+{
+}
+
+int mpd_server_set_output_device (MpdObj* mo, int id, int state)
+{
+}
+
 void mpd_status_set_volume(MpdObj* mo, int newvol)
 {
char outbuf[15];
diff --git a/panel-plugin/simple-libmpd.h b/panel-plugin/simple-libmpd.h
index f314bac..1bc7752 100644
--- a/panel-plugin/simple-libmpd.h
+++ b/panel-plugin/simple-libmpd.h
@@ -51,6 +51,12 @@ typedef struct {
 } mpd_Song;
 
 typedef struct {
+   int id;
+   char* name;
+   int enabled;
+} mpd_Output;
+
+typedef struct {
gchar* host;
int port;
gchar* pass;
@@ -68,12 +74,23 @@ typedef struct {
int buflen;
 } MpdObj;
 
+typedef enum {
+   MPD_DATA_TYPE_SONG,
+   MPD_DATA_TYPE_OUTPUT_DEV
+} MpdDataType;
+
 /* here, i must cheat, too hard to follow libmpd's behaviour */
 typedef struct {
+   /* holds type = song or output */
+   MpdDataType type;
/* ptr to current song */
mpd_Song* song;
/* vector of all songs in playlist */
mpd_Song* allsongs;
+   /* ptr to current output */
+   mpd_Output* output_dev;
+   /* vector of all outputs */
+   mpd_Output* alloutputs;
int nb;
int cur;
 } MpdData;
@@ -96,6 +113,8 @@ int mpd_player_get_current_song_pos(MpdObj*);
 MpdData* mpd_playlist_get_changes(MpdObj*, int);
 MpdData* mpd_data_get_next(MpdData*);
 mpd_Song* mpd_playlist_get_current_song(MpdObj*);
+MpdData* mpd_server_get_output_devices(MpdObj*);
+int mpd_server_set_output_device (MpdObj*, int, int);
 int mpd_playlist_get_playlist_length(MpdObj*);
 int mpd_check_error(MpdObj*);
 void mpd_set_hostname(MpdObj*, char*);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Implement parse_outputs_answer(), ripped from parse_playlistinfo_answer()

2010-05-14 Thread Landry Breuil
Updating branch refs/heads/master
 to 5584c44866f8e46ae9edc2b8301a5051b84124da (commit)
   from d4c56c062c3918c3ab112d9bb578d2f27ec026e2 (commit)

commit 5584c44866f8e46ae9edc2b8301a5051b84124da
Author: Landry Breuil lan...@xfce.org
Date:   Sat May 15 00:01:49 2010 +0200

Implement parse_outputs_answer(), ripped from parse_playlistinfo_answer()

use an array of ptrs for alloutputs as we don't know how many outputs we 
have

 panel-plugin/simple-libmpd.c |   31 +++
 panel-plugin/simple-libmpd.h |2 +-
 2 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index c597634..e3c95c1 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -437,7 +437,29 @@ void parse_playlistinfo_answer(MpdObj *mo, void *param)
 void parse_outputs_answer(MpdObj *mo, void *param)
 {
MpdData* md = (MpdData*) param;
-   mpd_Song* ms;
+   gchar **lines, **tokens;
+   int i = 0;
+   lines = g_strsplit(mo-buffer, \n, 0);
+   while(lines[i]  strcmp(lines[i],OK))
+   {
+  md-alloutputs[md-nb] = g_new(mpd_Output, 1);
+  md-alloutputs[md-nb]-enabled = -1;
+  DBG(Going to parse output #%d, md-nb);
+  while(lines[i]  md-alloutputs[md-nb]-enabled  0)
+  {
+ tokens = g_strsplit(lines[i], :, 2);
+ /* remove leading whitespace */
+ tokens[1] = g_strchug(tokens[1]);
+ DBG(key=\%s\,value=\%s\, tokens[0], tokens[1]);
+ if  (0 == strcmp(outputid,tokens[0])) 
md-alloutputs[md-nb]-id = atoi(tokens[1]);
+ else if (0 == strcmp(outputname,tokens[0])) 
md-alloutputs[md-nb]-name = g_strdup(tokens[1]);
+ else if (0 == strcmp(outputenabled,tokens[0])) 
md-alloutputs[md-nb]-enabled = atoi(tokens[1]);
+ i++;
+ g_strfreev(tokens);
+  }
+  md-nb++;
+   }
+   g_strfreev(lines);
 }
 
 mpd_Song* mpd_playlist_get_current_song(MpdObj* mo)
@@ -495,7 +517,7 @@ MpdData* mpd_data_get_next(MpdData* md)
   {
  switch (md-type) {
 case MPD_DATA_TYPE_OUTPUT_DEV:
-if (md-alloutputs[md-cur].name) 
free(md-alloutputs[md-cur].name);
+if (md-alloutputs[md-cur]-name) 
free(md-alloutputs[md-cur]-name);
 break;
 case MPD_DATA_TYPE_SONG:
 if (md-allsongs[md-cur].file) free(md-allsongs[md-cur].file);
@@ -520,7 +542,7 @@ MpdData* mpd_data_get_next(MpdData* md)
}
switch (md-type) {
   case MPD_DATA_TYPE_OUTPUT_DEV:
- md-output_dev = (md-alloutputs[md-cur]);
+ md-output_dev = md-alloutputs[md-cur];
  break;
   case MPD_DATA_TYPE_SONG:
  md-song = (md-allsongs[md-cur]);
@@ -534,9 +556,10 @@ MpdData* mpd_server_get_output_devices(MpdObj* mo)
MpdData* md = g_new0(MpdData,1);
DBG(!);
md-cur = md-nb = 0;
+   md-alloutputs = g_new(mpd_Output*,1);
md-type = MPD_DATA_TYPE_OUTPUT_DEV;
send_complex_cmd(mo, outputs\n, parse_outputs_answer, (void*) md);
-   md-output_dev = (md-alloutputs[0]);
+   md-output_dev = md-alloutputs[0];
return ((!mo-error) ? md : NULL);
 }
 
diff --git a/panel-plugin/simple-libmpd.h b/panel-plugin/simple-libmpd.h
index 1bc7752..6adfbe4 100644
--- a/panel-plugin/simple-libmpd.h
+++ b/panel-plugin/simple-libmpd.h
@@ -90,7 +90,7 @@ typedef struct {
/* ptr to current output */
mpd_Output* output_dev;
/* vector of all outputs */
-   mpd_Output* alloutputs;
+   mpd_Output** alloutputs;
int nb;
int cur;
 } MpdData;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master place gettext _() calls where the text actually is

2010-05-15 Thread Landry Breuil
Updating branch refs/heads/master
 to c7c6783f05344cf875b3ebce0d488a407bf1b2e4 (commit)
   from 6270c18d3ccf0731a86ca9d43a90399a79043d1a (commit)

commit c7c6783f05344cf875b3ebce0d488a407bf1b2e4
Author: Landry Breuil lan...@xfce.org
Date:   Sat May 15 09:41:42 2010 +0200

place gettext _() calls where the text actually is

 panel-plugin/xfce4-mpc-plugin.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/xfce4-mpc-plugin.c b/panel-plugin/xfce4-mpc-plugin.c
index 5715cfc..9a40a5b 100644
--- a/panel-plugin/xfce4-mpc-plugin.c
+++ b/panel-plugin/xfce4-mpc-plugin.c
@@ -692,7 +692,7 @@ add_separator_and_label_with_markup(XfcePanelPlugin* 
plugin, gchar* lbl)
 {
GtkWidget *separator, *menuitem, *label;
separator = gtk_separator_menu_item_new();
-   menuitem = gtk_menu_item_new_with_label(_(lbl));
+   menuitem = gtk_menu_item_new_with_label(lbl);
gtk_widget_set_sensitive(menuitem, FALSE);
label = gtk_bin_get_child(GTK_BIN(menuitem));
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
@@ -739,11 +739,11 @@ mpc_create (XfcePanelPlugin * plugin)
mpc-appl = gtk_menu_item_new_with_label (_(Launch));
g_signal_connect (G_OBJECT(mpc-appl), activate, G_CALLBACK 
(mpc_launch_client), mpc);
 
-   add_separator_and_label_with_markup(plugin, biCommands/i/b);
+   add_separator_and_label_with_markup(plugin, _(biCommands/i/b));
xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(mpc-random));
xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(mpc-repeat));
xfce_panel_plugin_menu_insert_item(plugin,GTK_MENU_ITEM(mpc-appl));
-   add_separator_and_label_with_markup(plugin, biOutputs/i/b);
+   add_separator_and_label_with_markup(plugin, _(biOutputs/i/b));
gtk_widget_show (mpc-repeat);
gtk_widget_show (mpc-random);
gtk_widget_show (mpc-appl);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master prepare for 0.3.6 release

2011-01-07 Thread Landry Breuil
Updating branch refs/heads/master
 to 6b677fedb8df6513babb2be16ac94466112f6293 (commit)
   from 5f414709c0081fa545f569d9ca7ec185fe337f94 (commit)

commit 6b677fedb8df6513babb2be16ac94466112f6293
Author: Landry Breuil lan...@xfce.org
Date:   Fri Jan 7 17:47:16 2011 +0100

prepare for 0.3.6 release

 ChangeLog   |4 
 configure.ac.in |2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d9cdde3..4137053 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+07-01-2011 Landry Breuil landry at rhaalovely.net
+   * release 0.3.6
+   * recognize exo-1 for upcoming Xfce 4.8
+
 17-05-2010 Landry Breuil landry at fr.homeunix.org
* release 0.3.5
* add enable/disable outputs in rightclick menu
diff --git a/configure.ac.in b/configure.ac.in
index 9261f53..d0c1cfb 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -5,7 +5,7 @@ dnl
 
 m4_define([mpc_version_major], [0])
 m4_define([mpc_version_minor], [3])
-m4_define([mpc_version_micro], [5])
+m4_define([mpc_version_micro], [6])
 m4_define([mpc_version_tag], []) # Leave empty for releases
 m4_define([mpc_version_build], [...@revision@])
 m4_define([mpc_version], 
[mpc_version_major().mpc_version_minor().mpc_version_micro()ifelse(mpc_version_tag(),
 [], [], [mpc_version_tag()-mpc_version_build()])])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin|xfce4-mpc-plugin-0.3.6 Creating annotated tag xfce4-mpc-plugin-0.3.6

2011-01-08 Thread Landry Breuil
Updating annotated tag refs/tags/xfce4-mpc-plugin-0.3.6
 as new annotated tag
 to cea7372da4fdb2a9c26d5e1c3ea151a086d319b5 (tag)
   succeeds xfce4-mpc-plugin-0.3.5
  tagged by Landry Breuil lan...@xfce.org
 on 2011-01-08 13:30 +

Andres Kovtunos (1):
  l10n: Updated Russian (ru) translation to 100%

Gheyret Kenji (2):
  l10n: Uyghur translation
  l10n: Updated Uyghur (ug) translation to 83%

Landry Breuil (9):
  Fix build with xfce4-panel 4.7/exo 0.5
  Merge branch 'master' of 
ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin
  it costs nothing to reset/drop mo-buffer in this error case.
  Try to be more robust to rogue data in 
parse_playlistinfo_answer()/parse_outputs_answer()
  backout previous in parse_playlistinfo_answer, as we play tricks with 
fake OKs
  finally backout all previous commit, was wrong
  finally, only bail out if a rogue OK is found in read buffer
  Merge branch 'master' of 
ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin
  prepare for 0.3.6 release

Sergio Marques (1):
  l10n: Updated Portuguese (pt) translation to 100%

Xavier Devlamynck (1):
  l10n: Updated French (fr) translation to 100%

forfolias (2):
  l10n: add greek translation
  l10n: Updated Greek (el) translation to 100%

___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Port to libxfce4ui/libxfce4panel 4.8

2011-01-21 Thread Landry Breuil
Updating branch refs/heads/master
 to 2bb3290aa681f37bccedd3ba38f99eb62a727969 (commit)
   from 6b677fedb8df6513babb2be16ac94466112f6293 (commit)

commit 2bb3290aa681f37bccedd3ba38f99eb62a727969
Author: Landry Breuil lan...@xfce.org
Date:   Fri Jan 21 19:29:26 2011 +0100

Port to libxfce4ui/libxfce4panel 4.8

- depend on latest version of libs, drop dependency on libxfcegui4
- replace old $(libexecdir)/xfce4/panel-plugins path by newer 
$(libdir)/xfce4/panel/plugins
- replace xfce_themed_icon_load() by xfce_panel_pixbuf_from_source()
- replace xfce_exec() by xfce_spawn_command_line_on_screen()
- replace xfce_create_panel_button() by xfce_panel_create_button()
- replace xfce_about_info_new()  friends by regular gtk_show_about_dialog()
- fix libxfce4panel headers inclusion
- update email in AUTHORS  comments

 AUTHORS |2 +-
 configure.ac.in |7 ++--
 panel-plugin/Makefile.am|   10 +++---
 panel-plugin/xfce4-mpc-plugin.c |   48 ---
 panel-plugin/xfce4-mpc-plugin.desktop.in.in |2 +-
 panel-plugin/xfce4-mpc-plugin.h |6 +--
 6 files changed, 33 insertions(+), 42 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index 6035b13..3ff0490 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1 @@
-Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
+Landry Breuil landry at rhaalovely.net
diff --git a/configure.ac.in b/configure.ac.in
index d0c1cfb..f3fa345 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -34,10 +34,9 @@ dnl Check for standard header files
 AC_HEADER_STDC
 
 dnl configure the panel plugin
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.22])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.22])
-XDT_CHECK_PACKAGE([EXO], [exo-0.3], [0.3.1.1], [],
-   [XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5.0])])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
+XDT_CHECK_PACKAGE([EXO], [exo-1], [0.5.0])
 
 dnl check for libmpd presence
 AC_ARG_WITH(libmpd,
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index e233a9b..a99f218 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,15 +1,15 @@
-plugindir = $(libexecdir)/xfce4/panel-plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 plugin_PROGRAMS = xfce4-mpc-plugin
 
 xfce4_mpc_plugin_CFLAGS =  \
-DPACKAGE_LOCALE_DIR=\$(localedir)\   \
@EXO_CFLAGS@\
-   @LIBXFCEGUI4_CFLAGS@\
+   @LIBXFCE4UI_CFLAGS@ \
@LIBXFCE4PANEL_CFLAGS@
 
 xfce4_mpc_plugin_LDADD =   \
@EXO_LIBS@  \
-   @LIBXFCEGUI4_LIBS@  \
+   @LIBXFCE4UI_LIBS@   \
@LIBXFCE4PANEL_LIBS@
 
 
@@ -31,13 +31,13 @@ endif
 desktop_in_in_files = xfce4-mpc-plugin.desktop.in.in
 desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)

-desktopdir = $(datadir)/xfce4/panel-plugins
+desktopdir = $(datadir)/xfce4/panel/plugins
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
 # get full path into .desktop file
 %.desktop.in: %.desktop.in.in
-   sed -e s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^ \
+   sed -e s^@PLUGIN_PATH@^$(libdir)/xfce4/panel/plugins^ \
$  $@

 EXTRA_DIST =   \
diff --git a/panel-plugin/xfce4-mpc-plugin.c b/panel-plugin/xfce4-mpc-plugin.c
index bf0ae2c..35965b8 100644
--- a/panel-plugin/xfce4-mpc-plugin.c
+++ b/panel-plugin/xfce4-mpc-plugin.c
@@ -1,8 +1,8 @@
 /* xfce4-mpc-plugin.c
  *
- * Copyright (c) 2006-2010 Landry Breuil (landry at fr.homeunix.org / gaston 
at gcu.info)
- * This code is licenced under a BSD-style licence.
- * (OpenBSD variant modeled after the ISC licence)
+ * Copyright (c) 2006-2011 Landry Breuil landry at rhaalovely.net
+ * This code is licensed under a BSD-style license.
+ * (OpenBSD variant modeled after the ISC license)
  * All rights reserved.
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -22,7 +22,7 @@
 #include config.h
 #endif
 
-#include libxfcegui4/libxfcegui4.h
+#include libxfce4ui/libxfce4ui.h
 #include exo/exo.h
 #include string.h
 #include stdlib.h
@@ -47,7 +47,7 @@ static void
 button_set_sized_image(GtkWidget *button, gchar *icon, gint size)
 {
GtkWidget *image;
-   image = gtk_image_new_from_pixbuf(xfce_themed_icon_load(icon, size

[Xfce4-commits] xfce4-mpc-plugin:master it costs nothing to reset/drop mo-buffer in this error case.

2010-10-16 Thread Landry Breuil
Updating branch refs/heads/master
 to d2f05a30067b53c3155e1af6efd25a12f4ae1dc5 (commit)
   from 2a189d535d93cfba40447bc18b68ecedbc848676 (commit)

commit d2f05a30067b53c3155e1af6efd25a12f4ae1dc5
Author: Landry Breuil lan...@xfce.org
Date:   Sat Oct 16 12:08:52 2010 +0200

it costs nothing to reset/drop mo-buffer in this error case.

 panel-plugin/simple-libmpd.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index 0084358..d035957 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -291,6 +291,8 @@ void send_complex_cmd(MpdObj* mo, char* cmd, void 
(*parse_answer_fct)(), void *r
  {
 mo-error = MPD_ERROR_CONNCLOSED;
 DBG(ERROR parsing reply);
+*mo-buffer = '\0';
+mo-buflen = 0;
 return;
  }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Try to be more robust to rogue data in parse_playlistinfo_answer()/parse_outputs_answer()

2010-10-16 Thread Landry Breuil
Updating branch refs/heads/master
 to a562cabe0cabec9ea478db8ad9c3579afe2146fc (commit)
   from d2f05a30067b53c3155e1af6efd25a12f4ae1dc5 (commit)

commit a562cabe0cabec9ea478db8ad9c3579afe2146fc
Author: Landry Breuil lan...@xfce.org
Date:   Sat Oct 16 12:14:55 2010 +0200

Try to be more robust to rogue data in 
parse_playlistinfo_answer()/parse_outputs_answer()

while looping on the parsing of an output or a song, check if we
get an ok (which should not happen in normal case). If so, gracefully
exit the parsing.
only increment song/output counter if the parsing was ok.

 panel-plugin/simple-libmpd.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index d035957..63e1689 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -414,7 +414,7 @@ void parse_playlistinfo_answer(MpdObj *mo, void *param)
   ms-id = ms-pos = -1;
   DBG(Going to parse song #%d, md-nb);
 
-  while(lines[i]  ms-id  0)
+  while(lines[i]  strcmp(lines[i],OK)  ms-id  0)
   {
  tokens = g_strsplit(lines[i], :, 2);
  /* remove leading whitespace */
@@ -430,7 +430,8 @@ void parse_playlistinfo_answer(MpdObj *mo, void *param)
  i++;
  g_strfreev(tokens);
   }
-  md-nb++;
+  if (lines[i]  strcmp(lines[i],OK))
+ md-nb++;
}
g_strfreev(lines);
DBG(Got 'OK', md-nb = %d, md-nb);
@@ -447,7 +448,7 @@ void parse_outputs_answer(MpdObj *mo, void *param)
   md-alloutputs[md-nb] = g_new(mpd_Output, 1);
   md-alloutputs[md-nb]-enabled = -1;
   DBG(Going to parse output #%d, md-nb);
-  while(lines[i]  md-alloutputs[md-nb]-enabled  0)
+  while(lines[i]  strcmp(lines[i],OK)  
md-alloutputs[md-nb]-enabled  0)
   {
  tokens = g_strsplit(lines[i], :, 2);
  /* remove leading whitespace */
@@ -459,7 +460,8 @@ void parse_outputs_answer(MpdObj *mo, void *param)
  i++;
  g_strfreev(tokens);
   }
-  md-nb++;
+  if (lines[i]  strcmp(lines[i],OK))
+ md-nb++;
}
g_strfreev(lines);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master finally, only bail out if a rogue OK is found in read buffer

2010-10-16 Thread Landry Breuil
Updating branch refs/heads/master
 to 2a58794661890cc004ee8f07bd4e29cfc44b07c1 (commit)
   from 81db0ad8ac76663a9aac1b04813ea24d87bb5ed0 (commit)

commit 2a58794661890cc004ee8f07bd4e29cfc44b07c1
Author: Landry Breuil lan...@xfce.org
Date:   Sat Oct 16 12:36:17 2010 +0200

finally, only bail out if a rogue OK is found in read buffer

 panel-plugin/simple-libmpd.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index d035957..a7b3cb3 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -414,7 +414,7 @@ void parse_playlistinfo_answer(MpdObj *mo, void *param)
   ms-id = ms-pos = -1;
   DBG(Going to parse song #%d, md-nb);
 
-  while(lines[i]  ms-id  0)
+  while(lines[i]  strcmp(lines[i],OK)  ms-id  0)
   {
  tokens = g_strsplit(lines[i], :, 2);
  /* remove leading whitespace */
@@ -447,7 +447,7 @@ void parse_outputs_answer(MpdObj *mo, void *param)
   md-alloutputs[md-nb] = g_new(mpd_Output, 1);
   md-alloutputs[md-nb]-enabled = -1;
   DBG(Going to parse output #%d, md-nb);
-  while(lines[i]  md-alloutputs[md-nb]-enabled  0)
+  while(lines[i]  strcmp(lines[i],OK)  
md-alloutputs[md-nb]-enabled  0)
   {
  tokens = g_strsplit(lines[i], :, 2);
  /* remove leading whitespace */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master finally backout all previous commit, was wrong

2010-10-16 Thread Landry Breuil
Updating branch refs/heads/master
 to 81db0ad8ac76663a9aac1b04813ea24d87bb5ed0 (commit)
   from 389a8c83f6430af7e13b378bad4f6841fde45462 (commit)

commit 81db0ad8ac76663a9aac1b04813ea24d87bb5ed0
Author: Landry Breuil lan...@xfce.org
Date:   Sat Oct 16 12:31:30 2010 +0200

finally backout all previous commit, was wrong

 panel-plugin/simple-libmpd.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index 1913308..d035957 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -447,7 +447,7 @@ void parse_outputs_answer(MpdObj *mo, void *param)
   md-alloutputs[md-nb] = g_new(mpd_Output, 1);
   md-alloutputs[md-nb]-enabled = -1;
   DBG(Going to parse output #%d, md-nb);
-  while(lines[i]  strcmp(lines[i],OK)  
md-alloutputs[md-nb]-enabled  0)
+  while(lines[i]  md-alloutputs[md-nb]-enabled  0)
   {
  tokens = g_strsplit(lines[i], :, 2);
  /* remove leading whitespace */
@@ -459,8 +459,7 @@ void parse_outputs_answer(MpdObj *mo, void *param)
  i++;
  g_strfreev(tokens);
   }
-  if (lines[i]  strcmp(lines[i],OK))
- md-nb++;
+  md-nb++;
}
g_strfreev(lines);
 }
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master backout previous in parse_playlistinfo_answer, as we play tricks with fake OKs

2010-10-16 Thread Landry Breuil
Updating branch refs/heads/master
 to 389a8c83f6430af7e13b378bad4f6841fde45462 (commit)
   from a562cabe0cabec9ea478db8ad9c3579afe2146fc (commit)

commit 389a8c83f6430af7e13b378bad4f6841fde45462
Author: Landry Breuil lan...@xfce.org
Date:   Sat Oct 16 12:29:43 2010 +0200

backout previous in parse_playlistinfo_answer, as we play tricks with fake 
OKs

 panel-plugin/simple-libmpd.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index 63e1689..1913308 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -414,7 +414,7 @@ void parse_playlistinfo_answer(MpdObj *mo, void *param)
   ms-id = ms-pos = -1;
   DBG(Going to parse song #%d, md-nb);
 
-  while(lines[i]  strcmp(lines[i],OK)  ms-id  0)
+  while(lines[i]  ms-id  0)
   {
  tokens = g_strsplit(lines[i], :, 2);
  /* remove leading whitespace */
@@ -430,8 +430,7 @@ void parse_playlistinfo_answer(MpdObj *mo, void *param)
  i++;
  g_strfreev(tokens);
   }
-  if (lines[i]  strcmp(lines[i],OK))
- md-nb++;
+  md-nb++;
}
g_strfreev(lines);
DBG(Got 'OK', md-nb = %d, md-nb);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Merge branch 'master' of ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

2010-10-16 Thread Landry Breuil
Updating branch refs/heads/master
 to b8513ea9cc555293641499a7a12a320553b81e7d (commit)
   from 2a58794661890cc004ee8f07bd4e29cfc44b07c1 (commit)

commit b8513ea9cc555293641499a7a12a320553b81e7d
Merge: 2a58794661890cc004ee8f07bd4e29cfc44b07c1 
5479152c87a41ea7232e10e7be86d2313173b933
Author: Landry Breuil lan...@xfce.org
Date:   Sat Oct 16 12:36:48 2010 +0200

Merge branch 'master' of 
ssh://git.xfce.org/git/panel-plugins/xfce4-mpc-plugin

commit 5479152c87a41ea7232e10e7be86d2313173b933
Author: Xavier Devlamynck magicrhe...@ouranos.be
Date:   Wed Sep 15 15:51:01 2010 +0200

l10n: Updated French (fr) translation to 100%

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

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

 po/fr.po |   38 +-
 1 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/po/fr.po b/po/fr.po
index eacbef8..56075e4 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -2,7 +2,7 @@
 # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR em...@address, YEAR.
-#
+# 
 msgid 
 msgstr 
 Project-Id-Version: xfce4-mpc-plugin 0.1.0\n
@@ -21,7 +21,7 @@ msgstr 
 #: ../panel-plugin/xfce4-mpc-plugin.c:192
 #: ../panel-plugin/xfce4-mpc-plugin.c:673
 msgid Launch
-msgstr 
+msgstr Lancer
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:247
 msgid Mpd Client Plugin
@@ -44,35 +44,32 @@ msgid Password : 
 msgstr Mot de passe :
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:269
-#, fuzzy
 msgid MPD Client : 
-msgstr Greffon de client MPD
+msgstr Client MPD :
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:270
 msgid Tooltip Format : 
-msgstr 
+msgstr Format de l'info-bulle :
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:271
 msgid Playlist Format : 
-msgstr 
+msgstr Format de la liste de lecture :
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:305
 msgid Hostname or IP address
-msgstr 
+msgstr Nom d'hôte ou adresse IP
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:306
 msgid Graphical MPD Client to launch in plugin context menu
-msgstr 
+msgstr Client MPD grahique à lancer dans le menu contextuel du plug-in
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:307
 msgid Variables : %artist%, %album%, %track% and %title%
-msgstr 
+msgstr Variables : %artist%, %album%, %track% and %title%
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:308
-msgid 
-Variables : %vol%, %status%, %newline%, %artist%, %album%, %track% and %title
-%
-msgstr 
+msgid Variables : %vol%, %status%, %newline%, %artist%, %album%, %track% and 
%title%
+msgstr Variables : %vol%, %status%, %newline%, %artist%, %album%, %track% and 
%title%
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:313
 msgid Show _frame
@@ -85,32 +82,31 @@ msgstr ... non connecté ?
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:465
 msgid Mpd playlist
-msgstr 
+msgstr Liste de lecture Mpd
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:669
 msgid Random
-msgstr 
+msgstr Aléatoire
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:671
 msgid Repeat
-msgstr 
+msgstr Répétition
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:697
 msgid Xfce4 Mpc Plugin
-msgstr 
+msgstr Plugin Mpc pour Xfce4
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:698
-#, fuzzy
 msgid A simple panel-plugin client for Music Player Daemon
-msgstr Un client pour MPD, Music Player Daemon
+msgstr Un plug-in simple du panneau pour Music Player Daemon
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:699
 msgid Copyright (c) 2006-2008 Landry Breuil\n
-msgstr 
+msgstr Copyright (c) 2006-2008 Landry Breuil\n
 
 #: ../panel-plugin/xfce4-mpc-plugin.c:701
 msgid Maintainer, Original Author
-msgstr 
+msgstr Maintainer, Original Author
 
 #: ../panel-plugin/xfce4-mpc-plugin.desktop.in.in.h:1
 msgid A client for MPD, The Music Player Daemon
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Require xdt 4.9.0, fix typo in autogen.sh while here

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 550e0b5177784b47500ccdfd6c9ccb84e7f103c4 (commit)
   from 34825275e7413f0e4c9e307525be6cdc9011c398 (commit)

commit 550e0b5177784b47500ccdfd6c9ccb84e7f103c4
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 14:28:52 2012 +0200

Require xdt 4.9.0, fix typo in autogen.sh while here

 autogen.sh  |4 ++--
 configure.ac.in |3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index d3b7588..661ea20 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,12 +7,12 @@
 # and Brian Tarricone br...@tarricone.org.
 #
 
-export XDT_AUTOGEN_REQUIRED_VERSION=4.7.0
+export XDT_AUTOGEN_REQUIRED_VERSION=4.9.0
 
 (type xdt-autogen) /dev/null 21 || {
   cat 2 EOF
 autogen.sh: You don't seem to have the Xfce development tools (at least
-version $XDT_REQURED_VERSION) installed on your system, which
+version $XDT_AUTOGEN_REQUIRED_VERSION) installed on your system, 
which
 are required to build this software.
 Please install the xfce4-dev-tools package first; it is available
 from http://www.xfce.org/.
diff --git a/configure.ac.in b/configure.ac.in
index 0fed682..500317f 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -31,9 +31,6 @@ AC_PROG_INSTALL
 AC_PROG_INTLTOOL
 
 dnl Initialize libtool
-dnl for xdt 4.8
-AC_PROG_LIBTOOL
-dnl for xdt 4.9
 LT_PREREQ([2.2.6])
 LT_INIT([disable-static])
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mpc-plugin:master Better panel version detection, cherrypicked from #8625

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to c74937ed1a51d1ebb67be30108f84fcb86219d52 (commit)
   from 550e0b5177784b47500ccdfd6c9ccb84e7f103c4 (commit)

commit c74937ed1a51d1ebb67be30108f84fcb86219d52
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 15:08:40 2012 +0200

Better panel version detection, cherrypicked from #8625

 panel-plugin/xfce4-mpc-plugin.c |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/xfce4-mpc-plugin.c b/panel-plugin/xfce4-mpc-plugin.c
index 75db1d3..4c4ea1a 100644
--- a/panel-plugin/xfce4-mpc-plugin.c
+++ b/panel-plugin/xfce4-mpc-plugin.c
@@ -32,6 +32,12 @@
 #define DEFAULT_MPD_PORT 6600
 #define DIALOG_ENTRY_WIDTH 20
 
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
+
 #include xfce4-mpc-plugin.h
 
 static void
@@ -43,7 +49,7 @@ mpc_free (XfcePanelPlugin * plugin, t_mpc * mpc)
g_free (mpc);
 }
 
-#if defined (LIBXFCE4PANEL_CHECK_VERSION)  LIBXFCE4PANEL_CHECK_VERSION 
(4,9,0)
+#ifdef HAS_PANEL_49
 static void
 mpc_set_mode (XfcePanelPlugin * plugin, XfcePanelPluginMode mode, t_mpc * mpc)
 {
@@ -70,7 +76,7 @@ mpc_set_orientation (XfcePanelPlugin * plugin, GtkOrientation 
orientation, t_mpc
 static gboolean
 mpc_set_size (XfcePanelPlugin * plugin, int size, t_mpc * mpc)
 {
-#if defined (LIBXFCE4PANEL_CHECK_VERSION)  LIBXFCE4PANEL_CHECK_VERSION 
(4,9,0)
+#ifdef HAS_PANEL_49
 size /= xfce_panel_plugin_get_nrows (plugin);
 #endif
 
@@ -826,7 +832,7 @@ mpc_construct (XfcePanelPlugin * plugin)
g_signal_connect (plugin, free-data, G_CALLBACK (mpc_free), mpc);
g_signal_connect (plugin, save, G_CALLBACK (mpc_write_config), mpc);
g_signal_connect (plugin, size-changed, G_CALLBACK (mpc_set_size), mpc);
-#if defined (LIBXFCE4PANEL_CHECK_VERSION)  LIBXFCE4PANEL_CHECK_VERSION 
(4,9,0)
+#ifdef HAS_PANEL_49
g_signal_connect (plugin, mode-changed, G_CALLBACK (mpc_set_mode), mpc);
 #else
g_signal_connect (plugin, orientation-changed, G_CALLBACK 
(mpc_set_orientation), mpc);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Explicitely link with libm (#7982, #8514)

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 24dc4ee5087a38af4ea4064f476db0600ab0d131 (commit)
   from d835b8eb49f7baa5f3093796301cbbfcaba00cc2 (commit)

commit 24dc4ee5087a38af4ea4064f476db0600ab0d131
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 14:41:03 2012 +0200

Explicitely link with libm (#7982,#8514)

 configure.ac.in  |2 ++
 panel-plugin/Makefile.am |1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index b22f440..bae59a8 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -41,6 +41,8 @@ dnl **
 dnl *** Check for standard headers ***
 dnl **
 AC_HEADER_STDC()
+AC_CHECK_LIBM
+AC_SUBST(LIBM)
 
 dnl **
 dnl *** Check for i18n support ***
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 6a30116..79b2796 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -24,6 +24,7 @@ xfce4_diskperf_plugin_CFLAGS =
\
$(LIBXFCE4UI_CFLAGS)
 
 xfce4_diskperf_plugin_LDADD=   \
+   $(LIBM) \
$(LIBXFCE4PANEL_LIBS)   \
$(LIBXFCE4UI_LIBS)
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master port to libxfce4ui

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to f85bd63e13dbe511bab65b2b36a133083112bada (commit)
   from 799ef3ae1a0e65102e5f9980c3ef1550a319030d (commit)

commit f85bd63e13dbe511bab65b2b36a133083112bada
Author: Andreas Müller schnitzelt...@gmx.de
Date:   Wed Nov 2 18:11:39 2011 +0100

port to libxfce4ui

Signed-off-by: Landry Breuil lan...@xfce.org

 configure.ac.in   |4 ++--
 panel-plugin/Makefile.am  |4 ++--
 panel-plugin/config_gui.c |2 +-
 panel-plugin/config_gui.h |2 +-
 panel-plugin/main.c   |   17 +++--
 5 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index e083872..e0eb74b 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -48,8 +48,8 @@ XDT_I18N([@LINGUAS@])
 dnl ***
 dnl *** Check for required packages ***
 dnl ***
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.90])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.90])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
 
 dnl ***
 dnl *** Check for debugging support ***
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 8f86c9a..6a30116 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -21,11 +21,11 @@ xfce4_diskperf_plugin_SOURCES = 
\
 
 xfce4_diskperf_plugin_CFLAGS = \
$(LIBXFCE4PANEL_CFLAGS) \
-   $(LIBXFCEGUI4_CFLAGS)
+   $(LIBXFCE4UI_CFLAGS)
 
 xfce4_diskperf_plugin_LDADD=   \
$(LIBXFCE4PANEL_LIBS)   \
-   $(LIBXFCEGUI4_LIBS)
+   $(LIBXFCE4UI_LIBS)
 
 #
 # Desktop file
diff --git a/panel-plugin/config_gui.c b/panel-plugin/config_gui.c
index 89f630a..34982bf 100644
--- a/panel-plugin/config_gui.c
+++ b/panel-plugin/config_gui.c
@@ -32,7 +32,7 @@
 #include gtk/gtk.h
 
 #include libxfce4util/libxfce4util.h
-#include libxfcegui4/dialogs.h
+#include libxfce4ui/libxfce4ui.h
 
 
 #define COPYVAL(var, field)((var)-field = field)
diff --git a/panel-plugin/config_gui.h b/panel-plugin/config_gui.h
index aa49838..6b49a94 100644
--- a/panel-plugin/config_gui.h
+++ b/panel-plugin/config_gui.h
@@ -24,7 +24,7 @@
 #include gtk/gtk.h
 
 #include libxfce4util/libxfce4util.h
-#include libxfcegui4/dialogs.h
+#include libxfce4ui/libxfce4ui.h
 
 
 typedef struct gui_t {
diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 43b0390..45020c1 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -25,7 +25,7 @@
 #include gtk/gtk.h
 
 #include libxfce4util/libxfce4util.h
-#include libxfcegui4/libxfcegui4.h
+#include libxfce4ui/libxfce4ui.h
 #include libxfce4panel/xfce-panel-plugin.h
 
 #include stdlib.h
@@ -631,7 +631,8 @@ static void SetDevice (Widget_t p_wTF, void *p_pvPlugin)
 
 status = stat (pcDevice, oStat);
 if (status == -1) {
-   xfce_err (%s\n
+   xfce_dialog_show_error (NULL, NULL,
+  %s\n
  %s: %s (%d),
  PLUGIN_NAME, pcDevice, strerror (errno), errno);
return;
@@ -853,7 +854,8 @@ static int CheckStatsAvailability ()
return (0);
 if (status  0) {
status *= -1;
-   xfce_err (_(%s\n
+   xfce_dialog_show_error (NULL, NULL, 
+  _(%s\n
  %s: %s (%d)\n\n
  This monitor will not work!\n
  Please remove it.),
@@ -863,14 +865,16 @@ static int CheckStatsAvailability ()
 }
 switch (status) {
case NO_EXTENDED_STATS:
-   xfce_err (_(%s: No disk extended statistics found!\n
+   xfce_dialog_show_error (NULL, NULL, 
+  _(%s: No disk extended statistics found!\n
  Either old kernel ( 2.4.20) or not\n
  compiled with CONFIG_BLK_STATS turned on.\n\n
  This monitor will not work!\n
  Please remove it.), PLUGIN_NAME);
break;
default:
-   xfce_err (_(%s: Unknown error\n\n
+   xfce_dialog_show_error (NULL, NULL, 
+  _(%s: Unknown error\n\n
  This monitor will not work!\n
  Please remove it.), PLUGIN_NAME);
 }
@@ -882,7 +886,8 @@ static int CheckStatsAvailability ()
 static void About (Widget_t w, void *unused)
/* Called back when the About button in clicked */
 {
-xfce_info (_(%s %s - Disk Performance Monitor\n
+xfce_dialog_show_info (NULL, NULL, 
+   _(%s %s - Disk Performance Monitor\n
   Display instantaneous disk I/O transfer rates and busy times 
   on Linux and NetBSD systems\n\n
   (c) 2003, 2004 Roger Seguin roger_seg...@msn.com\n

[Xfce4-commits] xfce4-diskperf-plugin:master Require x-d-t 4.9.0, fix libtool autohell macros

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to d835b8eb49f7baa5f3093796301cbbfcaba00cc2 (commit)
   from f85bd63e13dbe511bab65b2b36a133083112bada (commit)

commit d835b8eb49f7baa5f3093796301cbbfcaba00cc2
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 14:39:35 2012 +0200

Require x-d-t 4.9.0, fix libtool autohell macros

 autogen.sh  |2 +-
 configure.ac.in |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index d3b7588..8428b94 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -7,7 +7,7 @@
 # and Brian Tarricone br...@tarricone.org.
 #
 
-export XDT_AUTOGEN_REQUIRED_VERSION=4.7.0
+export XDT_AUTOGEN_REQUIRED_VERSION=4.9.0
 
 (type xdt-autogen) /dev/null 21 || {
   cat 2 EOF
diff --git a/configure.ac.in b/configure.ac.in
index e0eb74b..b22f440 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -32,9 +32,11 @@ dnl 
 AC_PROG_CC_C99()
 AC_PROG_LD()
 AC_PROG_INSTALL()
-AC_PROG_LIBTOOL()
 AC_PROG_INTLTOOL()
 
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
 dnl **
 dnl *** Check for standard headers ***
 dnl **
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Fix translations not working, patch from Mike Massonnet (#6343)

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 614be858629a24cd730679e38fc795f9456fb817 (commit)
   from 009d2de7be7390f289413f5a6f62868f2e404cde (commit)

commit 614be858629a24cd730679e38fc795f9456fb817
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 14:48:13 2012 +0200

Fix translations not working, patch from Mike Massonnet (#6343)

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

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 507c8b3..f2df208 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -1121,6 +1121,7 @@ static void diskperf_set_orientation (XfcePanelPlugin 
*plugin,
 static void diskperf_construct (XfcePanelPlugin *plugin)
 {
 diskperf_t *diskperf = diskperf_create_control (plugin);
+xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, UTF-8);
 
 g_signal_connect (plugin, free-data, G_CALLBACK (diskperf_free), 
   diskperf);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Label orientation in vertical mode, bar size after orientation change.

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 009d2de7be7390f289413f5a6f62868f2e404cde (commit)
   from 24dc4ee5087a38af4ea4064f476db0600ab0d131 (commit)

commit 009d2de7be7390f289413f5a6f62868f2e404cde
Author: Andrzej ndrwr...@gmail.com
Date:   Fri Jan 27 18:48:57 2012 +0900

Label orientation in vertical mode, bar size after orientation change.

Signed-off-by: Landry Breuil lan...@xfce.org

 panel-plugin/main.c |   45 ++---
 1 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 45020c1..507c8b3 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -1061,9 +1061,42 @@ static gboolean diskperf_set_size (XfcePanelPlugin 
*plugin, int p_size,
 return TRUE;
 }  /* diskperf_set_size() */
 
+#if defined (LIBXFCE4PANEL_CHECK_VERSION)  LIBXFCE4PANEL_CHECK_VERSION 
(4,9,0)
/**/
 
-static void diskperf_set_orientation (XfcePanelPlugin *plugin, 
+static void diskperf_set_mode (XfcePanelPlugin *plugin,
+   XfcePanelPluginMode p_iMode,
+   diskperf_t *poPlugin)
+   /* Plugin API */
+   /* Invoked when the panel changes mode */
+{
+struct monitor_t *poMonitor = (poPlugin-oMonitor);
+GtkOrientationp_iOrientation;
+
+TRACE (diskperf_set_mode()\n);
+
+p_iOrientation =
+  (p_iMode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL) ?
+  GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
+
+
+if (poPlugin-iTimerId) {
+   g_source_remove (poPlugin-iTimerId);
+   poPlugin-iTimerId = 0;
+}
+gtk_container_remove (GTK_CONTAINER (poMonitor-wEventBox),
+ GTK_WIDGET (poMonitor-wBox));
+CreateMonitorBars (poPlugin, p_iOrientation);
+SetTimer (poPlugin);
+gtk_label_set_angle (GTK_LABEL (poMonitor-wTitle),
+ (p_iMode != XFCE_PANEL_PLUGIN_MODE_VERTICAL) ?
+ 0 : 270);
+diskperf_set_size (plugin, xfce_panel_plugin_get_size (plugin), poPlugin);
+}  /* diskperf_set_orientation() */
+#else
+   /**/
+
+static void diskperf_set_orientation (XfcePanelPlugin *plugin,
   GtkOrientation p_iOrientation,
   diskperf_t *poPlugin)
/* Plugin API */
@@ -1080,8 +1113,9 @@ static void diskperf_set_orientation (XfcePanelPlugin 
*plugin,
  GTK_WIDGET (poMonitor-wBox));
 CreateMonitorBars (poPlugin, p_iOrientation);
 SetTimer (poPlugin);
+diskperf_set_size (plugin, xfce_panel_plugin_get_size (plugin), poPlugin);
 }  /* diskperf_set_orientation() */
-
+#endif
/**/
 
 static void diskperf_construct (XfcePanelPlugin *plugin)
@@ -1097,8 +1131,13 @@ static void diskperf_construct (XfcePanelPlugin *plugin)
 g_signal_connect (plugin, size-changed, G_CALLBACK (diskperf_set_size), 
   diskperf);
 
-g_signal_connect (plugin, orientation-changed, 
+#if defined (LIBXFCE4PANEL_CHECK_VERSION)  LIBXFCE4PANEL_CHECK_VERSION 
(4,9,0)
+g_signal_connect (plugin, mode-changed,
+  G_CALLBACK (diskperf_set_mode), diskperf);
+#else
+g_signal_connect (plugin, orientation-changed,
   G_CALLBACK (diskperf_set_orientation), diskperf);
+#endif
 
 xfce_panel_plugin_menu_show_about (plugin);
 g_signal_connect (plugin, about, G_CALLBACK (About), NULL);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Better panel version detection, cherrypicked from #8625

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to bbaa78380268c5113a61745664d2b012ae353ecd (commit)
   from 614be858629a24cd730679e38fc795f9456fb817 (commit)

commit bbaa78380268c5113a61745664d2b012ae353ecd
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 14:58:55 2012 +0200

Better panel version detection, cherrypicked from #8625

 panel-plugin/main.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index f2df208..7ff3126 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -39,6 +39,11 @@
 #include errno.h
 #include sys/stat.h
 
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
 
 #define PLUGIN_NAMEDiskPerf
 #define BORDER  8
@@ -1061,7 +1066,7 @@ static gboolean diskperf_set_size (XfcePanelPlugin 
*plugin, int p_size,
 return TRUE;
 }  /* diskperf_set_size() */
 
-#if defined (LIBXFCE4PANEL_CHECK_VERSION)  LIBXFCE4PANEL_CHECK_VERSION 
(4,9,0)
+#ifdef HAS_PANEL_49
/**/
 
 static void diskperf_set_mode (XfcePanelPlugin *plugin,
@@ -1132,7 +1137,7 @@ static void diskperf_construct (XfcePanelPlugin *plugin)
 g_signal_connect (plugin, size-changed, G_CALLBACK (diskperf_set_size), 
   diskperf);
 
-#if defined (LIBXFCE4PANEL_CHECK_VERSION)  LIBXFCE4PANEL_CHECK_VERSION 
(4,9,0)
+#ifdef HAS_PANEL_49
 g_signal_connect (plugin, mode-changed,
   G_CALLBACK (diskperf_set_mode), diskperf);
 #else
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Add support for Solaris, from Peter Tribble (#7167)

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to bd930384e6a5cbdd3f34ea639e2b5d7a1109bae4 (commit)
   from bbaa78380268c5113a61745664d2b012ae353ecd (commit)

commit bd930384e6a5cbdd3f34ea639e2b5d7a1109bae4
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 15:26:57 2012 +0200

Add support for Solaris, from Peter Tribble (#7167)

 panel-plugin/devperf.c |   68 +++-
 panel-plugin/main.c|   32 +++
 2 files changed, 88 insertions(+), 12 deletions(-)

diff --git a/panel-plugin/devperf.c b/panel-plugin/devperf.c
index 97b45f5..4f7bbf2 100644
--- a/panel-plugin/devperf.c
+++ b/panel-plugin/devperf.c
@@ -1,5 +1,6 @@
 /* Copyright (c) 2003 RogerSeguin roger_seg...@msn.com
  * Copyright (c) 2003 Benedikt Meurer benedikt.meu...@unix-ag.uni-siegen.de
+ * Copyright (c) 2011 Peter Tribble peter.trib...@gmail.com
  *
  * 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
@@ -380,9 +381,74 @@ int DevGetPerfData (const void *p_pvDevice, struct 
devperf_t *perf)
return (0);
 }
 
+#elif defined (__sun__)
+/*
+ * Solaris (and OpenSolaris derivatives) support via kstat
+ * Peter Tribble peter.trib...@gmail.com
+ */
+#include kstat.h
+static kstat_ctl_t *kc;
+
+int DevPerfInit ()
+{
+   kc = kstat_open ();
+return (0);
+}
+
+int DevCheckStatAvailability(char const **strptr)
+{
+return (0);
+}
+
+int DevGetPerfData (const void *p_pvDevice, struct devperf_t *perf)
+{
+   kstat_t *ksp;
+   kstat_io_t *kiot;
+   char *devname = (char *)p_pvDevice;
+
+   if(!kc)
+   DevPerfInit();
+
+   /*
+* Use the device name. This is something like sd3, after the
+* module and instance. The user is expected to work out the
+* possible device names. The command iostat -x is one way to
+* enumerate them. It would be really neat to have a way to present
+* this list to the user and get them to pick the one they want.
+*/
+   if(!(ksp = kstat_lookup (kc, NULL, -1, devname))) {
+   return (-1);
+   }
+   if (kstat_read(kc, ksp, 0) == -1) {
+   return (-1);
+   }
+   /*
+* Just in case we accidentally matched something that wasn't
+* an I/O device.
+*/
+   if (ksp-ks_type != KSTAT_TYPE_IO) {
+   return (-1);
+   }
+   kiot = KSTAT_IO_PTR(ksp);
+   perf-timestamp_ns = (uint64_t)ksp-ks_snaptime;
+   perf-rbytes = (uint64_t)kiot-nread;
+   perf-wbytes = (uint64_t)kiot-nwritten;
+   /*
+* Solaris keeps separate wait and run queues, but they aren't
+* separated by read and write. So allocate half to each.
+*/
+   perf-wbusy_ns = (uint64_t) (kiot-wtime + kiot-rtime) / 2ull;
+   perf-rbusy_ns = perf-wbusy_ns;
+   /*
+* qlen isn't used, so set it to zero rather than calculate it.
+*/
+   perf-qlen = 0;
+   return (0);
+}
+
 #else
/**/
/   Unsupported platform***/
/**/
-#error Your plattform is not yet supported
+#error Your platform is not yet supported
 #endif
diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 7ff3126..2a38c1c 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -53,6 +53,8 @@
 data, but only a single value combining both */
 #if  defined(__NetBSD__)
 #defineSEPARATE_BUSY_TIMES 0
+#elif  defined(__sun__)
+#defineSEPARATE_BUSY_TIMES 0
 #elif defined(__linux__)
 #defineSEPARATE_BUSY_TIMES 1
 #else
@@ -84,7 +86,7 @@ typedef enum monitor_bar_order_t {
 typedef struct param_t {
 /* Configurable parameters */
 characDevice[64];
-#if  !defined(__NetBSD__)  !defined(__OpenBSD__)
+#if  !defined(__NetBSD__)  !defined(__OpenBSD__)  !defined(__sun__)
 dev_t   st_rdev;
 #endif
 int fTitleDisplayed;
@@ -164,7 +166,7 @@ static int DisplayPerf (struct diskperf_t *p_poPlugin)
 rbytes = wbytes = iRBusy_ns = iWBusy_ns = -1;
 memset (oPerf, 0, sizeof (oPerf));
 oPerf.qlen = -1;
-#if defined (__NetBSD__) || defined(__OpenBSD__)
+#if defined (__NetBSD__) || defined(__OpenBSD__) || defined(__sun__)
 status = DevGetPerfData (poConf-acDevice, oPerf);
 #else
 status = DevGetPerfData ((poConf-st_rdev), oPerf);
@@ -211,18 +213,22 @@ static int DisplayPerf (struct diskperf_t *p_poPlugin)
   Write :%3.2f\n
   Total :%3.2f\n
 Busy time (%c)\n
+#if SEPARATE_BUSY_TIMES
   Read : %3d\n
   Write : %3d\n
+#endif
   Total : %3d,
 poConf-acTitle,
 arPerf[R_DATA],
 arPerf[W_DATA],
 arPerf[RW_DATA

[Xfce4-commits] xfce4-diskperf-plugin:master oops, shouldnt have been commited

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to f11b12aa299f17dce87c36db00c93fa5572ba579 (commit)
   from bd930384e6a5cbdd3f34ea639e2b5d7a1109bae4 (commit)

commit f11b12aa299f17dce87c36db00c93fa5572ba579
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 15:33:09 2012 +0200

oops, shouldnt have been commited

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

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 2a38c1c..767f181 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -906,8 +906,8 @@ static void About (Widget_t w, void *unused)
   (c) 2003, 2004 Roger Seguin roger_seg...@msn.com\n
   NetBSD statistics collection: (c) 2003 Benedikt Meurer\n
   \tbenedikt.meu...@unix-ag.uni-siegen.de\n
-! Solaris statistics collection: (c) 2011 Peter Tribble\n
-! \tpeter.trib...@gmail.com),
+  Solaris statistics collection: (c) 2011 Peter Tribble\n
+  \tpeter.trib...@gmail.com),
   PACKAGE, VERSION);
 }  /* About() */
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master remove unused variables

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to d90b283ffa6cf6a920b78e60b64cd782bcc0fb86 (commit)
   from f11b12aa299f17dce87c36db00c93fa5572ba579 (commit)

commit d90b283ffa6cf6a920b78e60b64cd782bcc0fb86
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 15:45:09 2012 +0200

remove unused variables

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

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 767f181..f80be9d 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -300,7 +300,6 @@ static int SetSingleBarColor (struct diskperf_t 
*p_poPlugin, int p_iBar)
 struct diskperf_t *poPlugin = p_poPlugin;
 struct param_t *poConf = (poPlugin-oConf.oParam);
 struct monitor_t *poMonitor = (poPlugin-oMonitor);
-GtkRcStyle *poStyle;
 Widget_t   *pwBar;
 
 pwBar = poMonitor-aoPerfBar[p_iBar].pwBar;
@@ -664,7 +663,6 @@ static void ToggleTitle (Widget_t p_w, void *p_pvPlugin)
 {
 struct diskperf_t *poPlugin = (diskperf_t *) p_pvPlugin;
 struct param_t *poConf = (poPlugin-oConf.oParam);
-struct gui_t   *poGUI = (poPlugin-oConf.oGUI);
 struct monitor_t *poMonitor = (poPlugin-oMonitor);
 
 poConf-fTitleDisplayed =
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Set gtk_adjustment_new() page_size argument to 0

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 408bb6471c6e45cc5a16dff69554843c3e327d6a (commit)
   from d90b283ffa6cf6a920b78e60b64cd782bcc0fb86 (commit)

commit 408bb6471c6e45cc5a16dff69554843c3e327d6a
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 15:51:15 2012 +0200

Set gtk_adjustment_new() page_size argument to 0

Fixes Gtk-WARNING **: GtkSpinButton: setting an adjustment with
non-zero page size is deprecated, cf Gtk doc on

http://developer.gnome.org/gtk/unstable/GtkAdjustment.html#GtkAdjustment--page-size

 panel-plugin/config_gui.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/config_gui.c b/panel-plugin/config_gui.c
index 34982bf..95a589f 100644
--- a/panel-plugin/config_gui.c
+++ b/panel-plugin/config_gui.c
@@ -127,7 +127,7 @@ int CreateConfigGUI (GtkWidget * vbox1, struct gui_t 
*p_poGUI)
 gtk_widget_show (alignment1);
 gtk_container_add (GTK_CONTAINER (eventbox1), alignment1);
 
-wSc_Period_adj = gtk_adjustment_new (0.5, 0.25, 4, 0.05, 1, 10);
+wSc_Period_adj = gtk_adjustment_new (0.5, 0.25, 4, 0.05, 1, 0);
 wSc_Period =
gtk_spin_button_new (GTK_ADJUSTMENT (wSc_Period_adj), 1, 3);
 gtk_widget_show (wSc_Period);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Rewrite About() to use gtk_show_about_dialog()

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to b3b925bb3ce43f0effed69aed0cc771f3c965a72 (commit)
   from 408bb6471c6e45cc5a16dff69554843c3e327d6a (commit)

commit b3b925bb3ce43f0effed69aed0cc771f3c965a72
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 16:28:07 2012 +0200

Rewrite About() to use gtk_show_about_dialog()

 panel-plugin/main.c |   20 +++-
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index f80be9d..0822ed8 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -898,15 +898,17 @@ static int CheckStatsAvailability ()
 static void About (Widget_t w, void *unused)
/* Called back when the About button in clicked */
 {
-xfce_dialog_show_info (NULL, NULL, 
-   _(%s %s - Disk Performance Monitor\n
-  Display instantaneous disk I/O transfer rates and busy times 
\n\n
-  (c) 2003, 2004 Roger Seguin roger_seg...@msn.com\n
-  NetBSD statistics collection: (c) 2003 Benedikt Meurer\n
-  \tbenedikt.meu...@unix-ag.uni-siegen.de\n
-  Solaris statistics collection: (c) 2011 Peter Tribble\n
-  \tpeter.trib...@gmail.com),
-  PACKAGE, VERSION);
+   const gchar *auth[] = { Roger Seguin roger_seg...@msn.com,
+   NetBSD statistics collection: (c) 2003 Benedikt Meurer 
benedikt.meu...@unix-ag.uni-siegen.de,
+   Solaris statistics collection: (c) 2011 Peter Tribble 
peter.trib...@gmail.com, NULL };
+   gtk_show_about_dialog(NULL,
+  license, xfce_get_license_text (XFCE_LICENSE_TEXT_BSD),
+  version, PACKAGE_VERSION,
+  program-name, PACKAGE_NAME,
+  comments, _(Diskperf monitor displays instantaneous disk I/O transfer 
rates and busy times),
+  website, 
http://goodies.xfce.org/projects/panel-plugins/xfce4-diskperf-plugin;,
+  copyright, _(Copyright (c) 2003, 2004 Roger Seguin),
+  authors, auth, NULL);
 }  /* About() */
 
/**/
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Updates for 2.4.0 release

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to b3c80d817eef1165d5fecceaa13ea0159092a77f (commit)
   from b3b925bb3ce43f0effed69aed0cc771f3c965a72 (commit)

commit b3c80d817eef1165d5fecceaa13ea0159092a77f
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 16:28:39 2012 +0200

Updates for 2.4.0 release

- update NEWS
- bump version
- add Peter to AUTHORS

 AUTHORS |1 +
 NEWS|9 +
 configure.ac.in |4 ++--
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index d544538..8923323 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,2 +1,3 @@
 RogerSeguin roger_seg...@msn.com
 Benedikt Meurer benedikt.meu...@unix-ag.uni-siegen.de
+Peter Tribble peter.trib...@gmail.com
diff --git a/NEWS b/NEWS
index 1551bb4..1476d92 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+2.4.0 (2012/4/3):
+-
+ * Port to libxfce4ui (bug #8099)
+ * Port to panel 4.9 (bug #8401)
+ * Fix translations (bug #6343)
+ * Explicitely link with libm (bugs #7982,#8514)
+ * Add Solaris support (bug #7167)
+ * Fix a Gtk warning, removed non-used vars..
+
 2.3.0 (2011/1/21):
 --
  * Support for Xfce 4.8 panel
diff --git a/configure.ac.in b/configure.ac.in
index bae59a8..a24a001 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -4,10 +4,10 @@ dnl 2003, 2004 Roger Seguin roger_seg...@msn.com
 dnl
 
 m4_define([diskperf_version_major], [2])
-m4_define([diskperf_version_minor], [3])
+m4_define([diskperf_version_minor], [4])
 m4_define([diskperf_version_micro], [0])
 m4_define([diskperf_version_build], [@REVISION@])
-m4_define([diskperf_version_tag], [git]) # leave empty for releases
+m4_define([diskperf_version_tag], []) # leave empty for releases
 m4_define([diskperf_version], 
[diskperf_version_major().diskperf_version_minor().diskperf_version_micro()ifelse(diskperf_version_tag(),
 [git], [diskperf_version_tag()-diskperf_version_build()], 
[diskperf_version_tag()])])
 
 dnl ***
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin|2.4.0 Creating annotated tag 2.4.0

2012-04-03 Thread Landry Breuil
Updating annotated tag refs/tags/2.4.0
 as new annotated tag
 to ce5c313a5335838d0442103a5694d2b7cb990c94 (tag)
   succeeds 2.3.0-30-gb3b925b
  tagged by Landry Breuil lan...@xfce.org
 on 2012-04-03 16:29 +0200

Landry Breuil (1):
  Updates for 2.4.0 release

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


[Xfce4-commits] xfce4-wavelan-plugin:master Explicitely link against libm (#7991, #8516)

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to ff954a1937ca63ccb967de7c947308214ba29fa8 (commit)
   from bdf9e795f0f11a7c06e1eebf508f317989ac39ca (commit)

commit ff954a1937ca63ccb967de7c947308214ba29fa8
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 18:19:33 2012 +0200

Explicitely link against libm (#7991,#8516)

 configure.ac.in  |3 +++
 panel-plugin/Makefile.am |1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index f001ea2..e3b7b85 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -37,6 +37,9 @@ AC_CHECK_HEADERS([math.h stdio.h stdlib.h string.h 
sys/types.h \
   linux/wireless.h string.h \
   ctype.h], [], [], [#include sys/socket.h])
 
+AC_CHECK_LIBM
+AC_SUBST(LIBM)
+
 dnl Check for i18n support
 XDT_I18N([@LINGUAS@])
 
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 5322658..8f21b5f 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -9,6 +9,7 @@ plugin_PROGRAMS = xfce4-wavelan-plugin
 #  libwavelan.la
 
 xfce4_wavelan_plugin_LDADD =   
\
+   $(LIBM) 
\
@LIBXFCE4PANEL_LIBS@
\
@LIBXFCEGUI4_LIBS@
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Require x-d-t 4.9.0, update libtool autohell macros

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to a09c2c7629f6f0c1f2f77dff82cf4275c0438988 (commit)
   from ff954a1937ca63ccb967de7c947308214ba29fa8 (commit)

commit a09c2c7629f6f0c1f2f77dff82cf4275c0438988
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 18:20:17 2012 +0200

Require x-d-t 4.9.0, update libtool autohell macros

 autogen.sh  |2 +-
 configure.ac.in |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 6bc0c8a..735c746 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,7 +5,7 @@
 #
 # Written for Xfce by Benedikt Meurer be...@xfce.org.
 
-export XDT_AUTOGEN_REQUIRED_VERSION=4.7.0
+export XDT_AUTOGEN_REQUIRED_VERSION=4.9.0
 
 (type xdt-autogen) /dev/null 21 || {
   cat 2 EOF
diff --git a/configure.ac.in b/configure.ac.in
index e3b7b85..4650138 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -27,9 +27,11 @@ AC_MINIX()
 dnl Check for basic programs
 AC_PROG_CC()
 AC_PROG_INSTALL()
-AC_PROG_LIBTOOL()
 AC_PROG_INTLTOOL()
 
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
 dnl Check for standard header files
 AC_HEADER_STDC()
 AC_CHECK_HEADERS([math.h stdio.h stdlib.h string.h sys/types.h \
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Port to libxfce4ui.

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to c9800f4cccddbcf4eddcd3d169b7edf094adceca (commit)
   from a09c2c7629f6f0c1f2f77dff82cf4275c0438988 (commit)

commit c9800f4cccddbcf4eddcd3d169b7edf094adceca
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 18:34:56 2012 +0200

Port to libxfce4ui.

 configure.ac.in  |5 ++---
 panel-plugin/Makefile.am |4 ++--
 panel-plugin/wavelan.c   |   11 ++-
 3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index 4650138..63c65e0 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -47,9 +47,8 @@ XDT_I18N([@LINGUAS@])
 
 dnl configure the panel plugin
 XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.3.20])
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.20])
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.20])
-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.6.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
 
 dnl Check for debugging support
 BM_DEBUG_SUPPORT()
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 8f21b5f..00fcdab 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -11,7 +11,7 @@ plugin_PROGRAMS = xfce4-wavelan-plugin
 xfce4_wavelan_plugin_LDADD =   
\
$(LIBM) 
\
@LIBXFCE4PANEL_LIBS@
\
-   @LIBXFCEGUI4_LIBS@
+   @LIBXFCE4UI_LIBS@
 
 xfce4_wavelan_plugin_SOURCES = 
\
wavelan.c   \
@@ -22,7 +22,7 @@ xfce4_wavelan_plugin_SOURCES =
\
 
 xfce4_wavelan_plugin_CFLAGS =  
\
@LIBXFCE4PANEL_CFLAGS@  
\
-   @LIBXFCEGUI4_CFLAGS@
+   @LIBXFCE4UI_CFLAGS@
 
 # .desktop file
 #
diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index 5838024..6182fcb 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -31,10 +31,8 @@
 #include gtk/gtk.h
 
 #include libxfce4util/libxfce4util.h
-#include libxfce4panel/xfce-panel-convenience.h
-#include libxfcegui4/libxfcegui4.h
+#include libxfce4ui/libxfce4ui.h
 #include libxfce4panel/xfce-panel-plugin.h
-#include libxfce4panel/xfce-hvbox.h
 
 #include wi.h
 
@@ -504,12 +502,7 @@ wavelan_create_options (XfcePanelPlugin *plugin, t_wavelan 
*wavelan)
   
   gtk_container_set_border_width (GTK_CONTAINER (dlg), 2);
 
-  header = xfce_create_header (NULL, _(Wavelan Plugin Options));
-  gtk_widget_set_size_request (GTK_BIN (header)-child, 200, 32);
-  gtk_container_set_border_width (GTK_CONTAINER (header), 6);
-  gtk_widget_show (header);
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)-vbox), header,
-  FALSE, TRUE, 0);
+  xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dlg), _(Generic 
Monitor));
   
   vbox = gtk_vbox_new(FALSE, 8);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Panel 4.9 compatibility fix.

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 37df4044947339570fe7b9e9b02a10fba008743d (commit)
   from c9800f4cccddbcf4eddcd3d169b7edf094adceca (commit)

commit 37df4044947339570fe7b9e9b02a10fba008743d
Author: Andrzej ndrwr...@gmail.com
Date:   Wed Apr 4 01:23:03 2012 +0900

Panel 4.9 compatibility fix.

Signed-off-by: Landry Breuil lan...@xfce.org

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

diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index 6182fcb..e3b9566 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -39,6 +39,12 @@
 #include string.h
 #include ctype.h
 
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
+
 #define BORDER 8
 typedef struct
 {
@@ -328,7 +334,11 @@ wavelan_new(XfcePanelPlugin *plugin)
   }
 
   wavelan-image = gtk_image_new();
+#ifdef HAS_PANEL_49
+  gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan-image), 
gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), network-wireless, 
wavelan-size/xfce_panel_plugin_get_nrows(wavelan-plugin)-6, 0, NULL));
+#else
   gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan-image), 
gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), network-wireless, 
wavelan-size-6, 0, NULL));
+#endif
 
   gtk_box_pack_start(GTK_BOX(wavelan-box), GTK_WIDGET(wavelan-image), FALSE, 
FALSE, 2);
   gtk_box_pack_start(GTK_BOX(wavelan-box), GTK_WIDGET(wavelan-signal), 
FALSE, FALSE, 2);
@@ -421,7 +431,11 @@ static void
 wavelan_set_size(t_wavelan *wavelan, int size)
 {
   wavelan-size = size;
+#ifdef HAS_PANEL_49
+  gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan-image), 
gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), network-wireless, 
wavelan-size/xfce_panel_plugin_get_nrows(wavelan-plugin)-6, 0, NULL));
+#else
   gtk_image_set_from_pixbuf(GTK_IMAGE(wavelan-image), 
gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), network-wireless, 
wavelan-size-6, 0, NULL));
+#endif
   if (wavelan-orientation == GTK_ORIENTATION_HORIZONTAL)
gtk_widget_set_size_request(wavelan-ebox, -1, wavelan-size);
   else
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Updates for release 0.5.7

2012-04-03 Thread Landry Breuil
Updating branch refs/heads/master
 to 2d4ec451e6f9d95626ea2038970d5336b79c (commit)
   from 37df4044947339570fe7b9e9b02a10fba008743d (commit)

commit 2d4ec451e6f9d95626ea2038970d5336b79c
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 3 18:53:20 2012 +0200

Updates for release 0.5.7

 NEWS|8 
 configure.ac.in |2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index f2fb8e0..4535b18 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+0.5.7 (2012/04/03):
+-
+  * Port to libxfce4ui
+  * Adapt to panel 4.9 and newer
+  * Fix compatibility with GNU/kFreeBSD (bug #6963)
+  * Fix transparency and bar color (bug #7346)
+  * Explicitely link against libm (bugs #7991, #8516)
+
 0.5.6 (2010/12/04):
 -
   * Support for both xfce 4.6 and 4.8
diff --git a/configure.ac.in b/configure.ac.in
index 63c65e0..5a32124 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -5,7 +5,7 @@ dnl
 dnl Version information
 m4_define([xwp_version_major], [0])
 m4_define([xwp_version_minor], [5])
-m4_define([xwp_version_micro], [6])
+m4_define([xwp_version_micro], [7])
 m4_define([xwp_version], 
[xwp_version_major().xwp_version_minor().xwp_version_micro()])
 
 dnl Initial autoconf
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin|xfce4-wavelan-plugin-0.5.7 Creating annotated tag xfce4-wavelan-plugin-0.5.7

2012-04-03 Thread Landry Breuil
Updating annotated tag refs/tags/xfce4-wavelan-plugin-0.5.7
 as new annotated tag
 to 03420ed3d5902506de3be213a21020682276d3bb (tag)
   succeeds xfce4-wavelan-plugin-0.5.6-27-g37df404
  tagged by Landry Breuil lan...@xfce.org
 on 2012-04-03 18:53 +0200

Landry Breuil (1):
  Updates for release 0.5.7

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


[Xfce4-commits] xfce4-wavelan-plugin:master Compile the plugin as a module.

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 48a4857bf8dde3631730995978e6548bc40e5284 (commit)
   from eceee0f7bc9dbee103a992a88e7fd08197711d4c (commit)

commit 48a4857bf8dde3631730995978e6548bc40e5284
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 17:48:34 2012 +0200

Compile the plugin as a module.

- Switch from _PROGRAMS to _LTLIBRARIES
- Register the plugin as not external
- Rename .desktop.in.in to .desktop.in
- install plugin/desktop file in the correct panel/plugins dir

 panel-plugin/Makefile.am   |   41 +---
 panel-plugin/wavelan.c |2 +-
 .../{wavelan.desktop.in.in = wavelan.desktop.in}  |2 +-
 3 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 00fcdab..5724ff8 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -2,49 +2,44 @@ INCLUDES =
\
-DG_LOG_DOMAIN=\xfce4-wavelan-plugin\ \
-DPACKAGE_LOCALE_DIR=\$(localedir)\
 
-plugindir = $(libexecdir)/xfce4/panel-plugins
-plugin_PROGRAMS = xfce4-wavelan-plugin
+plugindir = $(libdir)/xfce4/panel/plugins
 
-#plugin_LTLIBRARIES =  \
-#  libwavelan.la
+plugin_LTLIBRARIES = libwavelan.la
 
-xfce4_wavelan_plugin_LDADD =   
\
+libwavelan_la_LIBADD = \
$(LIBM) 
\
@LIBXFCE4PANEL_LIBS@
\
@LIBXFCE4UI_LIBS@
 
-xfce4_wavelan_plugin_SOURCES = 
\
+libwavelan_la_SOURCES =
\
wavelan.c   \
wi.h\
wi_bsd.c\
wi_common.c \
wi_linux.c
 
-xfce4_wavelan_plugin_CFLAGS =  
\
+libwavelan_la_CFLAGS = \
@LIBXFCE4PANEL_CFLAGS@  
\
@LIBXFCE4UI_CFLAGS@
 
+libwavelan_la_LDFLAGS = \
+   -avoid-version \
+   -module \
+   -no-undefined \
+   -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+   $(PLATFORM_LDFLAGS)
+
 # .desktop file
 #
-# Some automake trickery here. Because we cannot use $(libexecdir) in the
-# automake stage, we'll use sed to get the full path into the .desktop file.
-# We also need to let intltool merge the translated fields, so we add an
-# additional level of indirection: a name.desktop.in.in file.
+# We need to let intltool merge the translated fields, so we add a
+# level of indirection: a name.desktop.in file.
 # 
-desktop_in_in_files = wavelan.desktop.in.in
-desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+desktop_in_files = wavelan.desktop.in
 
-desktopdir = $(datadir)/xfce4/panel-plugins
+desktopdir = $(datadir)/xfce4/panel/plugins
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST =   $(desktop_in_in_files)
-
-CLEANFILES =   $(desktop_DATA) $(desktop_in_files)
-
-# get full path into .desktop file
-%.desktop.in: %.desktop.in.in
-   sed -e s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^ \
-   $  $@
-
+EXTRA_DIST = $(desktop_in_files)
 
+DISTCLEANFILES = $(desktop_DATA)
diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index 6bf0af5..b3bb9b2 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -677,5 +677,5 @@ int main(int argc, char** argv)
return 0;
 }
 #else
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(wavelan_construct);
+XFCE_PANEL_PLUGIN_REGISTER(wavelan_construct);
 #endif
diff --git a/panel-plugin/wavelan.desktop.in.in 
b/panel-plugin/wavelan.desktop.in
similarity index 74%
rename from panel-plugin/wavelan.desktop.in.in
rename to panel-plugin/wavelan.desktop.in
index c9eea64..5dc36de 100644
--- a/panel-plugin/wavelan.desktop.in.in
+++ b/panel-plugin/wavelan.desktop.in
@@ -4,4 +4,4 @@ Encoding=UTF-8
 _Name=Wavelan
 _Comment=View the status of a wireless network
 Icon=network-wireless
-X-XFCE-Exec=@PLUGIN_PATH@/xfce4-wavelan-plugin
+X-XFCE-Exec=wavelan
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master use correct X-XFCE stanzas in desktop file

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 31d43e8d2b12a2b7edadb740a6ddcbc3cda7b9e5 (commit)
   from a96f0ad1344d81321b466ee2d4c8e234a67e88a7 (commit)

commit 31d43e8d2b12a2b7edadb740a6ddcbc3cda7b9e5
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:00:41 2012 +0200

use correct X-XFCE stanzas in desktop file

 panel-plugin/wavelan.desktop.in |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/wavelan.desktop.in b/panel-plugin/wavelan.desktop.in
index 5dc36de..0bdb690 100644
--- a/panel-plugin/wavelan.desktop.in
+++ b/panel-plugin/wavelan.desktop.in
@@ -4,4 +4,5 @@ Encoding=UTF-8
 _Name=Wavelan
 _Comment=View the status of a wireless network
 Icon=network-wireless
-X-XFCE-Exec=wavelan
+X-XFCE-Internal=FALSE
+X-XFCE-Module=wavelan
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Add about dialog

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to fbd8ceb0105a6cdaef97fdb8dc8f86cb6b30d1ea (commit)
   from 31d43e8d2b12a2b7edadb740a6ddcbc3cda7b9e5 (commit)

commit fbd8ceb0105a6cdaef97fdb8dc8f86cb6b30d1ea
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:41:50 2012 +0200

Add about dialog

- use xfce_titled_dialog_new_with_buttons() to fix a bad cast
- show icon in properties dialog

 panel-plugin/wavelan.c |   35 ---
 1 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index b3bb9b2..71c6751 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -500,23 +500,22 @@ wavelan_create_options (XfcePanelPlugin *plugin, 
t_wavelan *wavelan)
 
   TRACE (Entered wavelan_create_options);
   
-  dlg = gtk_dialog_new_with_buttons (_(Properties),
-  GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (plugin))),
-  GTK_DIALOG_DESTROY_WITH_PARENT | 
+  dlg = xfce_titled_dialog_new_with_buttons (_(Wavelan Plugin Options),
+  NULL,
   GTK_DIALOG_NO_SEPARATOR,
-  GTK_STOCK_CLOSE, GTK_RESPONSE_OK,
+  GTK_STOCK_CLOSE,
+  GTK_RESPONSE_OK,
   NULL);
 
-  g_object_set_data (G_OBJECT (plugin), dialog, dlg);
-
   gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_CENTER);
+  gtk_window_set_icon_name (GTK_WINDOW (dlg), network-wireless);
 
   g_signal_connect (dlg, response, G_CALLBACK (wavelan_dialog_response),
 wavelan);
   
   gtk_container_set_border_width (GTK_CONTAINER (dlg), 2);
 
-  xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dlg), _(Wavelan Plugin 
Options));
+  xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dlg), _(Properties));
   
   vbox = gtk_vbox_new(FALSE, 8);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
@@ -630,6 +629,26 @@ wavelan_configure (XfcePanelPlugin *plugin, t_wavelan 
*wavelan)
 }
 
 static void
+wavelan_show_about (XfcePanelPlugin *plugin, t_wavelan *wavelan)
+{
+   GdkPixbuf *icon;
+   const gchar *auth[] = { Benedikt Meurer benny at xfce.org, Florian 
Rivoal friv...@xfce.org, NULL };
+   icon = xfce_panel_pixbuf_from_source(network-wireless, NULL, 32);
+   gtk_show_about_dialog(NULL,
+  logo, icon,
+  license, xfce_get_license_text (XFCE_LICENSE_TEXT_BSD),
+  version, PACKAGE_VERSION,
+  program-name, PACKAGE_NAME,
+  comments, _(View the status of a wireless network),
+  website, 
http://goodies.xfce.org/projects/panel-plugins/xfce4-wavelan-plugin;,
+  copyright, Copyright (c) 2003-2004 Benedikt Meurer\n,
+  authors, auth, NULL);
+
+   if(icon)
+  g_object_unref(G_OBJECT(icon));
+}
+
+static void
 wavelan_construct (XfcePanelPlugin *plugin)
 {
   
@@ -658,6 +677,8 @@ wavelan_construct (XfcePanelPlugin *plugin)
   g_signal_connect (plugin, configure-plugin,
 G_CALLBACK (wavelan_configure), wavelan);
   
+  xfce_panel_plugin_menu_show_about(plugin);
+  g_signal_connect (plugin, about, G_CALLBACK (wavelan_show_about), wavelan);
 }
 
 #if 0
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master fix warnings

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to a0a75471fc94715ce04cea96e7bb37718c818933 (commit)
   from fbd8ceb0105a6cdaef97fdb8dc8f86cb6b30d1ea (commit)

commit a0a75471fc94715ce04cea96e7bb37718c818933
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:51:04 2012 +0200

fix warnings

 panel-plugin/wavelan.c |3 +--
 panel-plugin/wi_bsd.c  |2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index 71c6751..94660a4 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -77,7 +77,6 @@ wavelan_set_state(t_wavelan *wavelan, gint state)
   /* state = 0 - no link, =-1 - error */
   TRACE (Entered wavelan_set_state, state = %u, state);
 
-  GtkRcStyle *rc = NULL;
   GdkColor color;
 
   gchar signal_color_bad[] = #e0;
@@ -494,7 +493,7 @@ static void
 wavelan_create_options (XfcePanelPlugin *plugin, t_wavelan *wavelan)
 {
   GtkWidget *dlg, *hbox, *label, *interface, *vbox, *autohide;
-  GtkWidget *autohide_missing, *header, *warn_label, *signal_colors;
+  GtkWidget *autohide_missing, *warn_label, *signal_colors;
   GtkWidget *combo;
   GList *interfaces, *lp;
 
diff --git a/panel-plugin/wi_bsd.c b/panel-plugin/wi_bsd.c
index 7976523..62327e1 100644
--- a/panel-plugin/wi_bsd.c
+++ b/panel-plugin/wi_bsd.c
@@ -158,7 +158,7 @@ wi_query(struct wi_device *device, struct wi_stats *stats)
   /* clear stats first */
   bzero((void *)stats, sizeof(*stats));
 
-  g_strlcpy(stats-ws_qunit, dBm, 4);
+  strlcpy(stats-ws_qunit, dBm, 4);
   /* check vendor (independent of carrier state) */
 #if defined(__FreeBSD_kernel__)
   if ((result = _wi_vendor(device, stats-ws_vendor, WI_MAXSTRLEN)) != WI_OK)
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master updates for 0.5.8

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 134d2477499160034c781571ff86cd2f26333b3e (commit)
   from 52c2c400da69df8f67d13616f2aebdc2be780d55 (commit)

commit 134d2477499160034c781571ff86cd2f26333b3e
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:52:04 2012 +0200

updates for 0.5.8

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

diff --git a/NEWS b/NEWS
index 4535b18..4739a45 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+0.5.8 (2012/04/09):
+-
+  * Build the plugin as an external module
+  * Add about dialog
+
 0.5.7 (2012/04/03):
 -
   * Port to libxfce4ui
diff --git a/configure.ac.in b/configure.ac.in
index 5a32124..3d132d6 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -5,7 +5,7 @@ dnl
 dnl Version information
 m4_define([xwp_version_major], [0])
 m4_define([xwp_version_minor], [5])
-m4_define([xwp_version_micro], [7])
+m4_define([xwp_version_micro], [8])
 m4_define([xwp_version], 
[xwp_version_major().xwp_version_minor().xwp_version_micro()])
 
 dnl Initial autoconf
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master oops, fix conflict

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 99df4adb72c20c38b02c5799a99353cdf07cb2e1 (commit)
   from 134d2477499160034c781571ff86cd2f26333b3e (commit)

commit 99df4adb72c20c38b02c5799a99353cdf07cb2e1
Merge: 134d247 7d6d50d
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 19:04:46 2012 +0200

oops, fix conflict

commit 7d6d50d5d90f288f295c0e0e3d2fef09149a18aa
Author: Seong-ho Cho darkcircle.0...@gmail.com
Date:   Thu Apr 5 10:39:41 2012 +0200

l10n: Updated Korean (ko) translation to 100%

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

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

 po/ko.po |   19 +++
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/po/ko.po b/po/ko.po
index 40deffa..601e494 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -8,12 +8,11 @@
 msgid 
 msgstr 
 Project-Id-Version: xfce4-wavelan-plugin.master\n
-Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-04-09 18:46+0200\n
+Report-Msgid-Bugs-To: xfce-i18n xfce-i...@xfce.org\n
+POT-Creation-Date: 2012-02-25 13:33+\n
 PO-Revision-Date: 2012-02-26 00:55+0900\n
-Last-Translator: Sung Jin Gang u...@ujuc.kr\n
-Language-Team: xfce4-users-kr-i18n xfce4-users-kr-i18n@lists.sourceforge.
-net\n
+Last-Translator: Seong-ho Cho darkcircle.0...@gmail.com\n
+Language-Team: xfce-i18n xfce-i...@xfce.org\n
 Language: ko\n
 MIME-Version: 1.0\n
 Content-Type: text/plain; charset=UTF-8\n
@@ -48,13 +47,9 @@ msgstr 연결이 없으면 자동으로 숨기기(_A)
 msgid Autohide when no hardware present
 msgstr 장치가 없으면 자동으로 숨기기
 
-#: ../panel-plugin/wavelan.c:570
-msgid 
-Note: This will make it difficult to remove or configure the plugin if there 
-is no device detected.
-msgstr 
-참고: 장치가 감지되지 않은 경우에는 플러그인을 없애거나 설정하기 어렵게 되는 
-경우가 있습니다.
+#: ../panel-plugin/wavelan.c:565
+msgid Note: This will make it difficult to remove or configure the plugin if 
there is no device detected.
+msgstr 참고: 장치를 감지하지 못한 경우에는 플러그인 제거나 설정이 어려워질 수 있습니다.
 
 #: ../panel-plugin/wavelan.c:578
 msgid Enable signal quality colors
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin|xfce4-wavelan-plugin-0.5.8 Creating annotated tag xfce4-wavelan-plugin-0.5.8

2012-04-09 Thread Landry Breuil
Updating annotated tag refs/tags/xfce4-wavelan-plugin-0.5.8
 as new annotated tag
 to f3ad115ad5ed18c7d96ceabc1f85c6afd2908675 (tag)
   succeeds xfce4-wavelan-plugin-0.5.7-7-g52c2c40
  tagged by Landry Breuil lan...@xfce.org
 on 2012-04-09 18:52 +0200

Landry Breuil (1):
  updates for 0.5.8

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


[Xfce4-commits] xfce4-mpc-plugin:master update comment in makefile

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to c9b39f33c4bb678b7026e2a1d8d488983233bd24 (commit)
   from 00dac711366c0d4ced566e3f310eaa1b6eb736ce (commit)

commit c9b39f33c4bb678b7026e2a1d8d488983233bd24
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:01:32 2012 +0200

update comment in makefile

 panel-plugin/Makefile.am |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index fc478a2..23b3c38 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -29,10 +29,8 @@ endif
 
 # .desktop file
 #
-# Some automake trickery here. Because we cannot use $(libexecdir) in the
-# automake stage, we'll use sed to get the full path into the .desktop file.
-# We also need to let intltool merge the translated fields, so we add an
-# additional level of indirection: a name.desktop.in.in file.
+# We need to let intltool merge the translated fields, so we add a
+# level of indirection: a name.desktop.in file.
 # 
 desktop_in_files = xfce4-mpc-plugin.desktop.in

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


[Xfce4-commits] xfce4-diskperf-plugin:master Compile the plugin as a module.

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to e3097b9c60e397ed675213b4f981b752d9368b2b (commit)
   from b3c80d817eef1165d5fecceaa13ea0159092a77f (commit)

commit e3097b9c60e397ed675213b4f981b752d9368b2b
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 17:22:31 2012 +0200

Compile the plugin as a module.

- Switch from _PROGRAMS to _LTLIBRARIES
- Register the plugin as not external
- Rename .desktop.in.in to .desktop.in
- install plugin/desktop file in the correct panel/plugins dir

 panel-plugin/Makefile.am   |   41 +---
 ...{diskperf.desktop.in.in = diskperf.desktop.in} |2 +-
 panel-plugin/main.c|2 +-
 3 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 79b2796..00e2416 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -4,52 +4,47 @@ INCLUDES =
\
-DPACKAGE_LOCALE_DIR=\$(localedir)\
 
 #
-# Diskpef Plugin
+# Diskperf Plugin
 #
-plugindir =\
-   $(libexecdir)/xfce4/panel-plugins
+plugindir = $(libexecdir)/xfce4/panel/plugins
 
-plugin_PROGRAMS =  \
-   xfce4-diskperf-plugin
+plugin_LTLIBRARIES = libdiskperf.la
 
-xfce4_diskperf_plugin_SOURCES =\
+libdiskperf_la_SOURCES =   \
main.c  \
config_gui.c\
config_gui.h\
devperf.c   \
devperf.h
 
-xfce4_diskperf_plugin_CFLAGS = \
+libdiskperf_la_CFLAGS =\
$(LIBXFCE4PANEL_CFLAGS) \
$(LIBXFCE4UI_CFLAGS)
 
-xfce4_diskperf_plugin_LDADD=   \
+libdiskperf_la_LIBADD= \
$(LIBM) \
$(LIBXFCE4PANEL_LIBS)   \
$(LIBXFCE4UI_LIBS)
 
+libdiskperf_la_LDFLAGS = \
+   -avoid-version \
+   -module \
+   -no-undefined \
+   -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+   $(PLATFORM_LDFLAGS)
+
 #
 # Desktop file
 #
-desktopdir = $(datadir)/xfce4/panel-plugins
-desktop_in_in_files = diskperf.desktop.in.in
-
-desktop_in_files = \
-   $(desktop_in_in_files:.desktop.in.in=.desktop.in)
-
-%.desktop.in: %.desktop.in.in
-   sed -e s,\@libexecdir\@,$(libexecdir),g  $  $@
+desktopdir = $(datadir)/xfce4/panel/plugins
+desktop_in_files = diskperf.desktop.in
 
-desktop_DATA = \
-   $(desktop_in_files:.desktop.in=.desktop)
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST =   \
-   $(desktop_in_in_files)
+EXTRA_DIST = $(desktop_in_files)
 
-DISTCLEANFILES =   \
-   $(desktop_DATA) \
-   $(desktop_in_files)
+DISTCLEANFILES = $(desktop_DATA)
 
 # vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
diff --git a/panel-plugin/diskperf.desktop.in.in 
b/panel-plugin/diskperf.desktop.in
similarity index 66%
rename from panel-plugin/diskperf.desktop.in.in
rename to panel-plugin/diskperf.desktop.in
index 7669b00..1f2778b 100644
--- a/panel-plugin/diskperf.desktop.in.in
+++ b/panel-plugin/diskperf.desktop.in
@@ -4,5 +4,5 @@ Encoding=UTF-8
 _Name=Disk Performance Monitor
 _Comment=Show disk performance
 Icon=gtk-harddisk
-X-XFCE-Exec=@libexecdir@/xfce4/panel-plugins/xfce4-diskperf-plugin
+X-XFCE-Exec=diskperf
 
diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 0822ed8..5afcdbe 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -1172,4 +1172,4 @@ static void diskperf_construct (XfcePanelPlugin *plugin)
 SetTimer (diskperf);
 }
 
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (diskperf_construct);
+XFCE_PANEL_PLUGIN_REGISTER (diskperf_construct);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master oops, install under libdir not libexecdir

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 37005a3f60600b23bc20da712857b84506cf2995 (commit)
   from 5d33433563b708c2df5ffbced230401b28f1067c (commit)

commit 37005a3f60600b23bc20da712857b84506cf2995
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 17:40:59 2012 +0200

oops, install under libdir not libexecdir

 panel-plugin/Makefile.am |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 00e2416..602ecea 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES =  
\
 #
 # Diskperf Plugin
 #
-plugindir = $(libexecdir)/xfce4/panel/plugins
+plugindir = $(libdir)/xfce4/panel/plugins
 
 plugin_LTLIBRARIES = libdiskperf.la
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master use correct X-XFCE stanzas in desktop file

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to bfb820205db6037a517aad8de86dfcf47b43fde2 (commit)
   from 37005a3f60600b23bc20da712857b84506cf2995 (commit)

commit bfb820205db6037a517aad8de86dfcf47b43fde2
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 17:53:42 2012 +0200

use correct X-XFCE stanzas in desktop file

 panel-plugin/diskperf.desktop.in |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/diskperf.desktop.in b/panel-plugin/diskperf.desktop.in
index 1f2778b..e9f78bf 100644
--- a/panel-plugin/diskperf.desktop.in
+++ b/panel-plugin/diskperf.desktop.in
@@ -4,5 +4,6 @@ Encoding=UTF-8
 _Name=Disk Performance Monitor
 _Comment=Show disk performance
 Icon=gtk-harddisk
-X-XFCE-Exec=diskperf
+X-XFCE-Internal=FALSE
+X-XFCE-module=diskperf
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master updates for 2.5.0 release

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 0e25d34ce8995e27a898e429104efabf001f9216 (commit)
   from 769607bf07aad1e48595232fe7bdcb11e5556598 (commit)

commit 0e25d34ce8995e27a898e429104efabf001f9216
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:08:18 2012 +0200

updates for 2.5.0 release

 NEWS|4 
 configure.ac.in |2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 1476d92..0f1f318 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+2.5.0 (2012/4/9):
+-
+ * Build the plugin as a module
+
 2.4.0 (2012/4/3):
 -
  * Port to libxfce4ui (bug #8099)
diff --git a/configure.ac.in b/configure.ac.in
index a24a001..d3198c6 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -4,7 +4,7 @@ dnl 2003, 2004 Roger Seguin roger_seg...@msn.com
 dnl
 
 m4_define([diskperf_version_major], [2])
-m4_define([diskperf_version_minor], [4])
+m4_define([diskperf_version_minor], [5])
 m4_define([diskperf_version_micro], [0])
 m4_define([diskperf_version_build], [@REVISION@])
 m4_define([diskperf_version_tag], []) # leave empty for releases
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Use drive-harddisk instead of deprecated gtk-harddisk

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 769607bf07aad1e48595232fe7bdcb11e5556598 (commit)
   from bfb820205db6037a517aad8de86dfcf47b43fde2 (commit)

commit 769607bf07aad1e48595232fe7bdcb11e5556598
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:06:30 2012 +0200

Use drive-harddisk instead of deprecated gtk-harddisk

While here, display the icon in about  properties dialog

 panel-plugin/diskperf.desktop.in |5 ++---
 panel-plugin/main.c  |5 -
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/diskperf.desktop.in b/panel-plugin/diskperf.desktop.in
index e9f78bf..a241104 100644
--- a/panel-plugin/diskperf.desktop.in
+++ b/panel-plugin/diskperf.desktop.in
@@ -3,7 +3,6 @@ Type=X-XFCE-PanelPlugin
 Encoding=UTF-8
 _Name=Disk Performance Monitor
 _Comment=Show disk performance
-Icon=gtk-harddisk
+Icon=drive-harddisk
 X-XFCE-Internal=FALSE
-X-XFCE-module=diskperf
-
+X-XFCE-Module=diskperf
diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 5afcdbe..91ddc66 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -898,10 +898,13 @@ static int CheckStatsAvailability ()
 static void About (Widget_t w, void *unused)
/* Called back when the About button in clicked */
 {
+   GdkPixbuf *icon;
const gchar *auth[] = { Roger Seguin roger_seg...@msn.com,
NetBSD statistics collection: (c) 2003 Benedikt Meurer 
benedikt.meu...@unix-ag.uni-siegen.de,
Solaris statistics collection: (c) 2011 Peter Tribble 
peter.trib...@gmail.com, NULL };
+   icon = xfce_panel_pixbuf_from_source(drive-harddisk, NULL, 32);
gtk_show_about_dialog(NULL,
+  logo, icon,
   license, xfce_get_license_text (XFCE_LICENSE_TEXT_BSD),
   version, PACKAGE_VERSION,
   program-name, PACKAGE_NAME,
@@ -951,7 +954,7 @@ static void diskperf_create_options (XfcePanelPlugin 
*plugin,
   G_CALLBACK (diskperf_dialog_response), poPlugin);
 
 gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_CENTER);
-gtk_window_set_icon_name (GTK_WINDOW (dlg), xfce4-settings);
+gtk_window_set_icon_name (GTK_WINDOW (dlg), drive-harddisk);
 
 vbox = gtk_vbox_new(FALSE, BORDER);
 gtk_container_set_border_width (GTK_CONTAINER (vbox), BORDER - 2);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master unref the icon after use

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to c1244ca5c0f0d6735530c44219915501796549a4 (commit)
   from 0e25d34ce8995e27a898e429104efabf001f9216 (commit)

commit c1244ca5c0f0d6735530c44219915501796549a4
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 18:16:54 2012 +0200

unref the icon after use

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

diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 91ddc66..05ce707 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -912,6 +912,8 @@ static void About (Widget_t w, void *unused)
   website, 
http://goodies.xfce.org/projects/panel-plugins/xfce4-diskperf-plugin;,
   copyright, _(Copyright (c) 2003, 2004 Roger Seguin),
   authors, auth, NULL);
+   if(icon)
+  g_object_unref(G_OBJECT(icon));
 }  /* About() */
 
/**/
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-diskperf-plugin:master Merge branch 'master' of git://git.xfce.org/panel-plugins/xfce4-diskperf-plugin

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 54a7c6684f4f9e2f292a61c2f855caf10258a3aa (commit)
   from c1244ca5c0f0d6735530c44219915501796549a4 (commit)

commit 54a7c6684f4f9e2f292a61c2f855caf10258a3aa
Merge: c1244ca f1ed1b7
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 19:05:24 2012 +0200

Merge branch 'master' of 
git://git.xfce.org/panel-plugins/xfce4-diskperf-plugin

commit f1ed1b7cc2245a186852b64b358575745a4f4746
Author: Seong-ho Cho darkcircle.0...@gmail.com
Date:   Thu Apr 5 09:16:05 2012 +0200

l10n: Updated Korean (ko) translation to 100%

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

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

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

diff --git a/po/ko.po b/po/ko.po
index 286c654..2b24ded 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -161,7 +161,7 @@ msgid 
 Please remove it.
 msgstr 
 %s: 디스크 확장 통계를 찾을 수 없습니다!\n
-커널이 오래 되었거나 ( 2.4.20) \n
+커널이 오래되었거나 ( 2.4.20) \n
 CONFIG_BLK_STATS을 켜고 컴파일 하지 않았습니다.\n
 \n
 이 감시기는 동작하지 않을 것입니다!\n
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Make the icon optional (bug #7520)

2012-04-09 Thread Landry Breuil
Updating branch refs/heads/master
 to 4c05471e855a5e83ef334873cdaef9754e12c2f0 (commit)
   from 99df4adb72c20c38b02c5799a99353cdf07cb2e1 (commit)

commit 4c05471e855a5e83ef334873cdaef9754e12c2f0
Author: Landry Breuil lan...@xfce.org
Date:   Mon Apr 9 22:56:46 2012 +0200

Make the icon optional (bug #7520)

add a checkbox allowing to hide/show the icon, and the necessary
callbacks/config save/reading. Adapted from debian bug #552765.

 panel-plugin/wavelan.c |   32 +++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/wavelan.c b/panel-plugin/wavelan.c
index 94660a4..fc381bf 100644
--- a/panel-plugin/wavelan.c
+++ b/panel-plugin/wavelan.c
@@ -57,6 +57,7 @@ typedef struct
   gboolean autohide;
   gboolean autohide_missing;
   gboolean signal_colors;
+  gboolean show_icon;
 
   int size;
   GtkOrientation orientation;
@@ -118,6 +119,12 @@ wavelan_set_state(t_wavelan *wavelan, gint state)
   else
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(wavelan-signal), 0.0);
 
+  /* hide icon */
+  if (wavelan-show_icon)
+gtk_widget_show(wavelan-image);
+  else
+gtk_widget_hide(wavelan-image);
+
   /* hide if no network  autohide or if no card found */
   if (wavelan-autohide  state == 0)
 gtk_widget_hide(wavelan-ebox);
@@ -266,6 +273,7 @@ wavelan_read_config(XfcePanelPlugin *plugin, t_wavelan 
*wavelan)
   wavelan-autohide = xfce_rc_read_bool_entry (rc, Autohide, FALSE);
   wavelan-autohide_missing = xfce_rc_read_bool_entry(rc, 
AutohideMissing, FALSE);
   wavelan-signal_colors = xfce_rc_read_bool_entry(rc, SignalColors, 
FALSE);
+  wavelan-show_icon = xfce_rc_read_bool_entry(rc, ShowIcon, FALSE);
 }
   }
 
@@ -298,6 +306,7 @@ wavelan_new(XfcePanelPlugin *plugin)
   wavelan-autohide_missing = FALSE;
 
   wavelan-signal_colors = TRUE;
+  wavelan-show_icon = TRUE;
 
   wavelan-plugin = plugin;
   
@@ -404,6 +413,7 @@ wavelan_write_config(XfcePanelPlugin *plugin, t_wavelan 
*wavelan)
   xfce_rc_write_bool_entry (rc, Autohide, wavelan-autohide);
   xfce_rc_write_bool_entry (rc, AutohideMissing, wavelan-autohide_missing);
   xfce_rc_write_bool_entry (rc, SignalColors, wavelan-signal_colors);
+  xfce_rc_write_bool_entry (rc, ShowIcon, wavelan-show_icon);
 
   xfce_rc_close(rc);
   
@@ -469,6 +479,15 @@ wavelan_autohide_missing_changed(GtkToggleButton *button, 
t_wavelan *wavelan)
   wavelan_set_state(wavelan, wavelan-state);
 }
 
+/* show icon callback */
+static void
+wavelan_show_icon_changed(GtkToggleButton *button, t_wavelan *wavelan)
+{
+  TRACE (Entered wavelan_show_icon_changed);
+  wavelan-show_icon = gtk_toggle_button_get_active(button);
+  wavelan_set_state(wavelan, wavelan-state);
+}
+
 /* signal colors callback */
 static void
 wavelan_signal_colors_changed(GtkToggleButton *button, t_wavelan *wavelan)
@@ -493,7 +512,7 @@ static void
 wavelan_create_options (XfcePanelPlugin *plugin, t_wavelan *wavelan)
 {
   GtkWidget *dlg, *hbox, *label, *interface, *vbox, *autohide;
-  GtkWidget *autohide_missing, *warn_label, *signal_colors;
+  GtkWidget *autohide_missing, *warn_label, *signal_colors, *show_icon;
   GtkWidget *combo;
   GList *interfaces, *lp;
 
@@ -584,6 +603,17 @@ wavelan_create_options (XfcePanelPlugin *plugin, t_wavelan 
*wavelan)
   gtk_box_pack_start(GTK_BOX(hbox), signal_colors, TRUE, TRUE, 1);
   gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 1);
 
+  hbox = gtk_hbox_new(FALSE, 2);
+  gtk_widget_show(hbox);
+  show_icon = gtk_check_button_new_with_label(_(Show icon));
+  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(show_icon), 
+  wavelan-show_icon);
+  g_signal_connect(show_icon, toggled, 
+  G_CALLBACK(wavelan_show_icon_changed), wavelan);
+  gtk_widget_show(show_icon);
+  gtk_box_pack_start(GTK_BOX(hbox), show_icon, TRUE, TRUE, 1);
+  gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 1);
+
   for (lp = interfaces; lp != NULL; lp = lp -next)
 g_free (lp-data);
   g_list_free (interfaces);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master xfce4-panel 4.9+ compatibility fix

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to f53faa96cce001341dbdf80f8511e751b1c50eb2 (commit)
   from d15f3b61f842efd862b2cd2fd2ab9cfafffbcd78 (commit)

commit f53faa96cce001341dbdf80f8511e751b1c50eb2
Author: Andrzej ndrwr...@gmail.com
Date:   Tue Apr 3 21:13:09 2012 +0900

xfce4-panel 4.9+ compatibility fix

Signed-off-by: Landry Breuil lan...@xfce.org

 panel-plugin/mount-plugin.c |   16 +++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 72a9325..610 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -24,6 +24,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 #include mount-plugin.h
 
+#ifdef LIBXFCE4PANEL_CHECK_VERSION
+#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+#define HAS_PANEL_49
+#endif
+#endif
+
+
 static void
 on_message_dialog_response (GtkWidget *widget, gpointer *data)
 {
@@ -86,7 +93,10 @@ static void
 mounter_set_size (XfcePanelPlugin *plugin, int size, t_mounter *mt)
 {
/* shrink the gtk button's image to new size -*/
-   gtk_widget_set_size_request (GTK_WIDGET(mt-button), size - 4, size - 4);
+#ifdef HAS_PANEL_49
+   size /= xfce_panel_plugin_get_nrows (plugin);
+#endif
+   gtk_widget_set_size_request (GTK_WIDGET(mt-button), size, size);
 
 }
 
@@ -1051,6 +1061,10 @@ mount_construct (XfcePanelPlugin *plugin)
xfce_iconbutton_set_pixbuf (XFCE_ICONBUTTON(mounter-button),
mounter-button_pb);
 
+#ifdef HAS_PANEL_49
+xfce_panel_plugin_set_small (plugin, TRUE);
+#endif
+
 g_signal_connect (plugin, free-data, G_CALLBACK (mounter_free), mounter);
 
 g_signal_connect (plugin, save, G_CALLBACK (mounter_write_config),
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Use @LINGUAS@ instead of a hardcoded list, and rename configure.ac{, .in}

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to a5ac4af6339064a044a74146d5841db05cc163ff (commit)
   from f53faa96cce001341dbdf80f8511e751b1c50eb2 (commit)

commit a5ac4af6339064a044a74146d5841db05cc163ff
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 11:19:22 2012 +0200

Use @LINGUAS@ instead of a hardcoded list, and rename configure.ac{,.in}

 configure.ac = configure.ac.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac.in
similarity index 96%
rename from configure.ac
rename to configure.ac.in
index 0eff5fd..ac7bab7 100644
--- a/configure.ac
+++ b/configure.ac.in
@@ -63,7 +63,7 @@ XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.20])
 XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.20])
 
 dnl Check for i18n support
-XDT_I18N([ca cs de el en_GB eu fr gl hu ja ko lt nb_NO pl pt_PT pt_BR ru sq uk 
vi zh_TW])
+XDT_I18N([@LINGUAS@])
 
 dnl Check for debugging support
 XDT_FEATURE_DEBUG()
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master use major.minor.micro standard macros for version definition

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to ce83d1f1379ca8e746ef060f48a8698f36dfd238 (commit)
   from a5ac4af6339064a044a74146d5841db05cc163ff (commit)

commit ce83d1f1379ca8e746ef060f48a8698f36dfd238
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 11:29:34 2012 +0200

use major.minor.micro standard macros for version definition

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

diff --git a/configure.ac.in b/configure.ac.in
index ac7bab7..c7170aa 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -7,7 +7,12 @@ dnl 2005-2008 Fabian Nowak timyst...@arcor.de
 dnl
 dnl for Xfce4-panel 4.3 and higher only!
 
-m4_define([mount_version],[0.5.7])
+m4_define([mount_version_major], [0])
+m4_define([mount_version_minor], [5])
+m4_define([mount_version_micro], [7])
+m4_define([mount_version_tag], [git]) # Leave empty for releases
+m4_define([mount_version_build], [@REVISION@])
+m4_define([mount_version], 
[mount_version_major().mount_version_minor().mount_version_micro()ifelse(mount_version_tag(),
 [], [], [mount_version_tag()-mount_version_build()])])
 
 AC_INIT([xfce4-mount-plugin], [mount_version],
[timyst...@arcor.de])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Add support for systems with getmntinfo() (BSDs)

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 599edfef58711a2635fbee81aa71a3b8e44a46b5 (commit)
   from ce83d1f1379ca8e746ef060f48a8698f36dfd238 (commit)

commit 599edfef58711a2635fbee81aa71a3b8e44a46b5
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 12:15:43 2012 +0200

Add support for systems with getmntinfo() (BSDs)

- detect if either getmntent() or getmntinfo() is available
- do the #ifdef/#elif dance

Mostly adapted from patches i wrote when porting mount plugin
to OpenBSD two years and a half ago..

 configure.ac.in|2 +
 panel-plugin/devices.c |   79 ++--
 2 files changed, 78 insertions(+), 3 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index c7170aa..fcb4c59 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -40,6 +40,8 @@ dnl Substitute in Makefiles
 AC_SUBST(OS)
 
 AC_CHECK_FUNCS([gethostname])
+AC_CHECK_FUNCS([getmntent])
+AC_CHECK_FUNCS([getmntinfo])
 AC_CHECK_FUNCS([memset])
 AC_CHECK_FUNCS([socket])
 AC_CHECK_FUNCS([strstr])
diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index cdfb82f..99b52e8 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -20,12 +20,23 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#ifdef HAVE_CONFIG_H
+#include config.h
+#endif
+
 #include fstab.h
 #include glib.h
-#include mntent.h
 #include stdio.h
 #include string.h
+#ifdef HAVE_GETMNTENT
+#include mntent.h
 #include sys/vfs.h
+#elif HAVE_GETMNTINFO
+#include sys/param.h
+#include sys/mount.h
+#else
+#error no getmntent/getmntinfo ? send patches !
+#endif
 
 #include libxfce4panel/xfce-panel-plugin.h
 #include libxfce4util/libxfce4util.h
@@ -550,10 +561,14 @@ exclude_filesystem (GPtrArray *excluded_FSs, gchar 
*mountpoint, gchar *device)
 void
 disks_refresh(GPtrArray * pdisks, GPtrArray *excluded_FSs)
 {
-/* using getmntent to get filesystems mount information */
+/* using getmntent/getmntinfo to get filesystems mount information */
 
+#ifdef HAVE_GETMNTENT
 FILE * fmtab = NULL; /* file /etc/mtab */
 struct mntent * pmntent = NULL; /* struct for mnt info */
+#elif HAVE_GETMNTINFO
+int i, nb_mounted_fs = 0;
+#endif
 struct statfs * pstatfs = NULL;
 gboolean exclude =  FALSE;
 
@@ -565,32 +580,51 @@ disks_refresh(GPtrArray * pdisks, GPtrArray *excluded_FSs)
 /* remove t_mount_info for all devices */
 disks_free_mount_info (pdisks);
 
+#ifdef HAVE_GETMNTENT
 /* allocate new struct statfs */
 pstatfs = g_new0 (struct statfs, 1);
 
 /* open file */
 fmtab = setmntent (MTAB, r); /* mtab file */
+#elif HAVE_GETMNTINFO
+/* get mounted fs */
+nb_mounted_fs = getmntinfo(pstatfs,MNT_WAIT);
+#endif
 
 /* start looking for mounted devices */
+#ifdef HAVE_GETMNTENT
 for (pmntent=getmntent(fmtab); pmntent!=NULL; pmntent=getmntent(fmtab)) {
 
 DBG ( have entry: %s on %s \n, pmntent-mnt_fsname, pmntent-mnt_dir 
);
 
 statfs (pmntent-mnt_dir, pstatfs);
+#elif HAVE_GETMNTINFO
+for (i = 0; i  nb_mounted_fs ; i++) {
+DBG ( have entry: %s on %s : type %s\n, pstatfs[i].f_mntfromname, 
pstatfs[i].f_mntonname, pstatfs[i].f_fstypename );
+#endif
 
 /* if we got the stat and the block number is non-zero */
 
 /* get pointer on disk from pdisks */
 /* CHANGED to reflect change in disk_search */
+#ifdef HAVE_GETMNTENT
 pdisk = disks_search (pdisks, pmntent-mnt_dir);
+#elif HAVE_GETMNTINFO
+pdisk = disks_search (pdisks, pstatfs[i].f_mntonname);
+#endif
 if (excluded_FSs!=NULL)
+#ifdef HAVE_GETMNTENT
 exclude = exclude_filesystem (excluded_FSs, pmntent-mnt_dir, 
pmntent-mnt_fsname);
+#elif HAVE_GETMNTINFO
+exclude = exclude_filesystem (excluded_FSs, 
pstatfs[i].f_mntonname, pstatfs[i].f_mntfromname);
+#endif
 
 if (pdisk == NULL) { /* if disk is not found in pdisks */
 
 /* create a new struct t_disk and add it to pdisks */
 /* test for mnt_dir==none or neither block device nor NFS or 
system device */
 if ( exclude ||
+#ifdef HAVE_GETMNTENT
   g_ascii_strcasecmp(pmntent-mnt_dir, none) == 0 ||
   !(g_str_has_prefix(pmntent-mnt_fsname, /dev/) ||
   g_str_has_prefix(pmntent-mnt_type, fuse) ||
@@ -599,25 +633,43 @@ disks_refresh(GPtrArray * pdisks, GPtrArray *excluded_FSs)
   g_str_has_prefix(pmntent-mnt_type, cifs) ||
   g_str_has_prefix(pmntent-mnt_type, shfs) ) ||
   g_str_has_prefix(pmntent-mnt_dir, /sys/)
-
+#elif HAVE_GETMNTINFO
+  /* TODO: add support for more fs types on BSD */
+  g_ascii_strcasecmp(pstatfs[i].f_mntonname, none) == 0 ||
+  !g_str_has_prefix(pstatfs[i].f_mntfromname, /dev/) ||
+  g_str_has_prefix(pstatfs[i].f_fstypename, nfs) ||
+  g_str_has_prefix(pstatfs[i

[Xfce4-commits] xfce4-mount-plugin:master Compile the plugin as a module.

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to d91c15bb1cb5ffa64e8c97e3bc95bb4b91182444 (commit)
   from 599edfef58711a2635fbee81aa71a3b8e44a46b5 (commit)

commit d91c15bb1cb5ffa64e8c97e3bc95bb4b91182444
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 12:38:57 2012 +0200

Compile the plugin as a module.

- Switch from _PROGRAMS to _LTLIBRARIES
- Register the plugin as not external
- Rename .desktop.in.in to .desktop.in
- install plugin/desktop file in the correct panel/plugins dir

 configure.ac.in|4 ++
 panel-plugin/Makefile.am   |   40 
 panel-plugin/mount-plugin.c|2 +-
 ...desktop.in.in = xfce4-mount-plugin.desktop.in} |4 +-
 4 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index fcb4c59..ed3c6dd 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -33,6 +33,10 @@ AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_INTLTOOL
 
+dnl Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
 dnl Check for standard header files
 AC_HEADER_STDC
 
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 990de3f..0cd803a 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,9 +1,9 @@
-plugindir = $(libexecdir)/xfce4/panel-plugins
-plugin_PROGRAMS = xfce4-mount-plugin
+plugindir = $(libdir)/xfce4/panel/plugins
+plugin_LTLIBRARIES = libmount.la
 
 LIBS = @LIBS@ @SOLLIBS@
 
-xfce4_mount_plugin_SOURCES =\
+libmount_la_SOURCES =\
devices.c   \
devices.h   \
mount-plugin.c  \
@@ -11,37 +11,37 @@ xfce4_mount_plugin_SOURCES =
\
helpers.c   \
helpers.h
 
-xfce4_mount_plugin_CFLAGS = \
+libmount_la_CFLAGS =\
-DPACKAGE_LOCALE_DIR=\$(localedir)\   \
@LIBXFCE4PANEL_CFLAGS@  \
@LIBXFCEGUI4_CFLAGS@
 
-xfce4_mount_plugin_LDADD =\
+libmount_LIBADD =\
@SOLLIBS@   \
@LIBXFCE4PANEL_LIBS@\
@LIBXFCEGUI4_LIBS@
 
+libmount_la_LDFLAGS = \
+   -avoid-version \
+   -module \
+   -no-undefined \
+   -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+   $(PLATFORM_LDFLAGS)
+
 # .desktop file
 #
-# Some automake trickery here. Because we cannot use $(libexecdir) in the
-# automake stage, we'll use sed to get the full path into the .desktop file.
-# We also need to let intltool merge the translated fields, so we add an
-# additional level of indirection: a name.desktop.in.in file.
-# 
-desktop_in_in_files = xfce4-mount-plugin.desktop.in.in
-desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
+desktop_in_files = xfce4-mount-plugin.desktop.in

-desktopdir = $(datadir)/xfce4/panel-plugins
+desktopdir = $(datadir)/xfce4/panel/plugins
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
 EXTRA_DIST =   
\
icons.h 
\
kcmpartitions.png   
\
-   $(desktop_in_in_files)
+   $(desktop_in_files)
 
-DISTCLEANFILES =   
\
-   $(desktop_DATA) $(desktop_in_files)
+DISTCLEANFILES = $(desktop_DATA)

 noinst_DATA =  
   \
icons.h 
 \
@@ -50,11 +50,3 @@ noinst_DATA =
   \
 icons.h: $(srcdir)/kcmpartitions.png
gdk-pixbuf-csource --raw --build-list   \
icon_plugin kcmpartitions.png  icons.h
-   
-# get full path into .desktop file
-%.desktop.in: %.desktop.in.in
-   sed -e s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^ \
-   $  $@
-
-
-
diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 610..d6f6449 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -1083,4 +1083,4 @@ mount_construct (XfcePanelPlugin *plugin)
 
 }
 
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (mount_construct

[Xfce4-commits] xfce4-mount-plugin:master Check for libxfce4ui-1 and libxfce4panel-1.0 4.8.0

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 37e2535f65d53665caf21d1efe7281e36459e9db (commit)
   from 16759c995da007db32c67fa6bdbaf1f6aa7b6618 (commit)

commit 37e2535f65d53665caf21d1efe7281e36459e9db
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 18:58:03 2012 +0200

Check for libxfce4ui-1 and libxfce4panel-1.0 4.8.0

 configure.ac.in |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac.in b/configure.ac.in
index ed3c6dd..d89c833 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -70,8 +70,8 @@ AC_CHECK_LIB(nsl, kstat_open, SOLLIBS=$SOLLIBS -linet_ntop, 
SOLLIBS=$SOLLIBS
 AC_SUBST(SOLLIBS)
 
 dnl configure the panel plugin
-XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.3.20])
-XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.20])
+XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
 
 dnl Check for i18n support
 XDT_I18N([@LINGUAS@])
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Port to libxfce4ui [wip]

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 16759c995da007db32c67fa6bdbaf1f6aa7b6618 (commit)
   from d91c15bb1cb5ffa64e8c97e3bc95bb4b91182444 (commit)

commit 16759c995da007db32c67fa6bdbaf1f6aa7b6618
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 18:57:05 2012 +0200

Port to libxfce4ui [wip]

The icon size is wrong, i'll see what i can do

 panel-plugin/Makefile.am|6 +++---
 panel-plugin/devices.c  |   11 +--
 panel-plugin/mount-plugin.c |   14 ++
 panel-plugin/mount-plugin.h |3 ---
 4 files changed, 14 insertions(+), 20 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 0cd803a..ca36c7a 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -14,12 +14,12 @@ libmount_la_SOURCES =\
 libmount_la_CFLAGS =\
-DPACKAGE_LOCALE_DIR=\$(localedir)\   \
@LIBXFCE4PANEL_CFLAGS@  \
-   @LIBXFCEGUI4_CFLAGS@
+   @LIBXFCE4UI_CFLAGS@
 
-libmount_LIBADD =\
+libmount_la_LIBADD =\
@SOLLIBS@   \
@LIBXFCE4PANEL_LIBS@\
-   @LIBXFCEGUI4_LIBS@
+   @LIBXFCE4UI_LIBS@
 
 libmount_la_LDFLAGS = \
-avoid-version \
diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 99b52e8..ffdd115 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -40,8 +40,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 #include libxfce4panel/xfce-panel-plugin.h
 #include libxfce4util/libxfce4util.h
-#include libxfcegui4/xfce-exec.h
-#include libxfcegui4/dialogs.h
+#include libxfce4ui/libxfce4ui.h
 
 #include devices.h
 
@@ -266,9 +265,9 @@ disk_mount (t_disk *pdisk, char *on_mount_cmd, char* 
mount_command, gboolean eje
 g_printf (cmd: '%s'\n, cmd);
 #endif
 
-val = xfce_exec (cmd, FALSE, FALSE, error);
+val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), cmd, 
FALSE, TRUE, error);
 if (!val)
-xfce_err (_(Mount Plugin: Error executing command.));
+xfce_dialog_show_error (NULL, error, g_strconcat (%s Cause:%%s, 
_(Mount Plugin: Error executing command.)));
 
 g_free(cmd);
 g_free(tmp);
@@ -314,10 +313,10 @@ disk_umount (t_disk *pdisk, char* umount_command, 
gboolean synchronous, gboolean
 g_printf (cmd: '%s'\n, tmp);
 #endif
 
-val = xfce_exec_sync (tmp, FALSE, FALSE, error);
+val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), tmp, 
FALSE, TRUE, error);
 
 if  (!val) {
-xfce_err (_(Mount Plugin: Error executing command.));
+xfce_dialog_show_error (NULL, error, g_strconcat (%s Cause:%%s, 
_(Mount Plugin: Error executing command.)));
 retval = ERROR;
 }
 
diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index d6f6449..ef2f221 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -23,6 +23,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #include stdlib.h
 
 #include mount-plugin.h
+#include libxfce4ui/libxfce4ui.h
 
 #ifdef LIBXFCE4PANEL_CHECK_VERSION
 #if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
@@ -92,12 +93,12 @@ on_activate_disk_display (GtkWidget *widget, t_disk * disk)
 static void
 mounter_set_size (XfcePanelPlugin *plugin, int size, t_mounter *mt)
 {
+   GtkWidget* image;
/* shrink the gtk button's image to new size -*/
 #ifdef HAS_PANEL_49
size /= xfce_panel_plugin_get_nrows (plugin);
 #endif
gtk_widget_set_size_request (GTK_WIDGET(mt-button), size, size);
-
 }
 
 /**
@@ -563,8 +564,8 @@ create_mounter_control (XfcePanelPlugin *plugin)
 
 g_assert (mounter-icon!=NULL);
 
-mounter-button_pb = gdk_pixbuf_new_from_file (mounter-icon, NULL);
-mounter-button = xfce_iconbutton_new_from_pixbuf (mounter-button_pb);
+mounter-button = gtk_button_new ();
+gtk_button_set_image (GTK_BUTTON(mounter-button), 
xfce_panel_image_new_from_source (mounter-icon));
 gtk_button_set_relief (GTK_BUTTON(mounter-button), GTK_RELIEF_NONE);
 
 gtk_tooltips_set_tip (tooltips, GTK_WIDGET(mounter-button), _(devices),
@@ -650,8 +651,7 @@ mounter_apply_options (t_mounter_dialog *md)
%s/icons/hicolor/scalable/apps/xfce-mount.svg,
PACKAGE_DATA_DIR );
 
-   mt-button_pb = gdk_pixbuf_new_from_file (mt-icon, NULL);
-   xfce_iconbutton_set_pixbuf (XFCE_ICONBUTTON(mt-button), mt-button_pb);
+gtk_button_set_image (GTK_BUTTON(mt-button), 
xfce_panel_image_new_from_source (mt-icon));
 
 TRACE (leaves mounter_apply_options);
 }
@@ -1057,9 +1057,7 @@ mount_construct (XfcePanelPlugin *plugin)
 
 mounter_read_config (plugin, mounter);
 
-mounter-button_pb = gdk_pixbuf_new_from_file (mounter-icon, NULL

[Xfce4-commits] xfce4-mount-plugin:master Don't read config/set image twice, it's already done in create_mounter_control()

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to fe290ae034b590623a7e2cd87f02bb9dc439ebea (commit)
   from 50a12d589b475ea9b9242977563417baa5fccf16 (commit)

commit fe290ae034b590623a7e2cd87f02bb9dc439ebea
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 19:06:11 2012 +0200

Don't read config/set image twice, it's already done in 
create_mounter_control()

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

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index ef2f221..7f58d92 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -1055,10 +1055,6 @@ mount_construct (XfcePanelPlugin *plugin)
 
 mounter = create_mounter_control (plugin);
 
-mounter_read_config (plugin, mounter);
-
-gtk_button_set_image (GTK_BUTTON(mounter-button), 
xfce_panel_image_new_from_source (mounter-icon));
-
 #ifdef HAS_PANEL_49
 xfce_panel_plugin_set_small (plugin, TRUE);
 #endif
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Use gtk_container_add() instead of gtk_button_set_image()

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 6206d2a5da870f564ff281395672082e332e7c71 (commit)
   from fe290ae034b590623a7e2cd87f02bb9dc439ebea (commit)

commit 6206d2a5da870f564ff281395672082e332e7c71
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 19:19:39 2012 +0200

Use gtk_container_add() instead of gtk_button_set_image()

This way the icon is properly resized. Keep a ref to the image to remove
it from the button before adding a new one in mounter_apply_options()
(thx nick for the hint)

 panel-plugin/mount-plugin.c |9 +++--
 panel-plugin/mount-plugin.h |1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 7f58d92..3d9a0ac 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -565,7 +565,9 @@ create_mounter_control (XfcePanelPlugin *plugin)
 g_assert (mounter-icon!=NULL);
 
 mounter-button = gtk_button_new ();
-gtk_button_set_image (GTK_BUTTON(mounter-button), 
xfce_panel_image_new_from_source (mounter-icon));
+mounter-image = xfce_panel_image_new_from_source (mounter-icon);
+gtk_widget_show(mounter-image);
+gtk_container_add (GTK_CONTAINER(mounter-button), mounter-image);
 gtk_button_set_relief (GTK_BUTTON(mounter-button), GTK_RELIEF_NONE);
 
 gtk_tooltips_set_tip (tooltips, GTK_WIDGET(mounter-button), _(devices),
@@ -651,7 +653,10 @@ mounter_apply_options (t_mounter_dialog *md)
%s/icons/hicolor/scalable/apps/xfce-mount.svg,
PACKAGE_DATA_DIR );
 
-gtk_button_set_image (GTK_BUTTON(mt-button), 
xfce_panel_image_new_from_source (mt-icon));
+gtk_container_remove(GTK_CONTAINER(mt-button), mt-image);
+mt-image = xfce_panel_image_new_from_source (mt-icon);
+gtk_widget_show(mt-image);
+gtk_container_add (GTK_CONTAINER(mt-button), mt-image);
 
 TRACE (leaves mounter_apply_options);
 }
diff --git a/panel-plugin/mount-plugin.h b/panel-plugin/mount-plugin.h
index 8b230a3..3322ca2 100644
--- a/panel-plugin/mount-plugin.h
+++ b/panel-plugin/mount-plugin.h
@@ -73,6 +73,7 @@ typedef struct
 gboolean eject_drives;
 gboolean showed_fstab_dialog;
 GtkWidget *button;
+GtkWidget *image;
 GtkWidget *menu;
 GPtrArray *pdisks; /* contains pointers to struct t_disk */
 } t_mounter;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master remove deprecated .spec

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 4ac8d200c2b874ccfba999fcb76d0a296f15c4e4 (commit)
   from 6206d2a5da870f564ff281395672082e332e7c71 (commit)

commit 4ac8d200c2b874ccfba999fcb76d0a296f15c4e4
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 19:36:50 2012 +0200

remove deprecated .spec

 Makefile.am|4 +---
 configure.ac.in|1 -
 xfce4-mount-plugin.spec.in |   34 --
 3 files changed, 1 insertions(+), 38 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 7745a00..78171a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,7 +27,6 @@ EXTRA_DIST =  \
NEWS
\
README  
\
TODO
\
-   xfce4-mount-plugin.spec.in  \
intltool-extract.in \
intltool-merge.in   \
intltool-update.in
@@ -35,5 +34,4 @@ EXTRA_DIST =  \
 DISTCLEANFILES =   \
intltool-extract\
intltool-merge  \
-   intltool-update \
-   xfce4-mount-plugin.spec
+   intltool-update
diff --git a/configure.ac.in b/configure.ac.in
index d89c833..349e869 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -99,7 +99,6 @@ AC_DEFINE_UNQUOTED([PACKAGE_DATA_DIR], 
${packageprefix}/${packagedatadir}, [D
 
 AC_OUTPUT([
 Makefile
-xfce4-mount-plugin.spec
 panel-plugin/Makefile
 icons/Makefile
 po/Makefile.in
diff --git a/xfce4-mount-plugin.spec.in b/xfce4-mount-plugin.spec.in
deleted file mode 100644
index e192bbf..000
--- a/xfce4-mount-plugin.spec.in
+++ /dev/null
@@ -1,34 +0,0 @@
-Summary:   Mount plugin for the Xfce panel
-Name:  xfce4-mount-plugin
-Version:   @VERSION@
-Release:   1
-License:   GPL
-URL:   http://xfce-goodies.berlios.de/
-Source0:   %{name}-%{version}.tar.gz
-Group: User Interface/Desktops
-BuildRoot: %{_tmppath}/%{name}-root
-Requires:  xfce4-panel = @XFCE4_PANEL_REQUIRED_VERSION@
-BuildRequires: xfce4-panel = @XFCE4_PANEL_REQUIRED_VERSION@
-
-%description
-This plugin allows to mount/unmount file systems.
-
-%prep
-%setup -q
-
-%build
-%configure
-make
-
-%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%defattr(-,root,root)
-%doc AUTHORS COPYING ChangeLog INSTALL README TODO
-%{_libdir}/xfce4/panel-plugins/
-%{_datadir}/
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Use drive-harddisk instead of xfce-mount in properties dialog/desktop file

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 60d4358a82d98b1fbd4ef3d20f9881ed1585f390 (commit)
   from 4ac8d200c2b874ccfba999fcb76d0a296f15c4e4 (commit)

commit 60d4358a82d98b1fbd4ef3d20f9881ed1585f390
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 19:44:08 2012 +0200

Use drive-harddisk instead of xfce-mount in properties dialog/desktop file

Remove old xfce-mount.png icon. Much better to use a standard icon.

 icons/Makefile.am  |7 +--
 icons/xfce-mount.png   |  Bin 1990 - 0 bytes
 panel-plugin/mount-plugin.c|   13 +++--
 panel-plugin/xfce4-mount-plugin.desktop.in |2 +-
 4 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/icons/Makefile.am b/icons/Makefile.am
index fc57ddf..01a32a2 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -1,13 +1,8 @@
-hicolor48dir = $(datadir)/icons/hicolor/48x48/apps
-
-hicolor48_DATA = \
-   xfce-mount.png
-   
 hicolorSVGdir = $(datadir)/icons/hicolor/scalable/apps
 
 hicolorSVG_DATA = \
xfce-mount.svg
 
-EXTRA_DIST = $(hicolor48_DATA) $(hicolorSVG_DATA)
+EXTRA_DIST = $(hicolorSVG_DATA)

 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
diff --git a/icons/xfce-mount.png b/icons/xfce-mount.png
deleted file mode 100644
index ed88179..000
Binary files a/icons/xfce-mount.png and /dev/null differ
diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 3d9a0ac..689b8ec 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -736,25 +736,18 @@ mounter_create_options (XfcePanelPlugin *plugin, 
t_mounter *mt)
 
 xfce_panel_plugin_block_menu (plugin);
 
-GtkWidget *dlg; //, *header;
-//dlg = gtk_dialog_new_with_buttons (_(Edit Properties),
+GtkWidget *dlg;
 dlg = xfce_titled_dialog_new_with_buttons(
 _(Mount Plugin),
 GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (plugin))),
 GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
 GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL);
 
-gtk_window_set_icon_name(GTK_WINDOW(dlg),xfce-mount);
+xfce_titled_dialog_set_subtitle (XFCE_TITLED_DIALOG (dlg), 
_(Properties));
+gtk_window_set_icon_name(GTK_WINDOW(dlg),drive-harddisk);
 
 gtk_container_set_border_width (GTK_CONTAINER (dlg), 2);
 
-/* header = xfce_create_header (NULL, _(Mount devices));
-gtk_widget_set_size_request (GTK_BIN (header)-child, -1, 32);
-gtk_container_set_border_width (GTK_CONTAINER (header), BORDER - 2);
-gtk_widget_show (header);
-gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)-vbox), header, FALSE,
-TRUE, 0); */
-
 GtkWidget *vbox;
 t_mounter_dialog * md;
 
diff --git a/panel-plugin/xfce4-mount-plugin.desktop.in 
b/panel-plugin/xfce4-mount-plugin.desktop.in
index ae9bcaa..70235ac 100644
--- a/panel-plugin/xfce4-mount-plugin.desktop.in
+++ b/panel-plugin/xfce4-mount-plugin.desktop.in
@@ -3,6 +3,6 @@ Type=X-XFCE-PanelPlugin
 Encoding=UTF-8
 _Name=Mount devices
 _Comment=Shows all mountable devices and (un)mounts them on request.
-Icon=xfce-mount
+Icon=drive-harddisk
 X-XFCE-Internal=FALSE
 X-XFCE-Module=mount
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master fix broken string in fr translation

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 79e899b743c90c61d518de71745b8752d8d379ef (commit)
   from 60d4358a82d98b1fbd4ef3d20f9881ed1585f390 (commit)

commit 79e899b743c90c61d518de71745b8752d8d379ef
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 19:48:42 2012 +0200

fix broken string in fr translation

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

diff --git a/po/fr.po b/po/fr.po
index 4873953..466045f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -99,7 +99,7 @@ msgstr Une erreur s'est produite. Le périphérique \%s\ ne 
devrait pas être
 
 #: ../panel-plugin/mount-plugin.c:252
 msgid span foreground=\#FF\not mounted/span
-msgstr span foreground=\#00\ size=\%s\non monté/span
+msgstr span foreground=\#FF\non monté/span
 
 #: ../panel-plugin/mount-plugin.c:560
 msgid devices
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master add copyright for getmntinfo parts

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to a6d2c39bac72dcb20bc5199cfebae3d631f240e5 (commit)
   from 79e899b743c90c61d518de71745b8752d8d379ef (commit)

commit a6d2c39bac72dcb20bc5199cfebae3d631f240e5
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 19:51:41 2012 +0200

add copyright for getmntinfo parts

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

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index ffdd115..101d7ec 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -3,6 +3,7 @@
 /*
 Copyright (C) 2005 Jean-Baptiste jb_...@yahoo.com
 Copyright (C) 2005-2008 Fabian Nowak timyst...@arcor.de.
+Copyright (C) 2009 Landry Breuil lan...@xfce.org
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Fix a whole bunchh of warnings with debug enabled

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 48c3e827418716f18e1bcef43526ca77a36387b9 (commit)
   from a6d2c39bac72dcb20bc5199cfebae3d631f240e5 (commit)

commit 48c3e827418716f18e1bcef43526ca77a36387b9
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 20:28:31 2012 +0200

Fix a whole bunchh of warnings with debug enabled

- Fix use of xfce_dialog_show_error()
- Use DBG() macros
- Declare functions in devices.h

 panel-plugin/devices.c  |   40 +++-
 panel-plugin/devices.h  |   10 ++
 panel-plugin/mount-plugin.c |9 -
 3 files changed, 29 insertions(+), 30 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 101d7ec..e79e467 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -236,9 +236,7 @@ disk_mount (t_disk *pdisk, char *on_mount_cmd, char* 
mount_command, gboolean eje
 GError *error = NULL;
 gboolean val;
 
-#ifdef DEBUG
-g_printf (disk_mount: eject=%d\n, eject);
-#endif
+DBG(disk_mount: eject=%d\n, eject);
 
 if (pdisk != NULL)
 {
@@ -262,13 +260,10 @@ disk_mount (t_disk *pdisk, char *on_mount_cmd, char* 
mount_command, gboolean eje
 else
 cmd = g_strconcat (cmd,  ', NULL);
 
-#ifdef DEBUG
-g_printf (cmd: '%s'\n, cmd);
-#endif
-
 val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), cmd, 
FALSE, TRUE, error);
+DBG(cmd: '%s', returned %d \n, tmp, val);
 if (!val)
-xfce_dialog_show_error (NULL, error, g_strconcat (%s Cause:%%s, 
_(Mount Plugin: Error executing command.)));
+xfce_dialog_show_error (NULL, error, %s, _(Mount Plugin: Error 
executing command.));
 
 g_free(cmd);
 g_free(tmp);
@@ -289,9 +284,7 @@ disk_umount (t_disk *pdisk, char* umount_command, gboolean 
synchronous, gboolean
 char *cmd;
 GError *error = NULL;
 
-#ifdef DEBUG
-g_printf (disk_umount: eject=%d\n, eject);
-#endif
+DBG(disk_umount: eject=%d\n, eject);
 
 
 if (pdisk != NULL)
@@ -310,14 +303,11 @@ disk_umount (t_disk *pdisk, char* umount_command, 
gboolean synchronous, gboolean
 else
 tmp = g_strconcat (cmd,  ', NULL);
 
-#ifdef DEBUG
-g_printf (cmd: '%s'\n, tmp);
-#endif
-
 val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), tmp, 
FALSE, TRUE, error);
+DBG(cmd: '%s', returned %d \n, tmp, val);
 
 if  (!val) {
-xfce_dialog_show_error (NULL, error, g_strconcat (%s Cause:%%s, 
_(Mount Plugin: Error executing command.)));
+xfce_dialog_show_error (NULL, error, %s, _(Mount Plugin: Error 
executing command.));
 retval = ERROR;
 }
 
@@ -405,7 +395,7 @@ disks_new (gboolean include_NFSs, gboolean 
*showed_fstab_dialog)
 void
 disks_free (GPtrArray ** pdisks)
 {
-int i ;
+unsigned int i ;
 t_disk * pdisk ;
 
 if (*pdisks != NULL)
@@ -427,7 +417,7 @@ disks_free (GPtrArray ** pdisks)
 void
 disks_print (GPtrArray * pdisks)
 {
-int i ;
+unsigned int i ;
 for (i=0; i  pdisks-len ; i++)
 {
 disk_print (g_ptr_array_index(pdisks, i));
@@ -444,7 +434,7 @@ disks_print (GPtrArray * pdisks)
 gboolean
 disks_remove_device (GPtrArray * pdisks, char *device)
 {
-int i;
+unsigned int i;
 gpointer p=NULL;
 
 for (i=0; i  pdisks-len ; i++)
@@ -468,7 +458,7 @@ disks_remove_device (GPtrArray * pdisks, char *device)
 gboolean
 disks_remove_mountpoint (GPtrArray * pdisks, char *mountp)
 {
-int i;
+unsigned int i;
 gpointer p=NULL;
 
 for (i=0; i  pdisks-len ; i++)
@@ -492,7 +482,7 @@ disks_remove_mountpoint (GPtrArray * pdisks, char *mountp)
 t_disk *
 disks_search (GPtrArray * pdisks, char * mount_point)
 {
-int i ;
+unsigned int i ;
 
 for (i=0; i  pdisks-len ; i++)
 {
@@ -513,7 +503,7 @@ disks_search (GPtrArray * pdisks, char * mount_point)
 void
 disks_free_mount_info(GPtrArray * pdisks)
 {
-int i ;
+unsigned int i ;
 
 for (i=0; i  pdisks-len ; i++)
 {
@@ -530,7 +520,7 @@ disks_free_mount_info(GPtrArray * pdisks)
 gboolean
 exclude_filesystem (GPtrArray *excluded_FSs, gchar *mountpoint, gchar *device)
 {
-int i;
+unsigned int i;
 
 TRACE(Entering exclude_filesystems\n);
 
@@ -572,11 +562,11 @@ disks_refresh(GPtrArray * pdisks, GPtrArray *excluded_FSs)
 struct statfs * pstatfs = NULL;
 gboolean exclude =  FALSE;
 
-TRACE(Entering disks_refresh\n);
-
 t_mount_info * mount_info;
 t_disk * pdisk ;
 
+TRACE(Entering disks_refresh\n);
+
 /* remove t_mount_info for all devices */
 disks_free_mount_info (pdisks);
 
diff --git a/panel-plugin/devices.h b/panel-plugin/devices.h
index 22ebb08..f4d6f3a 100644
--- a/panel-plugin/devices.h
+++ b/panel-plugin/devices.h
@@ -199,6 +199,16 @@ t_deviceclass disk_classify (char* device, char 
*mountpoint);
  */
 gboolean disk_check_mounted

[Xfce4-commits] xfce4-mount-plugin:master fix build with --enable-debug=full

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to afdb5bdb85a84e199c14ee2cdafea752c4e40235 (commit)
   from 48c3e827418716f18e1bcef43526ca77a36387b9 (commit)

commit afdb5bdb85a84e199c14ee2cdafea752c4e40235
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 20:43:47 2012 +0200

fix build with --enable-debug=full

 panel-plugin/devices.c  |3 ++
 panel-plugin/devices.h  |8 -
 panel-plugin/mount-plugin.c |   72 +-
 panel-plugin/mount-plugin.h |7 
 4 files changed, 39 insertions(+), 51 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index e79e467..8c99d01 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -45,6 +45,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 #include devices.h
 
+/* declare that one here to appease -Werror */
+t_mount_info * mount_info_new_from_stat (struct statfs * pstatfs, char * 
mnt_type, char * mnt_dir);
+
 #define KB 1024
 #define MB 1048576
 #define GB 1073741824
diff --git a/panel-plugin/devices.h b/panel-plugin/devices.h
index f4d6f3a..0d97aa9 100644
--- a/panel-plugin/devices.h
+++ b/panel-plugin/devices.h
@@ -28,13 +28,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 /* extern t_disk_display ; */
 /* People, learn to program in an object-oriented way! */
 
-#ifdef DEBUG
-#undef DEBUG
-#endif
-#ifdef DEBUG_TRACE
-#undef DEBUG_TRACE
-#endif
-
 /**
  * An enum.
  * NONE and ERROR as aliases.
@@ -201,7 +194,6 @@ gboolean disk_check_mounted (const char *disk);
 
 void mount_info_print(t_mount_info * mount_info);
 t_mount_info * mount_info_new (float size, float used, float avail, unsigned 
int percent, char * type, char * mounted_on);
-t_mount_info * mount_info_new_from_stat (struct statfs * pstatfs, char * 
mnt_type, char * mnt_dir);
 void mount_info_free(t_mount_info * * mount_info);
 void disk_print (t_disk * pdisk);
 char * shorten_disk_name (const char *dev);
diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 6f82345..ab5ca5f 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -25,6 +25,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #include mount-plugin.h
 #include libxfce4ui/libxfce4ui.h
 
+void format_LVM_name (const char *disk_device, gchar **formatted_diskname);
+
 #ifdef LIBXFCE4PANEL_CHECK_VERSION
 #if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
 #define HAS_PANEL_49
@@ -371,19 +373,21 @@ mounter_data_new (t_mounter *mt)
 static void
 mounter_refresh (t_mounter * mt)
 {
+gchar *mount, *umount, *icon, *excl_filesystems;
+gboolean msg_dlg, incl_NFSs, excl_FSs, excl_DNs, eject;
 TRACE (enters mounter_refresh);
 
 mounter_data_free (mt);
-gchar *mount = g_strdup (mt-mount_command);
-gchar *umount = g_strdup (mt-umount_command);
-gchar *icon = g_strdup (mt-icon);
-gchar *excl_filesystems = g_strdup (mt-excluded_filesystems);
+mount = g_strdup (mt-mount_command);
+umount = g_strdup (mt-umount_command);
+icon = g_strdup (mt-icon);
+excl_filesystems = g_strdup (mt-excluded_filesystems);
 DBG (Changed icon value from '%s' to '%s'.\n, mt-icon, icon);
-gboolean msg_dlg = mt-message_dialog;
-gboolean incl_NFSs = mt-include_NFSs;
-gboolean excl_FSs = mt-exclude_FSs;
-gboolean excl_DNs = mt-exclude_devicenames;
-gboolean eject = mt-eject_drives;
+msg_dlg = mt-message_dialog;
+incl_NFSs = mt-include_NFSs;
+excl_FSs = mt-exclude_FSs;
+excl_DNs = mt-exclude_devicenames;
+eject = mt-eject_drives;
 
 mounter_data_new (mt);
 mt-icon = g_strdup (icon);
@@ -422,11 +426,10 @@ on_button_press (GtkWidget *widget, GdkEventButton 
*event, t_mounter *mounter)
 static void
 mounter_read_config (XfcePanelPlugin *plugin, t_mounter *mt)
 {
-TRACE (enter read_config);
-
 const char *value;
 char *file;
 XfceRc *rc;
+TRACE (enter read_config);
 
 if ( !( file = xfce_panel_plugin_lookup_rc_file (plugin) ) )
 return;
@@ -483,10 +486,9 @@ mounter_read_config (XfcePanelPlugin *plugin, t_mounter 
*mt)
 static void
 mounter_write_config (XfcePanelPlugin *plugin, t_mounter *mt)
 {
-TRACE (enter write_config);
-
- XfceRc *rc;
+XfceRc *rc;
 char *file;
+TRACE (enter write_config);
 
 if (!(file = xfce_panel_plugin_save_location (plugin, TRUE)))
 return;
@@ -537,9 +539,8 @@ mounter_write_config (XfcePanelPlugin *plugin, t_mounter 
*mt)
 static t_mounter *
 create_mounter_control (XfcePanelPlugin *plugin)
 {
-TRACE (enters create_mounter_control);
-
 t_mounter *mounter;
+TRACE (enters create_mounter_control);
 
 mounter = g_new0(t_mounter,1);
 
@@ -591,15 +592,15 @@ free_mounter_dialog(GtkWidget * widget, t_mounter_dialog 
* md)
 static void
 mounter_apply_options (t_mounter_dialog *md)
 {
-TRACE (enters mounter_apply_options);
-
+const char * tmp;
+gboolean incl_NFSs, excl_FSs;
 t_mounter * mt = md-mt

[Xfce4-commits] xfce4-mount-plugin:master Properly display error dialog if xfce_spawn_command_line_on_screen() returned 1

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 3927d0454a4052671408045dd39439fe97ed9277 (commit)
   from afdb5bdb85a84e199c14ee2cdafea752c4e40235 (commit)

commit 3927d0454a4052671408045dd39439fe97ed9277
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 20:51:32 2012 +0200

Properly display error dialog if xfce_spawn_command_line_on_screen() 
returned 1

 panel-plugin/devices.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 8c99d01..a6b35fa 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -264,9 +264,9 @@ disk_mount (t_disk *pdisk, char *on_mount_cmd, char* 
mount_command, gboolean eje
 cmd = g_strconcat (cmd,  ', NULL);
 
 val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), cmd, 
FALSE, TRUE, error);
-DBG(cmd: '%s', returned %d \n, tmp, val);
-if (!val)
-xfce_dialog_show_error (NULL, error, %s, _(Mount Plugin: Error 
executing command.));
+DBG(cmd: '%s', returned %d \n, cmd, val);
+if (val)
+xfce_dialog_show_error (NULL, error, _(Mount Plugin: Error 
executing command.));
 
 g_free(cmd);
 g_free(tmp);
@@ -309,8 +309,8 @@ disk_umount (t_disk *pdisk, char* umount_command, gboolean 
synchronous, gboolean
 val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), tmp, 
FALSE, TRUE, error);
 DBG(cmd: '%s', returned %d \n, tmp, val);
 
-if  (!val) {
-xfce_dialog_show_error (NULL, error, %s, _(Mount Plugin: Error 
executing command.));
+if  (val) {
+xfce_dialog_show_error (NULL, error, _(Mount Plugin: Error 
executing command.));
 retval = ERROR;
 }
 
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Remove old icons, they're unused since 6 years/release 0.4.7..

2012-04-10 Thread Landry Breuil
Updating branch refs/heads/master
 to 563fcc41319a0624c765d575e9f9c90d474aceae (commit)
   from 3927d0454a4052671408045dd39439fe97ed9277 (commit)

commit 563fcc41319a0624c765d575e9f9c90d474aceae
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 21:53:17 2012 +0200

Remove old icons, they're unused since 6 years/release 0.4.7..

 panel-plugin/Makefile.am   |   13 +-
 panel-plugin/icons.h   |  777 
 panel-plugin/kcmpartitions.png |  Bin 6844 - 0 bytes
 panel-plugin/mount-plugin.h|1 -
 4 files changed, 1 insertions(+), 790 deletions(-)

diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index ca36c7a..ec82c66 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -36,17 +36,6 @@ desktopdir = $(datadir)/xfce4/panel/plugins
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 @INTLTOOL_DESKTOP_RULE@
 
-EXTRA_DIST =   
\
-   icons.h 
\
-   kcmpartitions.png   
\
-   $(desktop_in_files)
+EXTRA_DIST = $(desktop_in_files)
 
 DISTCLEANFILES = $(desktop_DATA)
-   
-noinst_DATA =  
   \
-   icons.h 
 \
-   kcmpartitions.png
-
-icons.h: $(srcdir)/kcmpartitions.png
-   gdk-pixbuf-csource --raw --build-list   \
-   icon_plugin kcmpartitions.png  icons.h
diff --git a/panel-plugin/icons.h b/panel-plugin/icons.h
deleted file mode 100644
index ee1431b..000
--- a/panel-plugin/icons.h
+++ /dev/null
@@ -1,777 +0,0 @@
-/* GdkPixbuf RGBA C-Source image dump */
-
-#ifdef __SUNPRO_C
-#pragma align 4 (icon_plugin)
-#endif
-#ifdef __GNUC__
-static const guint8 icon_plugin[] __attribute__ ((__aligned__ (4))) = 
-#else
-static const guint8 icon_plugin[] = 
-#endif
-{ 
-  /* Pixbuf magic (0x47646b50) */
-  GdkP
-  /* length: header (24) + pixel_data (16384) */
-  \0\0@\30
-  /* pixdata_type (0x1010002) */
-  \1\1\0\2
-  /* rowstride (256) */
-  \0\0\1\0
-  /* width (64) */
-  \0\0\0@
-  /* height (64) */
-  \0\0\0@
-  /* pixel_data: */
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \377\355\323\35\377\367\357C\332\344\356~\304\322\345\255\301\323\346
-  \321\304\324\346\322\303\322\345\325\301\321\344\272\317\332\347\214
-  \373\370\365P\377\354\331)\377\177\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\377\314\231\17\373\373\373N\260\306\341\246x\240
-  \316\337V\213\310\377\77~\307\377/t\304\377)q\304\377+s\305\377*r\305
-  \377,r\303\377|\306\377O\210\312\377n\230\313\354\241\275\333\272\330
-  \340\350d\377\341\304\32\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\277_\10\363\366\371
-  V\222\262\330\310R\211\310\377*r\306\377%u\316\377){\325\3771\202\333
-  \3778\210\340\377:\212\341\377:\212\341\377:\212\341\3779\212\341\377
-  4\205\335\377,}\326\377'w\320\377q\307\377D\200\307\377\210\252\322
-  \336\324\332\346q\377\332\243\16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\364\343/\254\304\340\266R\210\310\377
-  $p\307\377-}\325\377:\212\340\377R\231\345\377x\260\353\377\236\306\360
-  \377\303\334\366\377\323\345\370\377\323\345\370\377\324\345\370\377
-  \314\341\367\377\255\317\363\377\207\271\355\377b\242\350\377A\217\342
-  \3770\200\330\377#p\310\377F\202\307\377\231\265\327\307\351\341\356
-  \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0

[Xfce4-commits] xfce4-mount-plugin:master no need to use startup notification

2012-04-11 Thread Landry Breuil
Updating branch refs/heads/master
 to a8bb3443c0838c0c69b376febde8c872d1c761a4 (commit)
   from 563fcc41319a0624c765d575e9f9c90d474aceae (commit)

commit a8bb3443c0838c0c69b376febde8c872d1c761a4
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 22:00:29 2012 +0200

no need to use startup notification

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

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index a6b35fa..43f2de2 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -263,7 +263,7 @@ disk_mount (t_disk *pdisk, char *on_mount_cmd, char* 
mount_command, gboolean eje
 else
 cmd = g_strconcat (cmd,  ', NULL);
 
-val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), cmd, 
FALSE, TRUE, error);
+val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), cmd, 
FALSE, FALSE, error);
 DBG(cmd: '%s', returned %d \n, cmd, val);
 if (val)
 xfce_dialog_show_error (NULL, error, _(Mount Plugin: Error 
executing command.));
@@ -306,7 +306,7 @@ disk_umount (t_disk *pdisk, char* umount_command, gboolean 
synchronous, gboolean
 else
 tmp = g_strconcat (cmd,  ', NULL);
 
-val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), tmp, 
FALSE, TRUE, error);
+val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), tmp, 
FALSE, FALSE, error);
 DBG(cmd: '%s', returned %d \n, tmp, val);
 
 if  (val) {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Add a boolean/checkbox to use sudo(8) to run the mount/umount commands [wip]

2012-04-11 Thread Landry Breuil
Updating branch refs/heads/master
 to c1ab23fe307ab5b6413a8dc776c768e6846a24b6 (commit)
   from a8bb3443c0838c0c69b376febde8c872d1c761a4 (commit)

commit c1ab23fe307ab5b6413a8dc776c768e6846a24b6
Author: Landry Breuil lan...@xfce.org
Date:   Tue Apr 10 23:17:40 2012 +0200

Add a boolean/checkbox to use sudo(8) to run the mount/umount commands [wip]

 panel-plugin/devices.c  |   25 ++---
 panel-plugin/devices.h  |   10 ++
 panel-plugin/mount-plugin.c |   36 +---
 panel-plugin/mount-plugin.h |2 ++
 4 files changed, 59 insertions(+), 14 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 43f2de2..986a979 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -233,22 +233,30 @@ disk_free(t_disk **pdisk)
  * Return exit status of the mount command
  */
 void
-disk_mount (t_disk *pdisk, char *on_mount_cmd, char* mount_command, gboolean 
eject)
+disk_mount (t_disk *pdisk, char *on_mount_cmd, char* mount_command, gboolean 
eject, gboolean use_sudo)
 {
 gchar *tmp=NULL, *cmd, *tmp2 = NULL;
 GError *error = NULL;
 gboolean val;
 
-DBG(disk_mount: eject=%d\n, eject);
+DBG(disk_mount: eject=%d, use_sudo=%d\n, eject, use_sudo);
 
 if (pdisk != NULL)
 {
 deviceprintf (tmp, mount_command, pdisk-device);
 mountpointprintf (tmp2, tmp, pdisk-mount_point);
+/* re-use tmp */
+g_free(tmp);
+tmp = NULL;
+if (use_sudo)
+tmp = g_strdup (sudo sh -c ');
+else
+tmp = g_strdup (sh -c ');
+
 if (eject)
-cmd = g_strconcat (sh -c ' eject -t , pdisk-device,   , 
tmp2, NULL);
+cmd = g_strconcat (tmp,  eject -t , pdisk-device,   , tmp2, 
NULL);
 else
-cmd = g_strconcat (sh -c ' , tmp2, NULL);
+cmd = g_strconcat (tmp, tmp2, NULL);
 
 g_free(tmp);
 g_free(tmp2);
@@ -279,7 +287,7 @@ disk_mount (t_disk *pdisk, char *on_mount_cmd, char* 
mount_command, gboolean eje
  * Return exit status of the umount command.
  */
 int
-disk_umount (t_disk *pdisk, char* umount_command, gboolean synchronous, 
gboolean eject)
+disk_umount (t_disk *pdisk, char* umount_command, gboolean synchronous, 
gboolean eject, gboolean use_sudo)
 {
 int retval = NONE;
 gchar *tmp = NULL, *tmp2 = NULL;
@@ -287,7 +295,7 @@ disk_umount (t_disk *pdisk, char* umount_command, gboolean 
synchronous, gboolean
 char *cmd;
 GError *error = NULL;
 
-DBG(disk_umount: eject=%d\n, eject);
+DBG(disk_umount: eject=%d, use_sudo=%d\n, eject, use_sudo);
 
 
 if (pdisk != NULL)
@@ -295,7 +303,10 @@ disk_umount (t_disk *pdisk, char* umount_command, gboolean 
synchronous, gboolean
 
 deviceprintf(tmp, umount_command, pdisk-device);
 mountpointprintf(tmp2, tmp, pdisk-mount_point);
-cmd = g_strconcat (sh -c ', tmp2, NULL);
+if (use_sudo)
+cmd = g_strconcat (sudo sh -c ', tmp2, NULL);
+else
+cmd = g_strconcat (sh -c ', tmp2, NULL);
 
 /* re-use tmp */
 g_free(tmp);
diff --git a/panel-plugin/devices.h b/panel-plugin/devices.h
index 0d97aa9..6bf95ec 100644
--- a/panel-plugin/devices.h
+++ b/panel-plugin/devices.h
@@ -93,20 +93,22 @@ char * get_size_human_readable(float size);
  * @param on_mount_cmdCommand to execute after successfully mounting the 
device
  * @param mount_commandCommand to use for mounting the device, still 
containing placeholders like \%d and \%m.
  * @param ejectWhether to inject the device before mounting.
+ * @param use_sudo Whether to use sudo to run the mount command.
  * @returnExit status of the mount command
  */
-void disk_mount (t_disk *pdisk, char *on_mount_cmd, char* mount_command, 
gboolean eject);
+void disk_mount (t_disk *pdisk, char *on_mount_cmd, char* mount_command, 
gboolean eject, gboolean use_sudo);
 
 
 /**
  * Unmount a t_disk.
- * @param pdiskDisk to mount
+ * @param pdiskDisk to umount
  * @param umount_commandCommand to use for unmounting the device, still 
containing placeholders like \%d and \%m.
  * @param synchronousWhether to execute the command synchronously to the 
program itself thus waiting for the output
  * @param ejectWhether to eject the device after unmounting.
- * @return Exit status of the mount command
+ * @param use_sudo Whether to use sudo to run the umount command.
+ * @return Exit status of the umount command
  */
-int disk_umount (t_disk *pdisk, char* umount_command, gboolean synchronous, 
gboolean eject);
+int disk_umount (t_disk *pdisk, char* umount_command, gboolean synchronous, 
gboolean eject, gboolean use_sudo);
 
 
 /**
diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index ab5ca5f..05c9ae0 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount

[Xfce4-commits] xfce4-mount-plugin:master Also match if 'cd' is in the device name for OpenBSD

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 6bc2c0daa7f9e7e113a860e602f8d95b03c9a794 (commit)
   from ea71dd842b6425b534be613d54da17e82bb1fdca (commit)

commit 6bc2c0daa7f9e7e113a860e602f8d95b03c9a794
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 11:10:32 2012 +0200

Also match if 'cd' is in the device name for OpenBSD

 panel-plugin/devices.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 986a979..5b89689 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -693,7 +693,7 @@ disk_classify (char *device, char *mountpoint)
 dc = REMOTE;
 }
 }
-else if ( strstr(device, cdrom) || strstr(device, cdrw)
+else if ( strstr(device, cdrom) || strstr(device, cdrw) || 
strstr(device, cd)
 || strstr(device, dvd) || strstr(mountpoint, cdrom)
 || strstr(mountpoint, cdrw) || strstr(mountpoint, dvd)) {
 dc = CD_DVD;
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master No need to add \n, DBG() and TRACE() takes care of that

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 590352a5570703f6533767139d1fabf42cf75bb7 (commit)
   from 18a314fcfdb8e1bbf9d50f68e21db73279614aaa (commit)

commit 590352a5570703f6533767139d1fabf42cf75bb7
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 11:22:44 2012 +0200

No need to add \n, DBG() and TRACE() takes care of that

 panel-plugin/devices.c  |   12 ++--
 panel-plugin/mount-plugin.c |8 
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 7a11692..2b26f5e 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -559,13 +559,13 @@ exclude_filesystem (GPtrArray *excluded_FSs, gchar 
*mountpoint, gchar *device)
 {
 unsigned int i;
 
-TRACE(Entering exclude_filesystems\n);
+TRACE(Entering exclude_filesystems);
 
 g_assert(excluded_FSs != NULL);
 
 for (i=0; i  excluded_FSs-len; i++)
 {
-DBG(Comparing %s and %s to %s\n, mountpoint, device, (gchar *) 
g_ptr_array_index(excluded_FSs, i));
+DBG(Comparing %s and %s to %s, mountpoint, device, (gchar *) 
g_ptr_array_index(excluded_FSs, i));
 if (g_ascii_strcasecmp (
 (gchar *) g_ptr_array_index(excluded_FSs, i), mountpoint)==0
 ||
@@ -575,7 +575,7 @@ exclude_filesystem (GPtrArray *excluded_FSs, gchar 
*mountpoint, gchar *device)
 return TRUE;
 }
 
-TRACE(Leaving exclude_filesystems with FALSE\n);
+TRACE(Leaving exclude_filesystems with FALSE);
 
 return FALSE;
 }
@@ -602,7 +602,7 @@ disks_refresh(GPtrArray * pdisks, GPtrArray *excluded_FSs)
 t_mount_info * mount_info;
 t_disk * pdisk ;
 
-TRACE(Entering disks_refresh\n);
+TRACE(Entering disks_refresh);
 
 /* remove t_mount_info for all devices */
 disks_free_mount_info (pdisks);
@@ -622,12 +622,12 @@ disks_refresh(GPtrArray * pdisks, GPtrArray *excluded_FSs)
 #ifdef HAVE_GETMNTENT
 for (pmntent=getmntent(fmtab); pmntent!=NULL; pmntent=getmntent(fmtab)) {
 
-DBG ( have entry: %s on %s \n, pmntent-mnt_fsname, pmntent-mnt_dir 
);
+DBG ( have entry: %s on %s, pmntent-mnt_fsname, pmntent-mnt_dir );
 
 statfs (pmntent-mnt_dir, pstatfs);
 #elif HAVE_GETMNTINFO
 for (i = 0; i  nb_mounted_fs ; i++) {
-DBG ( have entry: %s on %s : type %s\n, pstatfs[i].f_mntfromname, 
pstatfs[i].f_mntonname, pstatfs[i].f_fstypename );
+DBG ( have entry: %s on %s : type %s, pstatfs[i].f_mntfromname, 
pstatfs[i].f_mntonname, pstatfs[i].f_fstypename );
 #endif
 
 /* if we got the stat and the block number is non-zero */
diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 951718b..a5f99f0 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -281,7 +281,7 @@ mounter_data_new (t_mounter *mt)
 /* remove unwanted file systems from list */
 if (mt-exclude_FSs) {
 array = g_ptr_array_new();
-DBG(excluded_filesystems=%s\n, mt-excluded_filesystems);
+DBG(excluded_filesystems=%s, mt-excluded_filesystems);
 res = seperate_list(array, mt-excluded_filesystems);
 for (i=0; iarray-len; i++) {
 dev_mp = (char*) g_ptr_array_index(array, i);
@@ -351,7 +351,7 @@ mounter_refresh (t_mounter * mt)
 umount = g_strdup (mt-umount_command);
 icon = g_strdup (mt-icon);
 excl_filesystems = g_strdup (mt-excluded_filesystems);
-DBG (Changed icon value from '%s' to '%s'.\n, mt-icon, icon);
+DBG (Changed icon value from '%s' to '%s'., mt-icon, icon);
 msg_dlg = mt-message_dialog;
 incl_NFSs = mt-include_NFSs;
 excl_FSs = mt-exclude_FSs;
@@ -361,7 +361,7 @@ mounter_refresh (t_mounter * mt)
 
 mounter_data_new (mt);
 mt-icon = g_strdup (icon);
-DBG (Changed icon value from '%s' to '%s'.\n, icon, mt-icon);
+DBG (Changed icon value from '%s' to '%s'., icon, mt-icon);
 mt-mount_command = g_strdup (mount);
 mt-umount_command = g_strdup (umount);
 mt-excluded_filesystems = g_strdup (excl_filesystems);
@@ -913,7 +913,7 @@ mounter_create_options (XfcePanelPlugin *plugin, t_mounter 
*mt)
 GTK_FILL, GTK_SHRINK, 0, 0);
 
 md-string_mount_command = gtk_entry_new ();
-DBG(mt-mount_command: %s\n, mt-mount_command);
+DBG(mt-mount_command: %s, mt-mount_command);
 gtk_entry_set_text (GTK_ENTRY(md-string_mount_command ),
 g_strdup(mt-mount_command ));
 gtk_widget_show (md-string_mount_command );
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Rewrite disk_mount/umount

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 18a314fcfdb8e1bbf9d50f68e21db73279614aaa (commit)
   from 6bc2c0daa7f9e7e113a860e602f8d95b03c9a794 (commit)

commit 18a314fcfdb8e1bbf9d50f68e21db73279614aaa
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 11:11:01 2012 +0200

Rewrite disk_mount/umount

- use g_spawn_command_line_sync()
- separate commands instead of running them in a single shell
- error out early if any of the commands fail
- better error reporting, showing command return code  stderr
- add hack to make eject -t work on OpenBSD
- sanitize string handling
- show confirmation/error message dialog directly from disk_umount
- two new strings: Returned and error was

 panel-plugin/devices.c  |  165 --
 panel-plugin/devices.h  |6 +-
 panel-plugin/mount-plugin.c |   35 +-
 3 files changed, 97 insertions(+), 109 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 5b89689..7a11692 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -29,6 +29,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #include glib.h
 #include stdio.h
 #include string.h
+/* WEXITSTATUS */
+#include sys/types.h
+#include sys/wait.h
 #ifdef HAVE_GETMNTENT
 #include mntent.h
 #include sys/vfs.h
@@ -235,50 +238,69 @@ disk_free(t_disk **pdisk)
 void
 disk_mount (t_disk *pdisk, char *on_mount_cmd, char* mount_command, gboolean 
eject, gboolean use_sudo)
 {
-gchar *tmp=NULL, *cmd, *tmp2 = NULL;
+gchar *tmp = NULL, *cmd = NULL;
+gchar *output = NULL, *erroutput = NULL;
+int exit_status = 0;
 GError *error = NULL;
 gboolean val;
 
-DBG(disk_mount: eject=%d, use_sudo=%d\n, eject, use_sudo);
-
 if (pdisk != NULL)
 {
+DBG(disk_mount: dev=%s, mountpoint=%s, mount_command=%s, 
on_mount_cmd=%s, eject=%d, use_sudo=%d, pdisk-device, pdisk-mount_point, 
mount_command, on_mount_cmd, eject, use_sudo);
+if (eject) {
+#ifdef __OpenBSD__
+/* hack: on OpenBSD, eject(1) -t expects cd0/cd1 (or rcd0c/rcd1c), if passed 
/dev/cdXa it will spit 'No medium found' */
+tmp = g_strstr_len(pdisk-device, strlen(pdisk-device), 
/dev/cd);
+if (tmp) {
+cmd = g_strconcat (eject -t cd, tmp + 7, NULL);
+/* remove chars after cdX */
+cmd[12] = '\0';
+tmp = NULL;
+}
+else
+cmd = g_strconcat (eject -t , pdisk-device, NULL);
+#else
+cmd = g_strconcat (eject -t , pdisk-device, NULL);
+#endif
+val = g_spawn_command_line_sync (cmd, output, erroutput, 
exit_status, error);
+DBG(cmd: '%s', returned %d, exit_status=%d, cmd, val, 
exit_status);
+if (val == FALSE || exit_status != 0)
+   goto out;
+g_free(cmd);
+cmd = NULL;
+}
 deviceprintf (tmp, mount_command, pdisk-device);
-mountpointprintf (tmp2, tmp, pdisk-mount_point);
-/* re-use tmp */
-g_free(tmp);
-tmp = NULL;
-if (use_sudo)
-tmp = g_strdup (sudo sh -c ');
-else
-tmp = g_strdup (sh -c ');
-
-if (eject)
-cmd = g_strconcat (tmp,  eject -t , pdisk-device,   , tmp2, 
NULL);
-else
-cmd = g_strconcat (tmp, tmp2, NULL);
-
-g_free(tmp);
-g_free(tmp2);
-tmp = NULL;
-tmp2 = NULL;
+mountpointprintf (cmd, tmp, pdisk-mount_point);
+/* cmd contains mount_command device mount_point */
+if (use_sudo) {
+g_free(tmp);
+tmp = g_strdup(cmd);
+g_free(cmd);
+cmd = g_strconcat (sudo , tmp, NULL);
+}
+val = g_spawn_command_line_sync (cmd, output, erroutput, 
exit_status, error);
+DBG(cmd: '%s', returned %d, exit_status=%d, cmd, val, exit_status);
+if (val == FALSE || exit_status != 0)
+   goto out;
 
 if (on_mount_cmd != NULL  strlen(on_mount_cmd)!=0) {
+g_free(tmp);
+tmp = NULL;
+g_free(cmd);
+cmd = NULL;
 deviceprintf(tmp, on_mount_cmd, pdisk-device);
-mountpointprintf(tmp2, tmp, pdisk-mount_point);
-cmd = g_strconcat (cmd,   , tmp2,  ', NULL);
+mountpointprintf(cmd, tmp, pdisk-mount_point);
+val = g_spawn_command_line_sync (cmd, output, erroutput, 
exit_status, error);
+DBG(cmd: '%s', returned %d, exit_status=%d, cmd, val, 
exit_status);
 }
-else
-cmd = g_strconcat (cmd,  ', NULL);
-
-val = xfce_spawn_command_line_on_screen(gdk_screen_get_default(), cmd, 
FALSE, FALSE, error);
-DBG(cmd: '%s', returned %d \n, cmd, val);
-if (val)
-xfce_dialog_show_error (NULL, error, _(Mount Plugin: Error 
executing command.));
-
+out:
 g_free(cmd);
-g_free(tmp

[Xfce4-commits] xfce4-mount-plugin:master Sanitize configuration values handling.

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to a8c711350db558b5250fc046bce814ec3bfc612a (commit)
   from a281a4309eaa8e48fa26cae1f125691452f61478 (commit)

commit a8c711350db558b5250fc046bce814ec3bfc612a
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 12:08:15 2012 +0200

Sanitize configuration values handling.

Set default values in create_mounter_control() instead of
saving/overwriting/restoring them in mounter_refresh()/mounter_data_new(),
which is called upon every click on the plugin.
While here provide a default for on_mount_cmd and set it like others
in mounter_apply_options() (removes a possible double-free)

 panel-plugin/mount-plugin.c |   68 +--
 1 files changed, 14 insertions(+), 54 deletions(-)

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index a5f99f0..ac725a0 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -315,24 +315,6 @@ mounter_data_new (t_mounter *mt)
 
 disk_display_set_sizes(disk_displays);
 
-mt-icon = PACKAGE_DATA_DIR/icons/hicolor/scalable/apps/xfce-mount.svg;
-mt-mount_command = DEFAULT_MOUNT_COMMAND;
-mt-umount_command = DEFAULT_UMOUNT_COMMAND;
-
-mt-excluded_filesystems = ;
-
-mt-message_dialog = FALSE;
-
-mt-include_NFSs = FALSE;
-
-mt-exclude_FSs = FALSE;
-
-mt-eject_drives = FALSE;
-
-mt-exclude_devicenames = FALSE;
-
-mt-use_sudo = FALSE;
-
 TRACE (leaves mounter_data_new);
 
 return ;
@@ -342,38 +324,12 @@ mounter_data_new (t_mounter *mt)
 static void
 mounter_refresh (t_mounter * mt)
 {
-gchar *mount, *umount, *icon, *excl_filesystems;
-gboolean msg_dlg, incl_NFSs, excl_FSs, excl_DNs, use_sudo, eject;
 TRACE (enters mounter_refresh);
 
 mounter_data_free (mt);
-mount = g_strdup (mt-mount_command);
-umount = g_strdup (mt-umount_command);
-icon = g_strdup (mt-icon);
-excl_filesystems = g_strdup (mt-excluded_filesystems);
-DBG (Changed icon value from '%s' to '%s'., mt-icon, icon);
-msg_dlg = mt-message_dialog;
-incl_NFSs = mt-include_NFSs;
-excl_FSs = mt-exclude_FSs;
-excl_DNs = mt-exclude_devicenames;
-use_sudo = mt-use_sudo;
-eject = mt-eject_drives;
-
 mounter_data_new (mt);
-mt-icon = g_strdup (icon);
-DBG (Changed icon value from '%s' to '%s'., icon, mt-icon);
-mt-mount_command = g_strdup (mount);
-mt-umount_command = g_strdup (umount);
-mt-excluded_filesystems = g_strdup (excl_filesystems);
-mt-message_dialog = msg_dlg;
-mt-include_NFSs = incl_NFSs;
-mt-exclude_FSs = excl_FSs;
-mt-exclude_devicenames = excl_DNs;
-mt-use_sudo = use_sudo;
-mt-eject_drives = eject;
 
 TRACE (leaves mounter_refresh);
-
 }
 
 
@@ -521,10 +477,18 @@ create_mounter_control (XfcePanelPlugin *plugin)
 
 mounter = g_new0(t_mounter,1);
 
-/* default mount command */
-mounter-on_mount_cmd = NULL;
-
-mounter-icon = NULL;
+/* default configuration values for when no configuration is found */
+mounter-icon = 
PACKAGE_DATA_DIR/icons/hicolor/scalable/apps/xfce-mount.svg;
+mounter-mount_command = DEFAULT_MOUNT_COMMAND;
+mounter-umount_command = DEFAULT_UMOUNT_COMMAND;
+mounter-on_mount_cmd = ;
+mounter-excluded_filesystems = ;
+mounter-message_dialog = FALSE;
+mounter-include_NFSs = FALSE;
+mounter-exclude_FSs = FALSE;
+mounter-eject_drives = FALSE;
+mounter-exclude_devicenames = FALSE;
+mounter-use_sudo = FALSE;
 
 mounter-plugin = plugin;
 
@@ -574,16 +538,12 @@ mounter_apply_options (t_mounter_dialog *md)
 t_mounter * mt = md-mt;
 TRACE (enters mounter_apply_options);
 
-tmp = gtk_entry_get_text (GTK_ENTRY(md-string_cmd));
 
 incl_NFSs = mt-include_NFSs;
 excl_FSs = mt-exclude_FSs;
 
-g_free (mt-on_mount_cmd);
-if (tmp  *tmp)
-mt-on_mount_cmd = g_strdup (tmp);
-else
-mt-on_mount_cmd = NULL;
+mt-on_mount_cmd = g_strdup ( tmp = gtk_entry_get_text
+  (GTK_ENTRY(md-string_cmd)) );
 
 if ( gtk_toggle_button_get_active
 (GTK_TOGGLE_BUTTON(md-specify_commands)) ) {
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master add copyright

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 00259a5d658d8e8662f516d5c4275222cf776869 (commit)
   from a8c711350db558b5250fc046bce814ec3bfc612a (commit)

commit 00259a5d658d8e8662f516d5c4275222cf776869
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 12:13:23 2012 +0200

add copyright

 panel-plugin/devices.c  |2 +-
 panel-plugin/mount-plugin.c |1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/devices.c b/panel-plugin/devices.c
index 2b26f5e..cafb5ca 100644
--- a/panel-plugin/devices.c
+++ b/panel-plugin/devices.c
@@ -3,7 +3,7 @@
 /*
 Copyright (C) 2005 Jean-Baptiste jb_...@yahoo.com
 Copyright (C) 2005-2008 Fabian Nowak timyst...@arcor.de.
-Copyright (C) 2009 Landry Breuil lan...@xfce.org
+Copyright (C) 2009,2012 Landry Breuil lan...@xfce.org
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index ac725a0..9c72847 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -3,6 +3,7 @@
 /*
 Copyright (C) 2005 Jean-Baptiste jb_...@yahoo.com
 Copyright (C) 2005-2008 Fabian Nowak timyst...@arcor.de.
+Copyright (C) 2012 Landry Breuil lan...@xfce.org
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master oops, fix copypasto

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 416f29f2a4df4fd368d54b3b7d1973b85d515c57 (commit)
   from 00259a5d658d8e8662f516d5c4275222cf776869 (commit)

commit 416f29f2a4df4fd368d54b3b7d1973b85d515c57
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 12:20:28 2012 +0200

oops, fix copypasto

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

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 9c72847..3af4fd0 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -534,7 +534,6 @@ free_mounter_dialog(GtkWidget * widget, t_mounter_dialog * 
md)
 static void
 mounter_apply_options (t_mounter_dialog *md)
 {
-const char * tmp;
 gboolean incl_NFSs, excl_FSs;
 t_mounter * mt = md-mt;
 TRACE (enters mounter_apply_options);
@@ -543,7 +542,7 @@ mounter_apply_options (t_mounter_dialog *md)
 incl_NFSs = mt-include_NFSs;
 excl_FSs = mt-exclude_FSs;
 
-mt-on_mount_cmd = g_strdup ( tmp = gtk_entry_get_text
+mt-on_mount_cmd = g_strdup ( gtk_entry_get_text
   (GTK_ENTRY(md-string_cmd)) );
 
 if ( gtk_toggle_button_get_active
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Rewrite config saving/loading, probably fixes bug #7631

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 9820ef6f0d961675f8f64f49189270c7e8ce16ce (commit)
   from 416f29f2a4df4fd368d54b3b7d1973b85d515c57 (commit)

commit 9820ef6f0d961675f8f64f49189270c7e8ce16ce
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 14:40:00 2012 +0200

Rewrite config saving/loading, probably fixes bug #7631

- Use booleans instead of storing bools values as string 1
- Save all settings, not just the non-defaults
- Use fallback arg from xfce_rc_read_entry() entry instead of doing an if 
dance
- g_free the previous string values before reading them, avoid leaks

 panel-plugin/mount-plugin.c |  113 --
 1 files changed, 43 insertions(+), 70 deletions(-)

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 3af4fd0..81c3e8a 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -355,58 +355,50 @@ static void
 mounter_read_config (XfcePanelPlugin *plugin, t_mounter *mt)
 {
 const char *value;
+gchar *icon;
 char *file;
 XfceRc *rc;
 TRACE (enter read_config);
 
 if ( !( file = xfce_panel_plugin_lookup_rc_file (plugin) ) )
 return;
-
+DBG(going to read config from %s, file);
 rc = xfce_rc_simple_open (file, TRUE);
 g_free (file);
 
-if ( (value = xfce_rc_read_entry(rc, on_mount_cmd, NULL)) )
-  mt-on_mount_cmd = g_strdup (value);
+if (mt-icon != NULL) g_free(mt-icon);
+if (mt-on_mount_cmd != NULL) g_free(mt-on_mount_cmd);
+if (mt-mount_command != NULL) g_free(mt-mount_command);
+if (mt-umount_command != NULL) g_free(mt-umount_command);
+if (mt-excluded_filesystems != NULL) g_free(mt-excluded_filesystems);
 
-if ( (value = xfce_rc_read_entry(rc, icon, NULL)) )
-mt-icon = g_strdup (value);
-else
-mt-icon = g_strdup_printf (
-%s/icons/hicolor/scalable/apps/xfce-mount.svg,
-PACKAGE_DATA_DIR );
+icon = g_strdup_printf (%s/icons/hicolor/scalable/apps/xfce-mount.svg, 
PACKAGE_DATA_DIR );
+mt-icon = g_strdup(xfce_rc_read_entry(rc, icon, icon));
+g_free(icon);
 
-if ( (value = xfce_rc_read_entry (rc, mount_command, NULL)) )
-mt-mount_command = g_strdup (value);
-else
-mt-mount_command = g_strdup (DEFAULT_MOUNT_COMMAND);
+mt-on_mount_cmd = g_strdup(xfce_rc_read_entry(rc, on_mount_cmd, ));
+mt-mount_command = g_strdup(xfce_rc_read_entry(rc, mount_command, 
DEFAULT_MOUNT_COMMAND));
+mt-umount_command = g_strdup(xfce_rc_read_entry(rc, umount_command, 
DEFAULT_UMOUNT_COMMAND));
+mt-excluded_filesystems = g_strdup(xfce_rc_read_entry(rc, 
excluded_filesystems, ));
 
-if ( (value = xfce_rc_read_entry (rc, umount_command, NULL)) )
-mt-umount_command = g_strdup (value);
-else
-mt-umount_command = g_strdup (DEFAULT_UMOUNT_COMMAND);
+/* before 0.5.7 booleans were stored as string 1.. handle legacy configs 
*/
+value = xfce_rc_read_entry(rc, message_dialog, NULL);
+mt-message_dialog = (value == NULL ? xfce_rc_read_bool_entry(rc, 
message_dialog, FALSE) : atoi(value));
 
-if ( (value = xfce_rc_read_entry (rc, excluded_filesystems, NULL)) )
-mt-excluded_filesystems = g_strdup (value);
-else
-mt-excluded_filesystems = g_strdup ();
-
-if ( (value = xfce_rc_read_entry(rc, message_dialog, NULL)) )
-mt-message_dialog = atoi (value);
+value = xfce_rc_read_entry(rc, include_NFSs, NULL);
+mt-include_NFSs = (value == NULL ? xfce_rc_read_bool_entry(rc, 
include_NFSs, FALSE) : atoi(value));
 
-if ( (value = xfce_rc_read_entry(rc, include_NFSs, NULL)) )
-mt-include_NFSs= atoi (value);
+value = xfce_rc_read_entry(rc, exclude_FSs, NULL);
+mt-exclude_FSs = (value == NULL ? xfce_rc_read_bool_entry(rc, 
exclude_FSs, FALSE) : atoi(value));
 
-if ( (value = xfce_rc_read_entry(rc, exclude_FSs, NULL)) )
-mt-exclude_FSs= atoi (value);
+value = xfce_rc_read_entry(rc, exclude_devicenames, NULL);
+mt-exclude_devicenames = (value == NULL ? xfce_rc_read_bool_entry(rc, 
exclude_devicenames, FALSE) : atoi(value));
 
-if ( (value = xfce_rc_read_entry(rc, exclude_devicenames, NULL)) )
-mt-exclude_devicenames= atoi (value);
+value = xfce_rc_read_entry(rc, eject_drives, NULL);
+mt-eject_drives = (value == NULL ? xfce_rc_read_bool_entry(rc, 
eject_drives, FALSE) : atoi(value));
 
-if ( (value = xfce_rc_read_entry(rc, eject_drives, NULL)) )
-mt-eject_drives= atoi (value);
-
-if ( (value = xfce_rc_read_entry(rc, use_sudo, NULL)) )
-mt-use_sudo= atoi (value);
+value = xfce_rc_read_entry(rc, use_sudo, NULL);
+mt-use_sudo = (value == NULL ? xfce_rc_read_bool_entry(rc, use_sudo, 
FALSE) : atoi(value));
 
 xfce_rc_close (rc);
 
@@ -426,43 +418,24 @@ mounter_write_config (XfcePanelPlugin *plugin, t_mounter 
*mt)
 
 /* int res = */ unlink (file);
 
+DBG(going to write config to %s

[Xfce4-commits] xfce4-mount-plugin:master format the percentage in progressbar with %

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 1ef3ace88767345b94b3155e36d067a364c31ed9 (commit)
   from 9820ef6f0d961675f8f64f49189270c7e8ce16ce (commit)

commit 1ef3ace88767345b94b3155e36d067a364c31ed9
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 14:52:16 2012 +0200

format the percentage in progressbar with %

 panel-plugin/mount-plugin.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 81c3e8a..261f0b9 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -222,7 +222,7 @@ disk_display_refresh (t_disk_display * disk_display)
  ((gdouble)mount_info-percent / 100) );
 gtk_progress_bar_set_text (
  GTK_PROGRESS_BAR(disk_display-progress_bar),
- g_strdup_printf (%d,mount_info-percent));
+ g_strdup_printf (%d%%,mount_info-percent));
 gtk_widget_show (GTK_WIDGET(disk_display-progress_bar));
 }
 else /* mount_info == NULL */
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master Better handling of old config migrations.

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 2ed71d009a855e0e47a89947cccf91470d29d824 (commit)
   from 1ef3ace88767345b94b3155e36d067a364c31ed9 (commit)

commit 2ed71d009a855e0e47a89947cccf91470d29d824
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 15:07:09 2012 +0200

Better handling of old config migrations.

Since a boolean rc value can be read as a string, had to rename the
offending boolean settings. Migration should be transparent to users.

 panel-plugin/mount-plugin.c |   46 +-
 1 files changed, 27 insertions(+), 19 deletions(-)

diff --git a/panel-plugin/mount-plugin.c b/panel-plugin/mount-plugin.c
index 261f0b9..78f2280 100644
--- a/panel-plugin/mount-plugin.c
+++ b/panel-plugin/mount-plugin.c
@@ -354,7 +354,6 @@ on_button_press (GtkWidget *widget, GdkEventButton *event, 
t_mounter *mounter)
 static void
 mounter_read_config (XfcePanelPlugin *plugin, t_mounter *mt)
 {
-const char *value;
 gchar *icon;
 char *file;
 XfceRc *rc;
@@ -381,24 +380,33 @@ mounter_read_config (XfcePanelPlugin *plugin, t_mounter 
*mt)
 mt-umount_command = g_strdup(xfce_rc_read_entry(rc, umount_command, 
DEFAULT_UMOUNT_COMMAND));
 mt-excluded_filesystems = g_strdup(xfce_rc_read_entry(rc, 
excluded_filesystems, ));
 
-/* before 0.5.7 booleans were stored as string 1.. handle legacy configs 
*/
-value = xfce_rc_read_entry(rc, message_dialog, NULL);
-mt-message_dialog = (value == NULL ? xfce_rc_read_bool_entry(rc, 
message_dialog, FALSE) : atoi(value));
+mt-use_sudo = xfce_rc_read_bool_entry(rc, use_sudo, FALSE);
 
-value = xfce_rc_read_entry(rc, include_NFSs, NULL);
-mt-include_NFSs = (value == NULL ? xfce_rc_read_bool_entry(rc, 
include_NFSs, FALSE) : atoi(value));
+/* before 0.6.0 those booleans were stored as string 1.. handle/merge 
legacy configs */
+if (xfce_rc_has_entry(rc, message_dialog))
+mt-message_dialog = atoi(xfce_rc_read_entry(rc, message_dialog, 
NULL));
+else
+mt-message_dialog = xfce_rc_read_bool_entry(rc, 
show_message_dialog, FALSE);
 
-value = xfce_rc_read_entry(rc, exclude_FSs, NULL);
-mt-exclude_FSs = (value == NULL ? xfce_rc_read_bool_entry(rc, 
exclude_FSs, FALSE) : atoi(value));
+if (xfce_rc_has_entry(rc, include_NFSs))
+mt-include_NFSs = atoi(xfce_rc_read_entry(rc, include_NFSs, NULL));
+else
+mt-include_NFSs = xfce_rc_read_bool_entry(rc, 
include_networked_filesystems, FALSE);
 
-value = xfce_rc_read_entry(rc, exclude_devicenames, NULL);
-mt-exclude_devicenames = (value == NULL ? xfce_rc_read_bool_entry(rc, 
exclude_devicenames, FALSE) : atoi(value));
+if (xfce_rc_has_entry(rc, exclude_FSs))
+mt-exclude_FSs = atoi(xfce_rc_read_entry(rc, exclude_FSs, NULL));
+else
+mt-exclude_FSs = xfce_rc_read_bool_entry(rc, 
exclude_selected_filesystems, FALSE);
 
-value = xfce_rc_read_entry(rc, eject_drives, NULL);
-mt-eject_drives = (value == NULL ? xfce_rc_read_bool_entry(rc, 
eject_drives, FALSE) : atoi(value));
+if (xfce_rc_has_entry(rc, exclude_devicenames))
+mt-exclude_devicenames = atoi(xfce_rc_read_entry(rc, 
exclude_devicenames, NULL));
+else
+mt-exclude_devicenames = xfce_rc_read_bool_entry(rc, 
exclude_devicenames_in_menu, FALSE);
 
-value = xfce_rc_read_entry(rc, use_sudo, NULL);
-mt-use_sudo = (value == NULL ? xfce_rc_read_bool_entry(rc, use_sudo, 
FALSE) : atoi(value));
+if (xfce_rc_has_entry(rc, eject_drives))
+mt-eject_drives = atoi(xfce_rc_read_entry(rc, eject_drives, NULL));
+else
+mt-eject_drives = xfce_rc_read_bool_entry(rc, eject_cddrives, 
FALSE);
 
 xfce_rc_close (rc);
 
@@ -430,11 +438,11 @@ mounter_write_config (XfcePanelPlugin *plugin, t_mounter 
*mt)
 xfce_rc_write_entry (rc, umount_command, mt-umount_command);
 xfce_rc_write_entry (rc, excluded_filesystems, mt-excluded_filesystems);
 xfce_rc_write_entry (rc, icon, mt-icon);
-xfce_rc_write_bool_entry (rc, message_dialog, mt-message_dialog);
-xfce_rc_write_bool_entry (rc, include_NFSs, mt-include_NFSs);
-xfce_rc_write_bool_entry (rc, exclude_FSs, mt-exclude_FSs);
-xfce_rc_write_bool_entry (rc, exclude_devicenames, 
mt-exclude_devicenames);
-xfce_rc_write_bool_entry (rc, eject_drives, mt-eject_drives);
+xfce_rc_write_bool_entry (rc, show_message_dialog, mt-message_dialog);
+xfce_rc_write_bool_entry (rc, include_networked_filesystems, 
mt-include_NFSs);
+xfce_rc_write_bool_entry (rc, exclude_selected_filesystems, 
mt-exclude_FSs);
+xfce_rc_write_bool_entry (rc, exclude_devicenames_in_menu, 
mt-exclude_devicenames);
+xfce_rc_write_bool_entry (rc, eject_cddrives, mt-eject_drives);
 xfce_rc_write_bool_entry (rc, use_sudo, mt-use_sudo);
 
 xfce_rc_close (rc);
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-mount-plugin:master add .gitignore

2012-04-12 Thread Landry Breuil
Updating branch refs/heads/master
 to 8d6faab375f902631457bace31fa8f9debf201b6 (commit)
   from 2ed71d009a855e0e47a89947cccf91470d29d824 (commit)

commit 8d6faab375f902631457bace31fa8f9debf201b6
Author: Landry Breuil lan...@xfce.org
Date:   Thu Apr 12 15:08:32 2012 +0200

add .gitignore

 .gitignore |   26 ++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..1e8e484
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,26 @@
+po/
+*Makefile
+*Makefile.in
+stamp*
+*/.deps
+.libs
+*.orig
+*.o
+*.lo
+*.la
+\[config.h\].in
+*,orig
+configure
+config.*
+configure.ac
+intltool*
+mkinstalldirs
+missing
+compile
+install-sh
+ltmain.sh
+libtool
+depcomp
+aclocal.m4
+autom4te.cache
+*.desktop
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master updates for 0.5.9

2012-04-13 Thread Landry Breuil
Updating branch refs/heads/master
 to 24db0709a400e2499ec4b0cacbed8a24c698c8c2 (commit)
   from 9739f2f2aa9668c52b85a4602ad878c05dd8f8a1 (commit)

commit 24db0709a400e2499ec4b0cacbed8a24c698c8c2
Author: Landry Breuil lan...@xfce.org
Date:   Fri Apr 13 11:52:58 2012 +0200

updates for 0.5.9

 NEWS|4 
 configure.ac.in |2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 4739a45..f3f758e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+0.5.9 (2012/04/13):
+-
+  * Make the icon optional (bug #7520)
+
 0.5.8 (2012/04/09):
 -
   * Build the plugin as an external module
diff --git a/configure.ac.in b/configure.ac.in
index 3d132d6..133c763 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -5,7 +5,7 @@ dnl
 dnl Version information
 m4_define([xwp_version_major], [0])
 m4_define([xwp_version_minor], [5])
-m4_define([xwp_version_micro], [8])
+m4_define([xwp_version_micro], [9])
 m4_define([xwp_version], 
[xwp_version_major().xwp_version_minor().xwp_version_micro()])
 
 dnl Initial autoconf
___
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits


[Xfce4-commits] xfce4-wavelan-plugin:master Merge branch 'master' of git://git.xfce.org/panel-plugins/xfce4-wavelan-plugin

2012-04-13 Thread Landry Breuil
Updating branch refs/heads/master
 to 7e946f1ba142dbe24e887ff92ee955d3d51e785e (commit)
   from 24db0709a400e2499ec4b0cacbed8a24c698c8c2 (commit)

commit 7e946f1ba142dbe24e887ff92ee955d3d51e785e
Merge: 24db070 d4106b0
Author: Landry Breuil lan...@xfce.org
Date:   Fri Apr 13 11:56:35 2012 +0200

Merge branch 'master' of 
git://git.xfce.org/panel-plugins/xfce4-wavelan-plugin

commit d4106b0155bee5a9e6dc07e33d08add21e0b0acc
Author: Yarema aka Knedlyk yupad...@gmail.com
Date:   Thu Apr 12 17:45:42 2012 +0200

l10n: Updated Ukrainian (uk) translation to 100%

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

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

commit 334536af4a160d7d5bb1fba562fb454dbded43d3
Author: Robert Hartl hartl.rob...@gmail.com
Date:   Thu Apr 12 15:31:53 2012 +0200

l10n: Updated Slovak (sk) translation to 100%

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

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

commit 2d23e997f2a01c7f03c8804b0be4ce50e3d74430
Author: Piarres Beobide p...@beobide.net
Date:   Thu Apr 12 13:14:09 2012 +0200

l10n: Updated Basque (eu) translation to 100%

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

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

commit 2b568bca3eed7c02edae25c6a6fabd285ac6fa24
Author: André Miranda andreldm1...@gmail.com
Date:   Thu Apr 12 02:24:02 2012 +0200

l10n: Updated Portuguese (Brazilian) (pt_BR) translation to 100%

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

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

commit 25eada2bc7a0a4267380744dce4ddff57d8aa440
Author: Enrico Polesel pole...@poisson.phc.unipi.it
Date:   Wed Apr 11 00:38:02 2012 +0200

l10n: Updated Italian (it) translation to 100%

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

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

commit b30019890676432668b2239a1d15ae945877aed7
Author: Per Kongstad p_kongs...@op.pl
Date:   Tue Apr 10 16:25:28 2012 +0200

l10n: Updated Danish (da) translation to 100%

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

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

commit 1fa2cc6ef9975e2a7a4255c1e22882ad792815fa
Author: Pjotr Anon pliniusmi...@gmail.com
Date:   Tue Apr 10 14:36:32 2012 +0200

l10n: Updated Dutch (Flemish) (nl) translation to 100%

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

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

commit f0655a25d4a153c835aad7275a2a5786f2d1f6f0
Author: Sergio Marques smarque...@gmail.com
Date:   Tue Apr 10 13:49:33 2012 +0200

l10n: Updated Portuguese (pt) translation to 100%

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

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

commit 4229dcad5bed3a7fc82465193aafb84e4234f30e
Author: Leandro Regueiro leandro.regue...@gmail.com
Date:   Tue Apr 10 12:47:30 2012 +0200

l10n: Updated Galician (gl) translation to 100%

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

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

commit 627124d30d213243dd2ce0469d0c24f346aaf6b8
Author: Seong-ho Cho darkcircle.0...@gmail.com
Date:   Tue Apr 10 11:04:43 2012 +0200

l10n: Updated Korean (ko) translation to 100%

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

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

commit 901110c0d1816e84147a40e5b790097560f33d8a
Author: Chipong Luo chipong@yahoo.com
Date:   Tue Apr 10 09:41:04 2012 +0200

l10n: Updated Chinese (China) (zh_CN) translation to 100%

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

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

 po/da.po|   12 ++--
 po/eu.po|   12 ++--
 po/gl.po|   16 
 po/it.po|   12 ++--
 po/ko.po|   20 +---
 po/nl.po|   18 +-
 po/pt.po|   12 ++--
 po/pt_BR.po |   12 ++--
 po/sk.po|   12 ++--
 po/uk.po|   12 ++--
 po/zh_CN.po |   10 +-
 11 files changed, 73 insertions(+), 75 deletions(-)

diff --git a/po/da.po b/po/da.po
index 7fe58de..b4caaec 100644
--- a/po/da.po
+++ b/po/da.po
@@ -7,17 +7,17 @@ msgid 
 msgstr 
 Project-Id-Version: xfce4-wavelan-plugin 0.5.4\n
 Report-Msgid-Bugs-To: \n
-POT-Creation-Date: 2012-04-09 23:00+0200\n
+POT-Creation-Date: 2012-04-10 13:00+\n
 PO-Revision-Date: 2009-01-23 13:09+0100\n
 Last-Translator: Per Kongstad p_kongs...@op.pl\n
 Language-Team: Danish da...@dansk-gruppen.dk\n
-Language: da\n
 MIME-Version: 1.0\n
 Content-Type: text/plain; charset=UTF-8\n
 Content-Transfer-Encoding: 8bit\n
+Language: da\n
 X-Poedit-Language

  1   2   3   4   >