[Xfce4-commits] Merge branch 'master' of ssh://git.xfce.org/git/xfce/xfce4-power-manager
Updating branch refs/heads/master to 8de9a16b5860cc798aa65375170066b2cc1ef4f5 (commit) from 484409ef3abec46797067aa8e581e868c2959506 (commit) commit 8de9a16b5860cc798aa65375170066b2cc1ef4f5 Merge: 484409e dcd60f5 Author: Ali Abdallah Date: Fri Jul 8 10:01:04 2011 +0200 Merge branch 'master' of ssh://git.xfce.org/git/xfce/xfce4-power-manager commit dcd60f59dac676e3c749d853598e7fdf8a1a82b3 Author: محمد الحرقان Date: Sat Jul 2 08:52:56 2011 +0200 l10n: Updated Arabic (ar) translation to 96% New status: 203 messages complete with 8 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit a76cd3ab48f1a34d83c7abc599417f06d7efe47e Author: كريم أولاد الشلحة Date: Sat Jul 2 00:33:28 2011 +0200 l10n: Updated Arabic (ar) translation to 95% New status: 202 messages complete with 0 fuzzies and 9 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 8b92cca1572cd52eda80ec7b18ab402299a1bd23 Author: محمد الحرقان Date: Fri Jul 1 16:38:53 2011 +0200 l10n: Updated Arabic (ar) translation to 93% New status: 198 messages complete with 3 fuzzies and 10 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 356f152a9f726f4f23122daf2cd5eaf6a8037e18 Author: محمد الحرقان Date: Fri Jul 1 16:34:50 2011 +0200 l10n: Updated Arabic (ar) translation to 92% New status: 195 messages complete with 2 fuzzies and 14 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 78c007cf80ee72fe87ba0e6887c30c2395965fbe Author: محمد الحرقان Date: Fri Jul 1 16:14:05 2011 +0200 l10n: Updated Arabic (ar) translation to 84% New status: 179 messages complete with 3 fuzzies and 29 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 5bae7684f16b9ecc1ca8cf2185f735aaac946028 Author: محمد الحرقان Date: Fri Jul 1 16:02:37 2011 +0200 l10n: Updated Arabic (ar) translation to 76% New status: 162 messages complete with 3 fuzzies and 46 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 4cfcedb48ea7ec8b11fec3e14d1de560ec83e42c Author: محمد الحرقان Date: Fri Jul 1 16:01:35 2011 +0200 l10n: Updated Arabic (ar) translation to 75% New status: 159 messages complete with 4 fuzzies and 48 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit a84306d829a3335e68289e7e3f27ab8e Author: محمد الحرقان Date: Thu Jun 30 23:51:52 2011 +0200 l10n: Updated Arabic (ar) translation to 58% New status: 124 messages complete with 3 fuzzies and 84 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 4a4a858fd2545d8f0eafc256ac6b2a27e91f25c9 Author: محمد الحرقان Date: Thu Jun 30 18:52:47 2011 +0200 l10n: Updated Arabic (ar) translation to 53% New status: 112 messages complete with 4 fuzzies and 95 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/ar.po | 354 ++ 1 files changed, 196 insertions(+), 158 deletions(-) diff --git a/po/ar.po b/po/ar.po index f6ba271..7025d17 100644 --- a/po/ar.po +++ b/po/ar.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xfce4-power-manager\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-06-28 16:06+\n" +"POT-Creation-Date: 2011-07-02 04:07+\n" "PO-Revision-Date: 2011-06-27 23:49-\n" "Last-Translator: كريم اولاد الشلحة \n" "Language-Team: Arabic Xfce Translation Team \n" @@ -84,35 +84,35 @@ msgstr "مدير إعدادات الطاقة" #: ../data/interfaces/xfpm-settings.ui.h:15 msgid "Prefer power savings over performance" -msgstr "" +msgstr "يفضل توفير الطاقة على حساب الأداء" #: ../data/interfaces/xfpm-settings.ui.h:16 msgid "Put display to sleep when computer is inactive for:" -msgstr "" +msgstr "ضع العرض على وضع النوم عندما يكون الكمبيوتر غير نشط لمدة :" #: ../data/interfaces/xfpm-settings.ui.h:17 msgid "Put the computer to sleep when inactive for:" -msgstr "" +msgstr "ضع الكمبيوتر على وضع النوم عندما يكون غير نشط لمدة:" #: ../data/interfaces/xfpm-settings.ui.h:18 msgid "Reduce screen brightness when computer is inactive for:" -msgstr "" +msgstr "تقليل سطوع الشاشة عندما يكون الكمبيوتر غير نشط لمدة:" #: ../data/interfaces/xfpm-settings.ui.h:19 msgid "Set computer inactivity sleep mode:" -msgstr "" +msgstr "تعيين وضع النوم وخمول الكمبيوتر:" #: ../data/interfaces/xfpm-settings.ui.h:20 msgid "Set monitor sleep mode:" -msgstr "" +msgstr "ضبط مراقبة وضع السكون :" #: ../data/interfaces/xfpm-settings.ui.h:21 msgid &qu
[Xfce4-commits] Refresh adaptor icon when battery device removed.
Updating branch refs/heads/master to 484409ef3abec46797067aa8e581e868c2959506 (commit) from 4c705bee7f3bb154ad7212a4604e26de1ef123cc (commit) commit 484409ef3abec46797067aa8e581e868c2959506 Author: Ali Abdallah Date: Wed Jul 6 11:43:30 2011 +0200 Refresh adaptor icon when battery device removed. src/xfpm-power.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/xfpm-power.c b/src/xfpm-power.c index d22e502..45ad928 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -981,7 +981,7 @@ static void xfpm_power_add_device (XfpmPower *power, const gchar *object_path) { DBusGProxy *proxy_prop; -guint device_type; +guint device_type = XFPM_DEVICE_TYPE_UNKNOWN; GValue value; proxy_prop = dbus_g_proxy_new_for_name (power->priv->bus, @@ -999,6 +999,8 @@ xfpm_power_add_device (XfpmPower *power, const gchar *object_path) device_type = g_value_get_uint (&value); +XFPM_DEBUG_ENUM (device_type, XFPM_TYPE_DEVICE_TYPE, " device added"); + if ( device_type == XFPM_DEVICE_TYPE_BATTERY || device_type == XFPM_DEVICE_TYPE_UPS || device_type == XFPM_DEVICE_TYPE_MOUSE || @@ -1075,6 +1077,7 @@ static void xfpm_power_changed_cb (DBusGProxy *proxy, XfpmPower *power) { xfpm_power_get_properties (power); +xfpm_power_refresh_adaptor_visible (power); } static void @@ -1092,14 +1095,7 @@ xfpm_power_device_removed_cb (DBusGProxy *proxy, const gchar *object_path, XfpmP static void xfpm_power_device_changed_cb (DBusGProxy *proxy, const gchar *object_path, XfpmPower *power) { -XfpmBattery *battery; - -battery = g_hash_table_lookup (power->priv->hash, object_path); - -if ( battery ) -{ - -} +xfpm_power_refresh_adaptor_visible (power); } #ifdef ENABLE_POLKIT ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Added some code (very little) for Power DBus Service that will be used by both the session and the power manager.
Updating branch refs/heads/xfce-4.10 to 900acdbb5ad48254c28ec9a3672d116995005104 (commit) from 4c705bee7f3bb154ad7212a4604e26de1ef123cc (commit) commit 900acdbb5ad48254c28ec9a3672d116995005104 Author: Ali Abdallah Date: Wed Jul 6 21:46:13 2011 +0200 Added some code (very little) for Power DBus Service that will be used by both the session and the power manager. Makefile.am|1 + configure.ac.in|1 + xfce-powerd/Makefile.am| 49 +++ .../brightness-plugin.c => xfce-powerd/main.c | 43 ++--- xfce-powerd/org.xfce.Power.service.in |3 + xfce-powerd/org.xfce.Power.xml | 20 xfce-powerd/xfce-power.c | 92 src/xfpm-errors.h => xfce-powerd/xfce-power.h | 34 8 files changed, 211 insertions(+), 32 deletions(-) diff --git a/Makefile.am b/Makefile.am index 328aa68..ada596d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,7 @@ endif SUBDIRS = \ data\ + xfce-powerd \ libdbus \ common \ src \ diff --git a/configure.ac.in b/configure.ac.in index b925ec1..4221b14 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -209,6 +209,7 @@ AC_SUBST([PLATFORM_LDFLAGS]) AC_OUTPUT([ Makefile +xfce-powerd/Makefile libdbus/Makefile common/Makefile src/Makefile diff --git a/xfce-powerd/Makefile.am b/xfce-powerd/Makefile.am new file mode 100644 index 000..849deff --- /dev/null +++ b/xfce-powerd/Makefile.am @@ -0,0 +1,49 @@ +xfce_powerddir = $(libdir)/xfce4/power/xfce-powerd + +xfce_powerd_PROGRAMS = \ + xfce-powerd + + +xfce_powerd_SOURCES = \ + main.c \ + xfce-power.c\ + xfce-power.h\ + xfce-polkit.c \ + xfce-polkit.h \ + $(BUILT_SOURCES) + + +xfce_powerd_CFLAGS = \ + -I$(top_srcdir) \ + $(DBUS_GLIB_CFLAGS) + +xfce_powerd_LDADD =\ + $(DBUS_GLIB_LIBS) + + +servicedir = $(datadir)/dbus-1/services +service_in_files = \ + org.xfce.Power.service.in + +service_DATA = $(service_in_files:.service.in=.service) + +$(service_DATA): $(service_in_files) Makefile + @sed -e "s|\@libdir\@|$(libdir)|" $< > $@ + + +BUILT_SOURCES =\ + xfce-power-dbus-server.h + +xfce-power-dbus-server.h: org.xfce.Power.xml Makefile.am + dbus-binding-tool --prefix=xfce_power --mode=glib-server --output=xfce-power-dbus-server.h org.xfce.Power.xml + + +CLEANFILES = \ + $(service_DATA) \ + $(BUILT_SOURCES) + +EXTRA_DIST =\ + org.xfce.Power.xml \ + $(service_in_files) + + diff --git a/panel-plugins/brightness/brightness-plugin.c b/xfce-powerd/main.c similarity index 57% copy from panel-plugins/brightness/brightness-plugin.c copy to xfce-powerd/main.c index f7e84d0..f49dcbf 100644 --- a/panel-plugins/brightness/brightness-plugin.c +++ b/xfce-powerd/main.c @@ -1,5 +1,5 @@ /* - * * Copyright (C) 2009-2011 Ali + * * Copyright (C) 2011 Ali * * Licensed under the GNU General Public License Version 2 * @@ -22,26 +22,41 @@ #include #endif -#include #include -#include -#include #include +#include +#include -#include -#include +#include -#include "brightness-button.h" -static void -register_brightness_plugin (XfcePanelPlugin *plugin) +int main (int argc, char **argv) { -GtkWidget *button; +GMainLoop *main_loop; -button = brightness_button_new (plugin); -brightness_button_show (BRIGHTNESS_BUTTON (button)); -} +/* set the program name */ +g_set_prgname (G_LOG_DOMAIN); + +g_set_application_name (_("Xfce Power Service")); + +/* initialize the GLib type system */ +g_type_init (); + +/* initialize threading system */ +if (!g_thread_supported ()) + g_thread_init (NULL); + + +/* Create the main loop */ +main_loop = g_main_loop_new (NULL, FALSE); + + +g_main_loop_run (main_loop); + -XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(register_brightness_plugin); +g_main_loop_unref (main_loop); + +return EXIT_SUCCESS; +} diff --git a/xfce-powerd/org.xfce.Power.service.in b/xfce-powerd/org.xfce.Power.service.in new file mode 100644 index 000..182c597 --- /dev/null +++ b/xfce-powerd/org.xfce.Power.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name
[Xfce4-commits] Only dim brightness if the current level is brighter.
Updating branch refs/heads/master to ab07509cdf0fa05c56ae61a020abce2ac1fb28cb (commit) from 6b86e87fabb8ffe7916aa9c18d8b21e8d7896870 (commit) commit ab07509cdf0fa05c56ae61a020abce2ac1fb28cb Author: Ali Abdallah Date: Mon Jun 27 16:55:28 2011 +0200 Only dim brightness if the current level is brighter. src/xfpm-backlight.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/xfpm-backlight.c b/src/xfpm-backlight.c index 94a4f44..73bd5f6 100644 --- a/src/xfpm-backlight.c +++ b/src/xfpm-backlight.c @@ -104,9 +104,15 @@ xfpm_backlight_dim_brightness (XfpmBacklight *backlight) dim_level = dim_level * backlight->priv->max_level / 100; - XFPM_DEBUG ("Current brightness level before dimming : %li, new %li", backlight->priv->last_level, dim_level); - - backlight->priv->dimmed = xfpm_brightness_set_level (backlight->priv->brightness, dim_level); + /** +* Only reduce if the current level is brighter than +* the configured dim_level +**/ + if (backlight->priv->last_level > dim_level) + { + XFPM_DEBUG ("Current brightness level before dimming : %li, new %li", backlight->priv->last_level, dim_level); + backlight->priv->dimmed = xfpm_brightness_set_level (backlight->priv->brightness, dim_level); + } } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] change backlight property type to long
Updating branch refs/heads/master to 6b86e87fabb8ffe7916aa9c18d8b21e8d7896870 (commit) from 643962eb2d46d48042db0ab278c46813da8b6e9b (commit) commit 6b86e87fabb8ffe7916aa9c18d8b21e8d7896870 Author: Yves-Alexis Perez Date: Mon Jun 27 16:46:23 2011 +0200 change backlight property type to long common/xfpm-brightness.c | 68 +++--- common/xfpm-brightness.h |8 ++-- panel-plugins/brightness/brightness-button.c | 10 ++-- src/xfpm-backlight.c | 12 ++-- 4 files changed, 55 insertions(+), 43 deletions(-) diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c index e0b9c3c..45a121b 100644 --- a/common/xfpm-brightness.c +++ b/common/xfpm-brightness.c @@ -90,11 +90,11 @@ out: } static gboolean -xfpm_brightness_xrandr_get_level (XfpmBrightness *brightness, RROutput output, gint *current) +xfpm_brightness_xrandr_get_level (XfpmBrightness *brightness, RROutput output, long *current) { unsigned long nitems; unsigned long bytes_after; -gint *prop; +long *prop; Atom actual_type; int actual_format; gboolean ret = FALSE; @@ -110,7 +110,7 @@ xfpm_brightness_xrandr_get_level (XfpmBrightness *brightness, RROutput output, g if (actual_type == XA_INTEGER && nitems == 1 && actual_format == 32) { - memcpy (current, prop, sizeof (gint)); + memcpy (current, prop, sizeof (*current)); ret = TRUE; } @@ -120,7 +120,7 @@ xfpm_brightness_xrandr_get_level (XfpmBrightness *brightness, RROutput output, g } static gboolean -xfpm_brightness_xrandr_set_level (XfpmBrightness *brightness, RROutput output, gint level) +xfpm_brightness_xrandr_set_level (XfpmBrightness *brightness, RROutput output, long level) { gboolean ret = TRUE; @@ -133,7 +133,7 @@ xfpm_brightness_xrandr_set_level (XfpmBrightness *brightness, RROutput output, g if ( gdk_error_trap_pop () ) { - g_warning ("failed to XRRChangeOutputProperty for brightness %i", level); + g_warning ("failed to XRRChangeOutputProperty for brightness %li", level); ret = FALSE; } @@ -147,16 +147,27 @@ xfpm_brightness_setup_xrandr (XfpmBrightness *brightness) XRROutputInfo *info; Window window; gint major, minor, screen_num; +int event_base, error_base; gint min, max; gboolean ret = FALSE; gint i; -if ( !XRRQueryVersion (GDK_DISPLAY (), &major, &minor) ) +if (!XRRQueryExtension (GDK_DISPLAY (), &event_base, &error_base) || + !XRRQueryVersion (GDK_DISPLAY (), &major, &minor) ) { g_warning ("No XRANDR extension found"); return FALSE; } +if (major == 1 && minor < 2) +{ + g_warning ("XRANDR version < 1.2"); + return FALSE; +} +#ifdef RR_PROPERTY_BACKLIGHT +brightness->priv->backlight = XInternAtom (GDK_DISPLAY (), RR_PROPERTY_BACKLIGHT, True); +if (brightness->priv->backlight == None) /* fall back to deprecated name */ +#endif brightness->priv->backlight = XInternAtom (GDK_DISPLAY (), "BACKLIGHT", True); if (brightness->priv->backlight == None) @@ -172,10 +183,11 @@ xfpm_brightness_setup_xrandr (XfpmBrightness *brightness) window = RootWindow (GDK_DISPLAY (), screen_num); #if (RANDR_MAJOR == 1 && RANDR_MINOR >=3 ) -brightness->priv->resource = XRRGetScreenResourcesCurrent (GDK_DISPLAY (), window); -#else -brightness->priv->resource = XRRGetScreenResources (GDK_DISPLAY (), window); +if (major > 1 || minor >= 3) + brightness->priv->resource = XRRGetScreenResourcesCurrent (GDK_DISPLAY (), window); +else #endif + brightness->priv->resource = XRRGetScreenResources (GDK_DISPLAY (), window); for ( i = 0; i < brightness->priv->resource->noutput; i++) { @@ -200,11 +212,11 @@ xfpm_brightness_setup_xrandr (XfpmBrightness *brightness) } static gboolean -xfpm_brightness_xrand_up (XfpmBrightness *brightness, gint *new_level) +xfpm_brightness_xrand_up (XfpmBrightness *brightness, glong *new_level) { -gint hw_level; +long hw_level; gboolean ret = FALSE; -gint set_level; +long set_level; ret = xfpm_brightness_xrandr_get_level (brightness, brightness->priv->output, &hw_level); @@ -225,14 +237,14 @@ xfpm_brightness_xrand_up (XfpmBrightness *brightness, gint *new_level) if ( !ret ) { - g_warning ("xfpm_brightness_xrand_up failed for %d", set_level); + g_warning ("xfpm_brightness_xrand_up failed for %li", set_level); return FALSE; } /* Nothing changed in the hardware*/ if ( *new_level == hw_level ) { - g_warning ("xfpm_brightness_xrand_up did not change the hw level to %d", set_level); + g_warning ("xfpm_brightness_xrand_up did not change the hw level to %li", set_level); return FALSE; } @@ -240,11 +252,
[Xfce4-commits] Fix Broken empty battery icon..
Updating branch refs/heads/master to 643962eb2d46d48042db0ab278c46813da8b6e9b (commit) from 41ddd1adfc2d0f527a977a6202ff67785bb414d9 (commit) commit 643962eb2d46d48042db0ab278c46813da8b6e9b Author: Ali Abdallah Date: Mon Jun 27 16:27:15 2011 +0200 Fix Broken empty battery icon.. src/xfpm-battery.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index 9d8bbd9..763b014 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -309,10 +309,14 @@ xfpm_battery_refresh_icon (XfpmBattery *battery) battery->priv->icon_prefix, xfpm_battery_get_icon_index (battery->priv->type, battery->priv->percentage)); } + else if ( battery->priv->state == XFPM_DEVICE_STATE_EMPTY) + { + g_snprintf (icon_name, 128, "%s%s", battery->priv->icon_prefix, battery->priv->ac_online ? "000-charging" : "000"); + } } else { - if ( !battery->priv->present ) + if ( !battery->priv->present || battery->priv->state == XFPM_DEVICE_STATE_EMPTY ) { g_snprintf (icon_name, 128, "%s-000", battery->priv->icon_prefix); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] fix libnotify detection of notify_notification_attach_to_status_icon.
Updating branch refs/heads/master to 41ddd1adfc2d0f527a977a6202ff67785bb414d9 (commit) from 0cc3dfcfdc5872240c06fd94c241d3783cb42459 (commit) commit 41ddd1adfc2d0f527a977a6202ff67785bb414d9 Author: Yves-Alexis Perez Date: Mon Jun 27 16:15:18 2011 +0200 fix libnotify detection of notify_notification_attach_to_status_icon. src/xfpm-notify.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/xfpm-notify.c b/src/xfpm-notify.c index 311b0fd..9b485aa 100644 --- a/src/xfpm-notify.c +++ b/src/xfpm-notify.c @@ -234,6 +234,9 @@ xfpm_notify_new_notification_internal (const gchar *title, const gchar *message, if ( icon ) notify_notification_attach_to_status_icon (n, icon); #endif +#else + if ( icon ) + notify_notification_attach_to_status_icon (n, icon); #endif notify_notification_set_urgency (n, (NotifyUrgency)urgency); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix configure.ac.in with openbsd.
Updating branch refs/heads/master to 0cc3dfcfdc5872240c06fd94c241d3783cb42459 (commit) from 9681d88d9a7701bfdf94441a003548aab726396a (commit) commit 0cc3dfcfdc5872240c06fd94c241d3783cb42459 Author: Landry Breuil Date: Mon Jun 27 15:40:26 2011 +0200 Fix configure.ac.in with openbsd. configure.ac.in | 23 --- 1 files changed, 8 insertions(+), 15 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 12cb8bf..b925ec1 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -242,18 +242,11 @@ doc/C/images/Makefile po/Makefile.in ]) -echo " --- - Xfce Power Manager $VERSION - == - - prefix: ${prefix} - xdg autostart: ${sysconfdir/xdg/autostart} - POLKIT: ${polkit} - DPMS: ${have_dpms} - Network manager:${ac_network_manager} - Build panel plugins:${build_panel_plugins} - Debug: ${enable_debug} --- - -Configuration finished, type make to compile" +echo "prefix: ${prefix}" +echo "xdg autostart: ${sysconfdir}/xdg/autostart" +echo "POLKIT: ${polkit}" +echo "DPMS:${have_dpms}" +echo "Network manager: ${ac_network_manager}" +echo "Build panel plugins: ${build_panel_plugins}" +echo "Debug: ${enable_debug}" +echo "Configuration finished, type make to compile" ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Support NetworkManager 0.9
Updating branch refs/heads/master to 2a8d115e4172c4d09be86cb8182af89b97e1250b (commit) from 982896227688e2dfdfef976f1a19024aefbc9f28 (commit) commit 2a8d115e4172c4d09be86cb8182af89b97e1250b Author: Mikhail Efremov Date: Tue Mar 15 19:59:50 2011 +0300 Support NetworkManager 0.9 src/xfpm-network-manager.c |5 ++--- src/xfpm-network-manager.h |2 +- src/xfpm-power.c |4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/xfpm-network-manager.c b/src/xfpm-network-manager.c index 651f746..908b813 100644 --- a/src/xfpm-network-manager.c +++ b/src/xfpm-network-manager.c @@ -29,9 +29,8 @@ /* * Inform the Network Manager when we do suspend/hibernate - * message is either "wake" or "sleep" */ -gboolean xfpm_send_message_to_network_manager(const gchar *message) +gboolean xfpm_network_manager_sleep (gboolean sleep) { #ifdef WITH_NETWORK_MANAGER @@ -59,7 +58,7 @@ gboolean xfpm_send_message_to_network_manager(const gchar *message) return FALSE; } -dbus_g_proxy_call_no_reply (proxy, message, G_TYPE_INVALID); +dbus_g_proxy_call_no_reply (proxy, "Sleep", G_TYPE_BOOLEAN, sleep, G_TYPE_INVALID); g_object_unref (G_OBJECT(proxy)); dbus_g_connection_unref (bus); diff --git a/src/xfpm-network-manager.h b/src/xfpm-network-manager.h index 9d77ab8..51d0987 100644 --- a/src/xfpm-network-manager.h +++ b/src/xfpm-network-manager.h @@ -23,7 +23,7 @@ G_BEGIN_DECLS -gboolean xfpm_send_message_to_network_manager(const gchar *message); +gboolean xfpm_network_manager_sleep (gboolean sleep); G_END_DECLS diff --git a/src/xfpm-power.c b/src/xfpm-power.c index bbe1a77..d22e502 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -337,7 +337,7 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force) } g_signal_emit (G_OBJECT (power), signals [SLEEPING], 0); -xfpm_send_message_to_network_manager ("sleep"); +xfpm_network_manager_sleep (TRUE); g_object_get (G_OBJECT (power->priv->conf), LOCK_SCREEN_ON_SLEEP, &lock_screen, @@ -373,7 +373,7 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force) } g_signal_emit (G_OBJECT (power), signals [WAKING_UP], 0); -xfpm_send_message_to_network_manager ("wake"); +xfpm_network_manager_sleep (FALSE); } static void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add more strings for translation.
Updating branch refs/heads/master to d3c7a2c2b3af8458289c3524af6b614ad62e33c6 (commit) from f3671687c06758b192b64476e54900dfd6460b38 (commit) commit d3c7a2c2b3af8458289c3524af6b614ad62e33c6 Author: Mikhail Efremov Date: Wed May 4 16:36:14 2011 +0400 Add more strings for translation. src/xfpm-battery.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index 18da99c..9d8bbd9 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -219,7 +219,7 @@ xfpm_battery_get_message_from_battery_state (XfpmBattery *battery) est_time_str = xfpm_battery_get_time_string (battery->priv->time_to_full); - msg = g_strdup_printf ("%s (%i%%)\n%s until is fully charged.", tmp, battery->priv->percentage, est_time_str); + msg = g_strdup_printf (_("%s (%i%%)\n%s until is fully charged."), tmp, battery->priv->percentage, est_time_str); g_free (est_time_str); g_free (tmp); } @@ -239,7 +239,7 @@ xfpm_battery_get_message_from_battery_state (XfpmBattery *battery) est_time_str = xfpm_battery_get_time_string (battery->priv->time_to_empty); - msg = g_strdup_printf ("%s (%i%%)\nEstimated time left is %s.", tmp, battery->priv->percentage, est_time_str); + msg = g_strdup_printf (_("%s (%i%%)\nEstimated time left is %s."), tmp, battery->priv->percentage, est_time_str); g_free (tmp); g_free (est_time_str); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix a bunch of set but unused variables.
Updating branch refs/heads/master to f3671687c06758b192b64476e54900dfd6460b38 (commit) from f7a48533e198f3bb8d1ff5cffc1d2ec3bfdca6e6 (commit) commit f3671687c06758b192b64476e54900dfd6460b38 Author: Ali Abdallah Date: Thu May 5 11:18:21 2011 +0200 Fix a bunch of set but unused variables. configure.ac.in |2 +- libdbus/xfpm-dbus-monitor.c |2 ++ panel-plugins/brightness/brightness-button.c |6 ++ src/xfpm-button.c|4 src/xfpm-main.c |3 +++ 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 3cada9f..12cb8bf 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,7 +1,7 @@ m4_define([intltool_minimum_version], [0.31]) m4_define([xfpm_version_major], [1]) m4_define([xfpm_version_minor], [0]) -m4_define([xfpm_version_micro], [3]) +m4_define([xfpm_version_micro], [10]) m4_define([xfpm_version_build], []) m4_define([xfpm_version_tag],[]) m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [git], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])]) diff --git a/libdbus/xfpm-dbus-monitor.c b/libdbus/xfpm-dbus-monitor.c index f3c819c..a5888c4 100644 --- a/libdbus/xfpm-dbus-monitor.c +++ b/libdbus/xfpm-dbus-monitor.c @@ -185,7 +185,9 @@ xfpm_dbus_monitor_query_system_bus_idle (gpointer data) return TRUE; } + monitor = XFPM_DBUS_MONITOR (data); +monitor->priv->system_bus = bus; g_signal_emit (G_OBJECT (monitor), signals [SYSTEM_BUS_CONNECTION_CHANGED], 0, TRUE); return FALSE; diff --git a/panel-plugins/brightness/brightness-button.c b/panel-plugins/brightness/brightness-button.c index 0cf3dec..c4327e2 100644 --- a/panel-plugins/brightness/brightness-button.c +++ b/panel-plugins/brightness/brightness-button.c @@ -185,7 +185,7 @@ brightness_button_set_tooltip (BrightnessButton *button) static gboolean brightness_button_popup_win (GtkWidget *widget, GdkEvent *ev, guint32 ev_time) { -gint x, y, orientation; +gint x, y; gint current_level = 0; GdkDisplay *display; GdkScreen *screen; @@ -234,7 +234,6 @@ brightness_button_popup_win (GtkWidget *widget, GdkEvent *ev, guint32 ev_time) gdk_window_get_origin (widget->window, &x, &y); pos = xfce_panel_plugin_get_screen_position (button->priv->plugin); -orientation = xfce_panel_plugin_get_orientation (button->priv->plugin); /* top */ if ( pos == XFCE_SCREEN_POSITION_NW_H || @@ -320,9 +319,8 @@ brightness_button_press_event (GtkWidget *widget, GdkEventButton *ev) static void minus_clicked (GtkWidget *widget, BrightnessButton *button) { -gint level, max_level; +gint level; -max_level = xfpm_brightness_get_max_level (button->priv->brightness); level = (gint ) gtk_range_get_value (GTK_RANGE (button->priv->range)); if ( level != 0 ) diff --git a/src/xfpm-button.c b/src/xfpm-button.c index b93684e..d2a92e0 100644 --- a/src/xfpm-button.c +++ b/src/xfpm-button.c @@ -252,10 +252,6 @@ xfpm_button_init (XfpmButton *button) static void xfpm_button_finalize (GObject *object) { -XfpmButton *button; - -button = XFPM_BUTTON (object); - G_OBJECT_CLASS(xfpm_button_parent_class)->finalize(object); } diff --git a/src/xfpm-main.c b/src/xfpm-main.c index d43cc74..a98583b 100644 --- a/src/xfpm-main.c +++ b/src/xfpm-main.c @@ -136,6 +136,7 @@ xfpm_dump (GHashTable *hash) "%s: %s\n" "%s: %s\n" "%s: %s\n" + "%s: %s\n" "%s: %s\n", _("Can suspend"), xfpm_bool_to_local_string (can_suspend), @@ -151,6 +152,8 @@ xfpm_dump (GHashTable *hash) xfpm_bool_to_local_string (can_shutdown), _("Authorized to spin down hard disks"), xfpm_bool_to_local_string (can_spin_down), +_("Has battery"), +xfpm_bool_to_local_string (has_battery), _("Has brightness panel"), xfpm_bool_to_local_string (has_lcd_brightness), _("Has power button"), ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix default spin down toogle value.
Updating branch refs/heads/master to f7a48533e198f3bb8d1ff5cffc1d2ec3bfdca6e6 (commit) from 8ef0d25692d1cc307a65634bc86458ac2a787fe5 (commit) commit f7a48533e198f3bb8d1ff5cffc1d2ec3bfdca6e6 Author: Ali Abdallah Date: Thu May 5 11:17:46 2011 +0200 Fix default spin down toogle value. settings/xfpm-settings.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c index 0d83734..67cc5a1 100644 --- a/settings/xfpm-settings.c +++ b/settings/xfpm-settings.c @@ -944,6 +944,8 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_hibernate, #endif spin_down = GTK_WIDGET (gtk_builder_get_object (xml, "spin-down-on-battery")); +gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (spin_down), + xfconf_channel_get_bool (channel, PROPERTIES_PREFIX SPIN_DOWN_ON_BATTERY, TRUE)); gtk_widget_set_sensitive (spin_down, can_spin_down); if ( !devkit_disk ) @@ -1091,6 +1093,9 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean auth_suspend, #endif spin_down = GTK_WIDGET (gtk_builder_get_object (xml, "spin-down-on-ac")); +gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (spin_down), + xfconf_channel_get_bool (channel, PROPERTIES_PREFIX SPIN_DOWN_ON_AC, FALSE)); + gtk_widget_set_sensitive (spin_down, can_spin_down); if ( !devkit_disk ) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Merge branch 'master' of ssh://git.xfce.org/git/apps/parole
Updating branch refs/heads/master to 314438e9816fcdb422cca76d111ffa212c1e56c3 (commit) from 68c0b526047ee73b9171715022a54418a891deda (commit) commit 314438e9816fcdb422cca76d111ffa212c1e56c3 Merge: 68c0b52 7ff7e15 Author: Ali Abdallah Date: Sun Apr 17 14:01:21 2011 +0200 Merge branch 'master' of ssh://git.xfce.org/git/apps/parole commit 7ff7e15b7e77f073d92315c3dade088151146958 Author: Per Kongstad Date: Sun Apr 17 13:53:12 2011 +0200 l10n: Updated Danish (da) translation to 100% New status: 184 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/da.po | 368 ++--- 1 files changed, 181 insertions(+), 187 deletions(-) diff --git a/po/da.po b/po/da.po index 823076d..e9450f0 100644 --- a/po/da.po +++ b/po/da.po @@ -2,12 +2,12 @@ # Copyright (C) 2010 parole # This file is distributed under the same license as the parole package. # Per Kongstad , 2009, 10 -# +# msgid "" msgstr "" "Project-Id-Version: parole 0.2.0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-13 19:55+0100\n" +"POT-Creation-Date: 2011-04-17 10:08+\n" "PO-Revision-Date: 2010-01-13 20:09+0100\n" "Last-Translator: Per Kongstad \n" "Language-Team: Danish \n" @@ -15,8 +15,8 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Danish\n" -"X-Poedit-Country: Denmark\n" "X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Country: Denmark\n" #: ../data/interfaces/parole.ui.h:1 msgid "16:9 (Widescreen)" @@ -62,8 +62,7 @@ msgstr "Medieafspiller" msgid "Mute" msgstr "Slå lyd fra" -#: ../data/interfaces/parole.ui.h:12 -#: ../src/parole-player.c:1198 +#: ../data/interfaces/parole.ui.h:12 ../src/parole-player.c:1215 #: ../src/parole-disc-menu.c:113 msgid "Next Chapter" msgstr "Næste kapitel" @@ -72,9 +71,7 @@ msgstr "Næste kapitel" msgid "None" msgstr "Ingen" -#: ../data/interfaces/parole.ui.h:14 -#: ../data/desktop/parole.desktop.in.in.h:1 -#: ../src/parole-about.c:70 +#: ../data/interfaces/parole.ui.h:14 ../src/parole-about.c:74 #: ../plugins/window-title/window-title-provider.c:58 msgid "Parole Media Player" msgstr "Parole medieafspiller" @@ -83,13 +80,12 @@ msgstr "Parole medieafspiller" msgid "Plugins" msgstr "Udvidelsesmoduler" -#: ../data/interfaces/parole.ui.h:16 -#: ../src/parole-player.c:1210 +#: ../data/interfaces/parole.ui.h:16 ../src/parole-player.c:1227 #: ../src/parole-disc-menu.c:114 msgid "Previous Chapter" msgstr "Tidligere kapitel" -#: ../data/interfaces/parole.ui.h:17 +#: ../data/interfaces/parole.ui.h:17 ../src/parole-medialist.c:1264 msgid "Repeat" msgstr "Gentag" @@ -97,7 +93,7 @@ msgstr "Gentag" msgid "Select Track" msgstr "Vælg spor" -#: ../data/interfaces/parole.ui.h:19 +#: ../data/interfaces/parole.ui.h:19 ../src/parole-medialist.c:1280 msgid "Shuffle" msgstr "Blande" @@ -138,14 +134,26 @@ msgid "_View" msgstr "_Vis" #: ../data/interfaces/mediachooser.ui.h:1 +msgid "Add" +msgstr "Tilføj" + +#: ../data/interfaces/mediachooser.ui.h:2 +msgid "Open media files" +msgstr "Åbn mediefiler" + +#: ../data/interfaces/mediachooser.ui.h:3 +msgid "Parole Media Chooser" +msgstr "Parole medievælger" + +#: ../data/interfaces/mediachooser.ui.h:4 msgid "Replace playlist with opened files" msgstr "Erstat spilleliste med åbne filer" -#: ../data/interfaces/mediachooser.ui.h:2 +#: ../data/interfaces/mediachooser.ui.h:5 msgid "Scan folders recursively" msgstr "Gennemsøg mapper rekursivt" -#: ../data/interfaces/mediachooser.ui.h:3 +#: ../data/interfaces/mediachooser.ui.h:6 msgid "Start playing opened files" msgstr "Begynd at afspille åbne filer" @@ -245,19 +253,43 @@ msgstr "Efter filendelse" msgid "Select File Types (By Extension)" msgstr "Vælg filtyper (efter filendelse)" -#: ../gst/parole-gst.c:1498 +#: ../data/interfaces/open-location.ui.h:1 +msgid "Clear history" +msgstr "Slet historik" + +#: ../data/interfaces/open-location.ui.h:2 +msgid "Enter the address of a location to open" +msgstr "Indtast addressen til lokationen som skal åbnes" + +#: ../data/interfaces/open-location.ui.h:3 +msgid "Open location of media file or live stream" +msgstr "Åbn placering af mediefiler eller live-strøm" + +#: ../data/desktop/parole.desk
[Xfce4-commits] Automatically select row for the media that is currently played.
Deleting branch refs/heads/master to 68c0b526047ee73b9171715022a54418a891deda (commit) from c2767420697ca1195817da0b9936b1ab7da8bead (commit) commit 68c0b526047ee73b9171715022a54418a891deda Author: Ali Abdallah Date: Sun Apr 17 13:57:58 2011 +0200 Automatically select row for the media that is currently played. configure.ac.in |2 +- src/parole-player.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 8b3f385..d1b65b0 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -3,7 +3,7 @@ m4_define([parole_verinfo], [0:2:0]) m4_define([parole_version_api], [0]) m4_define([parole_version_major], [0]) m4_define([parole_version_minor], [2]) -m4_define([parole_version_micro], [0.5]) +m4_define([parole_version_micro], [0.6]) m4_define([parole_version_build], []) m4_define([parole_version_tag], []) m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])]) diff --git a/src/parole-player.c b/src/parole-player.c index 964ba34..819e67d 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -662,7 +662,7 @@ parole_player_playing (ParolePlayer *player, const ParoleStream *stream) g_object_unref (pix); parole_player_save_uri (player, stream); - +parole_media_list_select_row (player->priv->list, player->priv->row); gtk_widget_grab_focus (player->priv->gst); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 0.2.0.6
Updating annotated tag refs/tags/0.2.0.6 as new annotated tag to 89d31683e9c6974f0c89b0a9b51429cfa05a927b (tag) succeeds 0.2.0.5-4-gc276742 tagged by Ali Abdallah on 2011-04-17 11:58 + Ali Abdallah (1): Automatically select row for the media that is currently played. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 0.2.0.5
Updating annotated tag refs/tags/0.2.0.5 as new annotated tag to ca6eec1fff232472b3044da0bf0964bc19b6ea1e (tag) succeeds 0.2.0.1-45-g35dded8 tagged by Ali Abdallah on 2011-04-15 18:19 + Ali Abdallah (1): Update copyright information. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Update copyright information.
Updating branch refs/heads/master to 3633d133f48db6cebef36dadb29e26deec5b5e2a (commit) from 35dded8a3a880966594e86d26389acdd8cb2451d (commit) commit 3633d133f48db6cebef36dadb29e26deec5b5e2a Author: Ali Abdallah Date: Fri Apr 15 19:36:39 2011 +0200 Update copyright information. common/parole-common.c |2 +- common/parole-common.h |2 +- common/parole-rc-utils.c|2 +- common/parole-rc-utils.h|2 +- common/parole-screensaver.c |2 +- common/parole-screensaver.h |2 +- dbus/parole-dbus.c |2 +- dbus/parole-dbus.h |2 +- gst/parole-gst-iface.c |2 +- gst/parole-gst-iface.h |2 +- gst/parole-gst.c|2 +- gst/parole-gst.h|2 +- parole/parole-debug.c |2 +- parole/parole-debug.h |2 +- parole/parole-file.c|2 +- parole/parole-file.h|2 +- parole/parole-filters.c |2 +- parole/parole-filters.h |2 +- parole/parole-pl-parser.c |2 +- parole/parole-pl-parser.h |2 +- parole/parole-provider-player.c |2 +- parole/parole-provider-player.h |2 +- parole/parole-provider-plugin.c |2 +- parole/parole-provider-plugin.h |2 +- parole/parole-stream.c |2 +- parole/parole-stream.h |2 +- parole/parole.h.in |2 +- plugins/power-manager/power-manager-plugin.c|2 +- plugins/power-manager/power-manager-provider.c |2 +- plugins/power-manager/power-manager-provider.h |2 +- plugins/properties/stream-properties-plugin.c |2 +- plugins/properties/stream-properties-provider.c |2 +- plugins/properties/stream-properties-provider.h |2 +- plugins/sample/sample-plugin.c |2 +- plugins/sample/sample-provider.c|2 +- plugins/sample/sample-provider.h|2 +- plugins/tray/tray-plugin.c |2 +- plugins/tray/tray-provider.c|2 +- plugins/tray/tray-provider.h|2 +- plugins/window-title/window-title-plugin.c |2 +- plugins/window-title/window-title-provider.c|2 +- plugins/window-title/window-title-provider.h|2 +- src/main.c |2 +- src/parole-about.c |4 ++-- src/parole-about.h |2 +- src/parole-builder.c|2 +- src/parole-builder.h|2 +- src/parole-button.c |2 +- src/parole-button.h |2 +- src/parole-conf-dialog.c|2 +- src/parole-conf-dialog.h|2 +- src/parole-conf.c |2 +- src/parole-conf.h |2 +- src/parole-disc-menu.c |2 +- src/parole-disc-menu.h |2 +- src/parole-disc.c |2 +- src/parole-disc.h |2 +- src/parole-mediachooser.c |2 +- src/parole-mediachooser.h |2 +- src/parole-medialist.c |2 +- src/parole-medialist.h |2 +- src/parole-module.c |2 +- src/parole-module.h |2 +- src/parole-open-location.c |2 +- src/parole-open-location.h |2 +- src/parole-player.c |2 +- src/parole-player.h |2 +- src/parole-plugin-player.c |2 +- src/parole-plugin-player.h |2 +- src/parole-plugins-manager.c|2 +- src/parole-plugins-manager.h|2 +- src/parole-session.c|2 +- src/parole-session.h|2 +- src/parole-statusbar.c |2 +- src/parole-statusbar.h |2 +- src/parole-utils.c |2 +- src/parole-utils.h |2 +- src/parole-vis.c|2 +- src/parole-vis.h|2 +- 79 files changed, 80
[Xfce4-commits] Add missing files to POTFILES and update verion information.
Updating branch refs/heads/master to 35dded8a3a880966594e86d26389acdd8cb2451d (commit) from 727ff8e77aa3c9da5081aa632fefb18b58a81ad1 (commit) commit 35dded8a3a880966594e86d26389acdd8cb2451d Author: Ali Abdallah Date: Fri Apr 15 19:25:40 2011 +0200 Add missing files to POTFILES and update verion information. configure.ac.in |2 +- po/POTFILES.in |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 933de54..8b3f385 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -3,7 +3,7 @@ m4_define([parole_verinfo], [0:2:0]) m4_define([parole_version_api], [0]) m4_define([parole_version_major], [0]) m4_define([parole_version_minor], [2]) -m4_define([parole_version_micro], [0.2]) +m4_define([parole_version_micro], [0.5]) m4_define([parole_version_build], []) m4_define([parole_version_tag], []) m4_define([parole_version], [parole_version_major().parole_version_minor().parole_version_micro()ifelse(parole_version_tag(), [git], [parole_version_tag().parole_version_build()], [parole_version_tag()])]) diff --git a/po/POTFILES.in b/po/POTFILES.in index b975ec1..acd215c 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -5,7 +5,9 @@ [type: gettext/glade]data/interfaces/plugins.ui [type: gettext/glade]data/interfaces/parole-settings.ui [type: gettext/glade]data/interfaces/save-playlist.ui +[type: gettext/glade]data/interfaces/open-location.ui data/desktop/parole.desktop.in.in +common/parole-common.c gst/parole-gst.c src/main.c src/parole-mediachooser.c ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Added -F --fullscreen to start in fullscreen mode.
Updating branch refs/heads/master to 727ff8e77aa3c9da5081aa632fefb18b58a81ad1 (commit) from 4770f9661ddae192446ddb83d3d0cc0f7245839c (commit) commit 727ff8e77aa3c9da5081aa632fefb18b58a81ad1 Author: Ali Abdallah Date: Fri Apr 15 17:46:17 2011 +0200 Added -F --fullscreen to start in fullscreen mode. src/main.c |5 + src/parole-player.c |2 +- src/parole-player.h |3 +++ 3 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/main.c b/src/main.c index 524a731..fe35937 100644 --- a/src/main.c +++ b/src/main.c @@ -217,6 +217,7 @@ int main (int argc, char **argv) gboolean lower_volume = FALSE; gboolean mute = FALSE; gboolean no_plugins = FALSE; +gboolean fullscreen = FALSE; gchar*client_id = NULL; GOptionEntry option_entries[] = @@ -234,6 +235,7 @@ int main (int argc, char **argv) { "lower-volume", 'l', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &lower_volume, N_("Lower volume"), NULL }, { "mute", 'm', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &mute, N_("Mute volume"), NULL }, { "version", 'V', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &version, N_("Version information"), NULL }, + { "fullscreen", 'F', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &fullscreen, N_("Start in fullscreen mode"), NULL }, { "xv", '\0', G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, (GOptionArgFunc) xv_option_given, N_("Enabled/Disable XV support"), NULL}, { "sm-client-id", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &client_id, NULL, NULL }, {G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, N_("Media to play"), NULL}, @@ -318,6 +320,9 @@ int main (int argc, char **argv) parole_session_real_init (session); player = parole_player_new (); + + if (fullscreen) + parole_player_full_screen (player, TRUE); if ( filenames && filenames[0] != NULL ) { diff --git a/src/parole-player.c b/src/parole-player.c index 5dbb434..b4332ea 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -1080,7 +1080,7 @@ parole_player_move_fs_window (ParolePlayer *player) rect.height + rect.y - player->priv->play_box->allocation.height); } -static void +void parole_player_full_screen (ParolePlayer *player, gboolean fullscreen) { gint npages; diff --git a/src/parole-player.h b/src/parole-player.h index 8060a22..af81e9f 100644 --- a/src/parole-player.h +++ b/src/parole-player.h @@ -56,6 +56,9 @@ void parole_player_play_uri_disc (ParolePlayer *player, voidparole_player_terminate (ParolePlayer *player); +voidparole_player_full_screen (ParolePlayer *player, + gboolean fullscreen); + G_END_DECLS #endif /* __PAROLE_PLAYER_H */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Better chooser interface.
Updating branch refs/heads/master to 4770f9661ddae192446ddb83d3d0cc0f7245839c (commit) from 6d95f5740234781afc222d6017728702d8bed5c0 (commit) commit 4770f9661ddae192446ddb83d3d0cc0f7245839c Author: Ali Abdallah Date: Fri Apr 15 16:43:07 2011 +0200 Better chooser interface. data/desktop/parole.desktop.in.in |2 +- data/interfaces/Makefile.am |6 +- data/interfaces/mediachooser.ui | 217 ++--- data/interfaces/open-location.ui | 178 ++ data/pixmaps/Makefile.am |3 +- data/pixmaps/loader.gif | Bin 0 -> 673 bytes plugins/tray/tray-provider.c | 63 --- src/parole-utils.c|3 + 8 files changed, 343 insertions(+), 129 deletions(-) diff --git a/data/desktop/parole.desktop.in.in b/data/desktop/parole.desktop.in.in index 1fcd40b..ec62c3f 100644 --- a/data/desktop/parole.desktop.in.in +++ b/data/desktop/parole.desktop.in.in @@ -1,5 +1,5 @@ [Desktop Entry] -_Name=Parole Media Player +_Name=Parole Icon=parole Exec=parole %F Terminal=false diff --git a/data/interfaces/Makefile.am b/data/interfaces/Makefile.am index dbb3922..58a9c85 100644 --- a/data/interfaces/Makefile.am +++ b/data/interfaces/Makefile.am @@ -4,7 +4,8 @@ interfaces =\ playlist.ui \ mediachooser.ui \ save-playlist.ui\ - plugins.ui + plugins.ui \ + open-location.ui interfaces_h = \ $(interfaces:.ui=_ui.h) @@ -27,6 +28,9 @@ mediachooser_ui.h: mediachooser.ui save-playlist_ui.h: save-playlist.ui exo-csource --static --strip-comments --strip-content --name=save_playlist_ui $< > $@ +open-location_ui.h: open-location.ui + exo-csource --static --strip-comments --strip-content --name=open_location_ui $< > $@ + plugins_ui.h: plugins.ui exo-csource --static --strip-comments --strip-content --name=plugins_ui $< > $@ diff --git a/data/interfaces/mediachooser.ui b/data/interfaces/mediachooser.ui index e546f3d..ac62ab2 100644 --- a/data/interfaces/mediachooser.ui +++ b/data/interfaces/mediachooser.ui @@ -1,109 +1,154 @@ + - -True -vertical -4 - - + +Parole Media Chooser +680 +480 +audio-x-generic +normal +False +Open media files + + + True -5 vertical -1 - - - - -0 - - - - -Scan folders recursively -True -True -False -True - - - -False -False -1 - - - - -Replace playlist with opened files -True -True -False -True - - - -False -False -2 - - - - -Start playing opened files -True -True -False -True - - - -False -False -3 - - - - -True -5 -5 -end +2 - -gtk-close + True -True -True -True - +vertical + + +True +5 +vertical +1 + + + + +0 + + + + +Scan folders recursively +True +True +False +True + + + +False +False +1 + + + + +Replace playlist with opened files +True +True +False +True + + + +False +False +2 + + + + +Start playing opened files +True +True +False +True + + + +False +False +3 + + -False -False -0 +1 - - + + True -True -True -True - +edge + +
[Xfce4-commits] Check stream seekable on the tick timeout idle after playing to make seeking working with newer versions of GStreamer.
Updating branch refs/heads/master to ef9b1bcc2ff829085dfc77e6bf53e650e26ce445 (commit) from b1004d01881ff5a18d2bdf99552b4b077dba3c35 (commit) commit ef9b1bcc2ff829085dfc77e6bf53e650e26ce445 Author: Ali Abdallah Date: Fri Apr 15 15:24:58 2011 +0200 Check stream seekable on the tick timeout idle after playing to make seeking working with newer versions of GStreamer. gst/parole-gst.c| 54 ++ src/parole-player.c | 18 + 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index ae49623..6e0a28a 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -565,6 +565,28 @@ parole_gst_load_logo (ParoleGst *gst) g_free (path); } +static void +parole_gst_query_capabilities (ParoleGst *gst) +{ +GstQuery *query; +gboolean seekable; + +query = gst_query_new_seeking (GST_FORMAT_TIME); + +if ( gst_element_query (gst->priv->playbin, query) ) +{ + gst_query_parse_seeking (query, +NULL, +&seekable, +NULL, +NULL); + g_object_set (G_OBJECT (gst->priv->stream), + "seekable", seekable, + NULL); +} +gst_query_unref (query); +} + static gboolean parole_gst_tick_timeout (gpointer data) { @@ -574,11 +596,16 @@ parole_gst_tick_timeout (gpointer data) GstFormat format = GST_FORMAT_TIME; gint64 value; gboolean video; +gboolean seekable; +gint64 duration; + gst = PAROLE_GST (data); g_object_get (G_OBJECT (gst->priv->stream), "has-video", &video, + "seekable", &seekable, + "duration", &duration, NULL); gst_element_query_position (gst->priv->playbin, &format, &pos); @@ -588,6 +615,11 @@ parole_gst_tick_timeout (gpointer data) if ( gst->priv->state == GST_STATE_PLAYING ) { + if (duration != 0 && seekable == FALSE) + { + parole_gst_query_capabilities (gst); + } + value = pos / GST_SECOND; if ( G_LIKELY (value > 0) ) @@ -620,28 +652,6 @@ parole_gst_tick (ParoleGst *gst) } static void -parole_gst_query_capabilities (ParoleGst *gst) -{ -GstQuery *query; -gboolean seekable; - -query = gst_query_new_seeking (GST_FORMAT_TIME); - -if ( gst_element_query (gst->priv->playbin, query) ) -{ - gst_query_parse_seeking (query, -NULL, -&seekable, -NULL, -NULL); - g_object_set (G_OBJECT (gst->priv->stream), - "seekable", seekable, - NULL); -} -gst_query_unref (query); -} - -static void parole_gst_query_duration (ParoleGst *gst) { gint64 absolute_duration = 0; diff --git a/src/parole-player.c b/src/parole-player.c index 6a057d3..5dbb434 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -540,6 +540,21 @@ parole_player_media_progressed_cb (ParoleGst *gst, const ParoleStream *stream, g } static void +parole_player_seekable_notify (ParoleStream *stream, GParamSpec *spec, ParolePlayer *player) +{ +gboolean seekable; + +g_object_get (G_OBJECT (stream), + "seekable", &seekable, + NULL); + +gtk_widget_set_tooltip_text (GTK_WIDGET (player->priv->range), seekable ? NULL : _("Media stream is not seekable")); +gtk_widget_set_sensitive (GTK_WIDGET (player->priv->range), seekable); +gtk_widget_set_sensitive (player->priv->seekf, seekable); +gtk_widget_set_sensitive (player->priv->seekb, seekable); +} + +static void parole_player_set_playpause_button_image (GtkWidget *widget, const gchar *stock_id) { GtkWidget *img; @@ -1993,6 +2008,9 @@ parole_player_init (ParolePlayer *player) gtk_widget_realize (player->priv->gst); gtk_widget_show (player->priv->gst); +g_signal_connect (G_OBJECT (parole_gst_get_stream (PAROLE_GST (player->priv->gst))), "notify::seekable", + G_CALLBACK (parole_player_seekable_notify), player); + parole_player_change_volume (player, (gdouble) (parole_rc_read_entry_int ("volume", PAROLE_RC_GROUP_GENERAL, 100)/100.)); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Make it compiles, the ugly way...
Updating branch refs/heads/master to b1004d01881ff5a18d2bdf99552b4b077dba3c35 (commit) from b18960ed7e176a3fce536b86c2fe0451a0a6906c (commit) commit b1004d01881ff5a18d2bdf99552b4b077dba3c35 Author: Ali Abdallah Date: Fri Apr 15 15:12:40 2011 +0200 Make it compiles, the ugly way... gst/parole-gst.c |5 + plugins/tray/tray-provider.c | 24 src/parole-about.c |4 src/parole-medialist.c |4 src/parole-player.c |3 +++ src/parole-plugins-manager.c |4 src/parole-session.c |4 7 files changed, 44 insertions(+), 4 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index 6676675..ae49623 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -33,6 +33,9 @@ #include +#ifdef XFCE_DISABLE_DEPRECATED +#undef XFCE_DISABLE_DEPRECATED +#endif #include #include @@ -47,6 +50,8 @@ #include "gst-enum-types.h" #include "gstmarshal.h" + + #define HIDE_WINDOW_CURSOR_TIMEOUT 3.0f #define PAROLE_GST_GET_PRIVATE(o) \ diff --git a/plugins/tray/tray-provider.c b/plugins/tray/tray-provider.c index aa0b197..88a3f94 100644 --- a/plugins/tray/tray-provider.c +++ b/plugins/tray/tray-provider.c @@ -31,8 +31,9 @@ #include #endif -#include + #include +#include #include "tray-provider.h" @@ -42,6 +43,9 @@ static void tray_provider_iface_init (ParoleProviderPluginIface *iface); static void tray_provider_finalize (GObject *object); +extern GdkPixbuf *parole_icon_load(const gchar *icon_name, gint size); + + struct _TrayProviderClass { GObjectClass parent_class; @@ -260,13 +264,25 @@ notify_playing (TrayProvider *tray, const ParoleStream *stream) } message = g_strdup_printf ("%s %s %s %s", _("Playing:"), title, _("Duration:"), timestring); - + +#ifdef NOTIFY_CHECK_VERSION +#if NOTIFY_CHECK_VERSION (0, 7, 0) +tray->n = notify_notification_new (title, message, NULL); +#else +tray->n = notify_notification_new (title, message, NULL, NULL); +#endif +#else tray->n = notify_notification_new (title, message, NULL, NULL); +#endif g_free (title); g_free (message); +#ifdef NOTIFY_CHECK_VERSION +#if !NOTIFY_CHECK_VERSION (0, 7, 0) notify_notification_attach_to_status_icon (tray->n, tray->tray); -pix = xfce_themed_icon_load (has_video ? "video" : "audio-x-generic", 48); +#endif +#endif +pix = parole_icon_load (has_video ? "video" : "audio-x-generic", 48); if ( pix ) { notify_notification_set_icon_from_pixbuf (tray->n, pix); @@ -573,7 +589,7 @@ tray_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *pl tray->notify = TRUE; #endif -pix = xfce_themed_icon_load ("parole", 48); +pix = parole_icon_load ("parole", 48); if ( pix ) { diff --git a/src/parole-about.c b/src/parole-about.c index 96abcf0..ca6c0b9 100644 --- a/src/parole-about.c +++ b/src/parole-about.c @@ -26,6 +26,10 @@ #include #include + +#ifdef XFCE_DISABLE_DEPRECATED +#undef XFCE_DISABLE_DEPRECATED +#endif #include #include diff --git a/src/parole-medialist.c b/src/parole-medialist.c index 2426e35..9ff5304 100644 --- a/src/parole-medialist.c +++ b/src/parole-medialist.c @@ -32,6 +32,10 @@ #include #include + +#ifdef XFCE_DISABLE_DEPRECATED +#undef XFCE_DISABLE_DEPRECATED +#endif #include #include diff --git a/src/parole-player.c b/src/parole-player.c index 9478557..6a057d3 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -34,6 +34,9 @@ #include #include +#ifdef XFCE_DISABLE_DEPRECATED +#undef XFCE_DISABLE_DEPRECATED +#endif #include #include diff --git a/src/parole-plugins-manager.c b/src/parole-plugins-manager.c index 9c9a638..1fd16e5 100644 --- a/src/parole-plugins-manager.c +++ b/src/parole-plugins-manager.c @@ -28,6 +28,10 @@ #include + +#ifdef XFCE_DISABLE_DEPRECATED +#undef XFCE_DISABLE_DEPRECATED +#endif #include #include diff --git a/src/parole-session.c b/src/parole-session.c index 3c973ee..5421a35 100644 --- a/src/parole-session.c +++ b/src/parole-session.c @@ -26,6 +26,10 @@ #include #include + +#ifdef XFCE_DISABLE_DEPRECATED +#undef XFCE_DISABLE_DEPRECATED +#endif #include #include ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Remove video/x-totem-stream
Updating branch refs/heads/master to b18960ed7e176a3fce536b86c2fe0451a0a6906c (commit) from f9e367304042f0fd4a61e24023c18b00227541a2 (commit) commit b18960ed7e176a3fce536b86c2fe0451a0a6906c Author: Ali Abdallah Date: Fri Apr 15 15:11:40 2011 +0200 Remove video/x-totem-stream data/mime/mime-type-list.txt |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/data/mime/mime-type-list.txt b/data/mime/mime-type-list.txt index 793c44c..927f153 100644 --- a/data/mime/mime-type-list.txt +++ b/data/mime/mime-type-list.txt @@ -85,7 +85,6 @@ video/x-ms-wmv video/x-nsv video/x-ogm+ogg video/x-theora+ogg -video/x-totem-stream x-content/video-dvd x-content/video-vcd x-content/video-svcd ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add "open containing folder" on the media list.
Updating branch refs/heads/0.2.2 to 5d2e8369735727a365fc7b75a7104015644af183 (commit) from 3dd8bd24696f3b94c06f94f26d73e021be17191e (commit) commit 5d2e8369735727a365fc7b75a7104015644af183 Author: Ali Abdallah Date: Fri Feb 25 16:58:50 2011 +0100 Add "open containing folder" on the media list. data/interfaces/parole.ui | 169 ++--- gst/parole-gst.c |3 +- src/parole-medialist.c| 122 +++-- 3 files changed, 261 insertions(+), 33 deletions(-) diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui index da0e790..7b46bac 100644 --- a/data/interfaces/parole.ui +++ b/data/interfaces/parole.ui @@ -2,6 +2,10 @@ + +gtk-media-play + + @@ -22,30 +26,30 @@ True False gtk-new -1 +2 True False gtk-cdrom -1 +2 True False gtk-edit -1 +2 True False -18 +20 applications-multimedia True False -18 +20 multimedia-volume-control 1 @@ -53,7 +57,7 @@ True False gtk-about -1 +2 True @@ -700,7 +704,6 @@ True False -4 4 @@ -810,7 +813,7 @@ True False -2 +5 True @@ -867,26 +870,20 @@ True False queue -out +none True False 2 - -60 + True -True -True -False -image3 -none -False +False False -False +True 0 @@ -895,17 +892,15 @@ True False - -80 -35 + +60 True True True False -image1 -half +image3 +none False - @@ -916
[Xfce4-commits] Move more gtk callbacks to parole-callbacks
Updating branch refs/heads/0.2.2 to 3dd8bd24696f3b94c06f94f26d73e021be17191e (commit) from e46e04bb57b4a46ee968af6bb6d28106dc4e9c16 (commit) commit 3dd8bd24696f3b94c06f94f26d73e021be17191e Author: Ali Abdallah Date: Fri Feb 25 15:23:05 2011 +0100 Move more gtk callbacks to parole-callbacks src/parole-callbacks.c | 94 +++ src/parole-player.c| 293 src/parole-player.h|8 +- 3 files changed, 147 insertions(+), 248 deletions(-) diff --git a/src/parole-callbacks.c b/src/parole-callbacks.c index b8b147d..498f978 100644 --- a/src/parole-callbacks.c +++ b/src/parole-callbacks.c @@ -29,6 +29,8 @@ #include #include "parole-player.h" +#include "parole-about.h" +#include "parole-utils.h" /* @@ -36,8 +38,79 @@ */ void parole_action_repeat_cb (GtkToggleAction *action, ParolePlayer *player); void parole_action_shuffle_cb (GtkToggleAction *action, ParolePlayer *player); +/* + * Aspect ratio + */ +void ratio_none_toggled_cb (GtkWidget *widget, +ParolePlayer *player); + +void ratio_auto_toggled_cb (GtkWidget *widget, +ParolePlayer *player); + +void ratio_square_toggled_cb (GtkWidget *widget, +ParolePlayer *player); + +void ratio_4_3_toggled_cb(GtkWidget *widget, +ParolePlayer *player); + +void ratio_16_9_toggled_cb (GtkWidget *widget, +ParolePlayer *player); +void ratio_20_9_toggled_cb (GtkWidget *widget, +ParolePlayer *player); +void parole_show_about (GtkWidget *widget, +ParolePlayer *player); + +void parole_player_show_hide_playlist(GtkButton *button, +ParolePlayer *player); + +void parole_show_about (GtkWidget *widget, ParolePlayer *player) +{ +parole_about (GTK_WINDOW (player->window)); +} + +void ratio_none_toggled_cb (GtkWidget *widget, ParolePlayer *player) +{ +g_object_set (G_OBJECT (player->conf), + "aspect-ratio", PAROLE_ASPECT_RATIO_NONE, + NULL); +} + +void ratio_auto_toggled_cb (GtkWidget *widget, ParolePlayer *player) +{ +g_object_set (G_OBJECT (player->conf), + "aspect-ratio", PAROLE_ASPECT_RATIO_AUTO, + NULL); +} + +void ratio_square_toggled_cb (GtkWidget *widget, ParolePlayer *player) +{ + g_object_set (G_OBJECT (player->conf), + "aspect-ratio", PAROLE_ASPECT_RATIO_SQUARE, + NULL); +} + +void ratio_4_3_toggled_cb (GtkWidget *widget, ParolePlayer *player) +{ +g_object_set (G_OBJECT (player->conf), + "aspect-ratio", PAROLE_ASPECT_RATIO_4_3, + NULL); +} + +void ratio_16_9_toggled_cb (GtkWidget *widget, ParolePlayer *player) +{ +g_object_set (G_OBJECT (player->conf), + "aspect-ratio", PAROLE_ASPECT_RATIO_16_9, + NULL); +} + +void ratio_20_9_toggled_cb (GtkWidget *widget, ParolePlayer *player) +{ +g_object_set (G_OBJECT (player->conf), + "aspect-ratio", PAROLE_ASPECT_RATIO_DVB, + NULL); +} void parole_action_repeat_cb (GtkToggleAction *action, ParolePlayer *player) { @@ -60,3 +133,24 @@ void parole_action_shuffle_cb (GtkToggleAction *action, ParolePlayer *player) "shuffle", toggled, NULL); } + + +void parole_player_show_hide_playlist (GtkButton *button, ParolePlayer *player) +{ +gboolean visible; + +visible = GTK_WIDGET_VISIBLE (player->sidebar); + +if ( !visible ) +{ + parole_set_widget_image_from_stock (player->show_hide_playlist, GTK_STOCK_GO_BACK); + gtk_widget_show_all (player->sidebar); + gtk_widget_set_tooltip_text (GTK_WIDGET (player->show_hide_playlist), _("Hide playlist")); +} +else +{ + parole_set_widget_image_from_stock (player->show_hide_playlist, GTK_STOCK_GO_FORWARD); + gtk_widget_hide_all (player->sidebar); + gtk_widget_set_tooltip_text (GTK_WIDGET (player->show_hide_playlist), _("Show playlist")); +} +} diff --git a/src/parole-player.c b/src/parole-player.c index 3ed9427..7a5bf24 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -42,7 +42,6 @@ #include #include "parole-b
[Xfce4-commits] Add tooltip on the play list widget.
Updating branch refs/heads/0.2.2 to 376d3a22cf34316244d2ed137e2a22dcde606a4f (commit) from a60120df530237d274fc43ffce0e72e125f40d87 (commit) commit 376d3a22cf34316244d2ed137e2a22dcde606a4f Author: Ali Abdallah Date: Fri Feb 25 15:21:49 2011 +0100 Add tooltip on the play list widget. data/interfaces/playlist.ui | 87 +++ src/parole-medialist.c | 61 ++ 2 files changed, 116 insertions(+), 32 deletions(-) diff --git a/data/interfaces/playlist.ui b/data/interfaces/playlist.ui index 1b1ad2f..d5788be 100644 --- a/data/interfaces/playlist.ui +++ b/data/interfaces/playlist.ui @@ -1,18 +1,44 @@ - + + +True +False +gtk-add + + +True +False +gtk-remove + + +True +False +gtk-go-up + + +True +False +gtk-go-down + + +True +False +gtk-save-as + True -vertical +False 5 True +False True -vertical +False True @@ -26,22 +52,27 @@ True True +True False True - - - - + + + + + +True +True 0 True +False 2 True @@ -49,11 +80,13 @@ True True True +False image1 - + False +True 0 @@ -63,11 +96,13 @@ False True True +False image5 - + False +True 1 @@ -77,11 +112,13 @@ False True True +False image2 - + False +True 2 @@ -91,11 +128,13 @@ False True True +False image3 - + False +True 3 @@ -105,11 +144,13 @@ False True True +False image4 - + False +True 4 @@ -125,28 +166,10 @@ +True +True 0 - -True -gtk-add - - -True -gtk-save-as - - -True -gtk-remove - - -True -gtk-go-up - - -True -gtk-go-down - diff --git a/src/parole-medialist.c b/src/parole-medialist.c index d311863..f52c023 100644 --- a/src/parole-medialist.c +++ b/src/parole-medialist.c @@ -144,6 +144,14 @@ void parole_media_list_close_save_dialog_cb (GtkButton *button, void parole_media_list_save_playlist_cb (GtkButton *button, ParolePlaylistSave *data); + +gboolean parole_media_list_query_tooltip (GtkWidget *widget, +gint x, +gint y, +gboolean keyboard_mode, +GtkTooltip *tip, +ParoleMediaList *list); + /* * End of GtkBuilder callbacks */ @@ -520,6 +528,59 @@ out: g_free (dirname); } + +gboolean parole_media_list_query_tooltip (GtkWidget *widget
[Xfce4-commits] Rescale logo only on size request.
Updating branch refs/heads/0.2.2 to e46e04bb57b4a46ee968af6bb6d28106dc4e9c16 (commit) from 376d3a22cf34316244d2ed137e2a22dcde606a4f (commit) commit e46e04bb57b4a46ee968af6bb6d28106dc4e9c16 Author: Ali Abdallah Date: Fri Feb 25 15:22:19 2011 +0100 Rescale logo only on size request. gst/parole-gst.c | 24 +--- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index b9cde29..385844a 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -109,6 +109,8 @@ struct ParoleGstPrivate ParoleAspectRatio aspect_ratio; gulong state_change_id; +gboolean scale_logo; + /* * xvimage sink has brightness+hue+aturation+contrast. */ @@ -352,6 +354,8 @@ parole_gst_size_allocate (GtkWidget *widget, GtkAllocation *allocation) gint w, h; gdouble ratio, width, height; + PAROLE_GST (widget)->priv->scale_logo = TRUE; + w = allocation->width; h = allocation->height; @@ -381,7 +385,7 @@ parole_gst_size_allocate (GtkWidget *widget, GtkAllocation *allocation) static void parole_gst_draw_logo (ParoleGst *gst) { -GdkPixbuf *pix; +static GdkPixbuf *pix = NULL; GdkRegion *region; GdkRectangle rect; GtkWidget *widget; @@ -408,11 +412,16 @@ parole_gst_draw_logo (ParoleGst *gst) 0, 0, widget->allocation.width, widget->allocation.height); - -pix = gdk_pixbuf_scale_simple (gst->priv->logo, - widget->allocation.width, - widget->allocation.height, - GDK_INTERP_BILINEAR); + +if (gst->priv->scale_logo) +{ + gdk_pixbuf_unref (pix); + pix = gdk_pixbuf_scale_simple (gst->priv->logo, + widget->allocation.width, + widget->allocation.height, + GDK_INTERP_BILINEAR); + gst->priv->scale_logo = FALSE; +} gdk_draw_pixbuf (GDK_DRAWABLE (widget->window), GTK_WIDGET(widget)->style->fg_gc[0], @@ -423,7 +432,7 @@ parole_gst_draw_logo (ParoleGst *gst) GDK_RGB_DITHER_NONE, 0, 0); -gdk_pixbuf_unref (pix); + gdk_window_end_paint (GTK_WIDGET (gst)->window); } @@ -1846,6 +1855,7 @@ parole_gst_init (ParoleGst *gst) gst->priv->terminating = FALSE; gst->priv->with_vis = FALSE; gst->priv->vis_loaded = FALSE; +gst->priv->scale_logo = TRUE; gst->priv->conf = NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 1.0.10
Updating annotated tag refs/tags/1.0.10 as new annotated tag to 4be2945ef9cfb1492604d4bba1177e31f2042752 (tag) succeeds 1.0.3-38-g77f7261 tagged by Ali Abdallah on 2011-02-20 13:33 + Ali Abdallah (1): Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager Cristian Marchi (1): l10n: Updated Italian (it) translation to 100% Jari Rahkonen (1): l10n: Updated Finnish (fi) translation to 100% Johannes Lips (1): l10n: Updated German (de) translation to 91% Masato Hashimoto (1): l10n: Updated Japanese (ja) translation to 100% Michael Spahn (1): l10n: Updated German (de) translation to 92% Mike Massonnet (1): l10n: Updated French (fr) translation to 100% Per Kongstad (1): l10n: Updated Danish (da) translation to 100% Sergio Marques (2): l10n: Updated Portuguese (pt) translation to 100% l10n: Updated Portuguese (pt) translation to 100% Stavros Giannouris (1): 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] Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager
Updating branch refs/heads/master to 77f7261db67e75597129cefbaf5fe21468e3bd19 (commit) from bea7b9666fbb27b8f1d0cd09cf624c7165311309 (commit) commit 77f7261db67e75597129cefbaf5fe21468e3bd19 Merge: bea7b96 be48405 Author: Ali Abdallah Date: Wed Feb 16 08:04:17 2011 +0100 Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager commit be484056289f4a363c5afb8fd60c568db3153b3d Author: Jeff Bailes Date: Wed Feb 16 01:44:53 2011 +0100 l10n: Updated English (United Kingdom) (en_GB) translation to 100% New status: 208 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/en_GB.po | 425 ++- 1 files changed, 243 insertions(+), 182 deletions(-) diff --git a/po/en_GB.po b/po/en_GB.po index d52727c..05926f5 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-12-23 23:03+\n" +"POT-Creation-Date: 2011-02-15 23:03+\n" "PO-Revision-Date: 2010-12-24 14:21+1100\n" "Last-Translator: Jeff Bailes \n" "Language-Team: \n" @@ -45,237 +45,239 @@ msgid "Consider the computer on low power at:" msgstr "Consider the computer on low power at:" #. Hibernate menu option -#: ../data/interfaces/xfpm-settings.ui.h:8 ../settings/xfpm-settings.c:789 -#: ../settings/xfpm-settings.c:857 ../settings/xfpm-settings.c:995 -#: ../settings/xfpm-settings.c:1160 ../settings/xfpm-settings.c:1215 -#: ../settings/xfpm-settings.c:1265 ../src/xfpm-power.c:443 -#: ../src/xfpm-power.c:704 +#: ../data/interfaces/xfpm-settings.ui.h:8 ../settings/xfpm-settings.c:817 +#: ../settings/xfpm-settings.c:885 ../settings/xfpm-settings.c:1032 +#: ../settings/xfpm-settings.c:1206 ../settings/xfpm-settings.c:1263 +#: ../settings/xfpm-settings.c:1315 ../src/xfpm-power.c:484 +#: ../src/xfpm-power.c:779 msgid "Hibernate" msgstr "Hibernate" #: ../data/interfaces/xfpm-settings.ui.h:9 +msgid "Level:" +msgstr "Level:" + +#: ../data/interfaces/xfpm-settings.ui.h:10 msgid "Lock screen when going for suspend/hibernate" msgstr "Lock screen when going for suspend/hibernate" -#: ../data/interfaces/xfpm-settings.ui.h:10 ../src/xfpm-power-common.c:132 +#: ../data/interfaces/xfpm-settings.ui.h:11 ../src/xfpm-power-common.c:132 msgid "Monitor" msgstr "Monitor" -#: ../data/interfaces/xfpm-settings.ui.h:11 +#: ../data/interfaces/xfpm-settings.ui.h:12 msgid "Monitor power management control" msgstr "Monitor power management control" -#: ../data/interfaces/xfpm-settings.ui.h:12 ../settings/xfpm-settings.c:778 -#: ../settings/xfpm-settings.c:846 ../settings/xfpm-settings.c:984 -#: ../settings/xfpm-settings.c:1149 ../settings/xfpm-settings.c:1204 -#: ../settings/xfpm-settings.c:1254 +#: ../data/interfaces/xfpm-settings.ui.h:13 ../settings/xfpm-settings.c:806 +#: ../settings/xfpm-settings.c:874 ../settings/xfpm-settings.c:1021 +#: ../settings/xfpm-settings.c:1195 ../settings/xfpm-settings.c:1252 +#: ../settings/xfpm-settings.c:1304 msgid "Nothing" msgstr "Nothing" -#: ../data/interfaces/xfpm-settings.ui.h:13 +#: ../data/interfaces/xfpm-settings.ui.h:14 msgid "Power manager settings" msgstr "Power manager settings" -#: ../data/interfaces/xfpm-settings.ui.h:14 +#: ../data/interfaces/xfpm-settings.ui.h:15 msgid "Prefer power savings over performance" msgstr "Prefer power savings over performance" -#: ../data/interfaces/xfpm-settings.ui.h:15 +#: ../data/interfaces/xfpm-settings.ui.h:16 msgid "Put display to sleep when computer is inactive for:" msgstr "Put display to sleep when computer is inactive for:" -#: ../data/interfaces/xfpm-settings.ui.h:16 +#: ../data/interfaces/xfpm-settings.ui.h:17 msgid "Put the computer to sleep when inactive for:" msgstr "Put the computer to sleep when inactive for:" -#: ../data/interfaces/xfpm-settings.ui.h:17 +#: ../data/interfaces/xfpm-settings.ui.h:18 msgid "Reduce screen brightness when computer is inactive for:" msgstr "Reduce screen brightness when computer is inactive for:" -#: ../data/interfaces/xfpm-settings.ui.h:18 +#: ../data/interfaces/xfpm-settings.ui.h:19 msgid "Set computer inactivity sleep mode:" msgstr "Set computer inactivity sleep mode:" -#: ../data/interfaces/xfpm-settings.ui.h:19 +#: ../data/interfaces/xfpm-settings.ui.h:20 msgid "Set monitor sleep mode:" msgstr "Set monitor sleep mode:" -#: ../data/interfaces/xfpm-settings.ui.h:20 +#: ../data/interfaces/xfpm-settings.ui.h:21 msgid "Show notifications to notify about th
[Xfce4-commits] Again; fix compatibility with libnotify 0.7.0
Updating branch refs/heads/master to bea7b9666fbb27b8f1d0cd09cf624c7165311309 (commit) from 744638e7b79b683db1a1f9f797bf84ecc138af82 (commit) commit bea7b9666fbb27b8f1d0cd09cf624c7165311309 Author: Ali Abdallah Date: Wed Feb 16 07:53:27 2011 +0100 Again; fix compatibility with libnotify 0.7.0 src/xfpm-notify.c | 17 + 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/xfpm-notify.c b/src/xfpm-notify.c index b9e96d4..c93a843 100644 --- a/src/xfpm-notify.c +++ b/src/xfpm-notify.c @@ -215,19 +215,28 @@ xfpm_notify_new_notification_internal (const gchar *title, const gchar *message, { NotifyNotification *n; -n = notify_notification_new (title, message, NULL +#ifdef NOTIFY_CHECK_VERSION #if NOTIFY_CHECK_VERSION (0, 7, 0) -); +n = notify_notification_new (title, message, NULL); #else -, NULL); +n = notify_notification_new (title, message, NULL, NULL); #endif +#else +n = notify_notification_new (title, message, NULL, NULL); +#endif + if ( icon_name ) xfpm_notify_set_notification_icon (n, icon_name); -#if NOTIFY_CHECK_VERSION (0, 7, 0) +#ifdef NOTIFY_CHECK_VERSION +#if !NOTIFY_CHECK_VERSION (0, 7, 0) if ( icon ) notify_notification_attach_to_status_icon (n, icon); +#else +if ( icon ) + notify_notification_attach_to_status_icon (n, icon); +#endif #endif notify_notification_set_urgency (n, (NotifyUrgency)urgency); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix tag available property
Updating branch refs/heads/master to c2c5909d1ced3ae91e30d5a381c74c957bdf5e08 (commit) from 5a64c4e974810411a5e36fa873b7806cd0252653 (commit) commit c2c5909d1ced3ae91e30d5a381c74c957bdf5e08 Author: Ali Abdallah Date: Tue Feb 15 21:36:54 2011 +0100 Fix tag available property parole/parole-stream.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/parole/parole-stream.c b/parole/parole-stream.c index 4e9cd21..a333499 100644 --- a/parole/parole-stream.c +++ b/parole/parole-stream.c @@ -452,7 +452,7 @@ parole_stream_class_init (ParoleStreamClass *klass) * Since: 0.2 **/ g_object_class_install_property (object_class, -PROP_SEEKABLE, +PROP_TAG_AVAILABLE, g_param_spec_boolean ("tag-available", "Tag available", "Tag available", ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix stream seekable detection.
Updating branch refs/heads/0.2.2 to e272615eec7b5d323ca376b845733e2387e9fd45 (commit) from 287aff947b7f3e981dbd2ca58710a2b0a0547ecb (commit) commit e272615eec7b5d323ca376b845733e2387e9fd45 Author: Ali Abdallah Date: Tue Feb 15 21:34:31 2011 +0100 Fix stream seekable detection. configure.ac.in | 21 --- data/interfaces/parole.ui | 140 gst/parole-gst.c | 77 + parole/parole-stream.c|2 +- src/parole-player.c | 23 +++ 5 files changed, 127 insertions(+), 136 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 10eb67b..32ff815 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -198,20 +198,6 @@ AM_CONDITIONAL([POWER_MANAGER_PLUGIN], [test x"$ac_power_manager_plugin" = x"yes AC_MSG_RESULT([$ac_power_manager_plugin]) #===# -# Build browser plugin?# -#===# -AC_ARG_ENABLE([browser-plugin], AC_HELP_STRING([--disable-browser-plugin], [Don't build the browser plugin]), - [ac_browser_plugin=$enableval], [ac_browser_plugin=yes]) -AC_MSG_CHECKING([whether to build the browser plugin]) -AM_CONDITIONAL([ENABLE_BROWSER_PLUGIN], [test x"$ac_browser_plugin" = x"yes"]) -AC_MSG_RESULT([$ac_browser_plugin]) -if test x"$ac_browser_plugin" = x"yes"; then -BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" -AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the browser plugin]) -AC_DEFINE(BUILD_BROWSER_PLUGIN, 1, [whether to build with browser plugin support]) -fi - -#===# # Check for debugging support # #===# XDT_FEATURE_DEBUG() @@ -286,13 +272,6 @@ echo " Window title: ${ac_window_title_plugin} Power Manager: ${ac_power_manager_plugin} - Browser plugin: - === - Build browser plugin: ${ac_browser_plugin}" - if test x${ac_browser_plugin} = x"yes"; then -echo " installation path: ${BROWSER_PLUGIN_DIR}" - fi -echo " -- Configuration finished, type make to compile" diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui index fa2d6af..3410097 100644 --- a/data/interfaces/parole.ui +++ b/data/interfaces/parole.ui @@ -2,14 +2,6 @@ - - - - - - - - Parole Media Player center @@ -32,68 +24,61 @@ 2 5 - + True -queue -none +vertical +4 - + True -vertical -4 +sidebar-combo-liststore +0 - -True -sidebar-combo-liststore -0 - - - -0 - - - - - -1 - - - - -False -False -0 - + + +0 + - -True -False -False - - - - - - - - - - - - - - - - - - - - -
[Xfce4-commits] Re-enable plugins.
Updating branch refs/heads/0.2.2 to 287aff947b7f3e981dbd2ca58710a2b0a0547ecb (commit) from caa5391efbf74824dbfbe312d83576ad7e7deb27 (commit) commit 287aff947b7f3e981dbd2ca58710a2b0a0547ecb Author: Ali Abdallah Date: Tue Feb 15 21:34:10 2011 +0100 Re-enable plugins. src/main.c |8 ++-- src/parole-plugins-manager.c | 79 ++--- 2 files changed, 69 insertions(+), 18 deletions(-) diff --git a/src/main.c b/src/main.c index 5669091..40d9f90 100644 --- a/src/main.c +++ b/src/main.c @@ -196,7 +196,7 @@ xv_option_given (const gchar *name, const gchar *value, gpointer data, GError ** int main (int argc, char **argv) { ParolePlayer *player; -//ParolePluginsManager *plugins; +ParolePluginsManager *plugins; GtkBuilder *builder; GOptionContext *ctx; @@ -354,15 +354,15 @@ int main (int argc, char **argv) g_error_free (error); } - //plugins = parole_plugins_manager_new (!no_plugins); - //parole_plugins_manager_load (plugins); + plugins = parole_plugins_manager_new (!no_plugins); + parole_plugins_manager_load (plugins); g_object_unref (builder); gdk_notify_startup_complete (); gtk_main (); parole_dbus_release_name (PAROLE_DBUS_NAME); - //g_object_unref (plugins); + g_object_unref (plugins); } gst_deinit (); diff --git a/src/parole-plugins-manager.c b/src/parole-plugins-manager.c index c82fb5c..be545ee 100644 --- a/src/parole-plugins-manager.c +++ b/src/parole-plugins-manager.c @@ -96,8 +96,9 @@ static void parole_plugins_manager_set_property (GObject *object, struct ParolePluginsManagerPrivate { -GtkWidget *list_nt; -GtkWidget *main_nt; +GtkListStore *store; +GtkWidget*list_nt; +GtkWidget*main_nt; GPtrArray *array; @@ -108,6 +109,15 @@ static gpointer parole_plugins_manager_object = NULL; G_DEFINE_TYPE (ParolePluginsManager, parole_plugins_manager, G_TYPE_OBJECT) + +enum +{ +COMBO_BOX_COL_PIXBUF, +COMBO_BOX_COL_TITLE, +COMBO_BOX_COL_TAB_ID, +COMBO_BOX_N_COLS, +}; + enum { COL_ACTIVE, @@ -484,15 +494,45 @@ parole_plugins_manager_set_show_tabs (GtkNotebook *nt) } static void -parole_plugins_manager_page_added_cb (GtkContainer *container, GtkWidget *widget, gpointer data) +parole_plugins_manager_main_page_added_cb (GtkNotebook *main_nt, GtkWidget *widget, guint page_num, gpointer data) +{ +parole_plugins_manager_set_show_tabs (GTK_NOTEBOOK (main_nt)); +} + +static void +parole_plugins_manager_main_page_removed_cb (GtkNotebook *main_nt, GtkWidget *widget, guint page_num, gpointer data) +{ +parole_plugins_manager_set_show_tabs (GTK_NOTEBOOK (main_nt)); +} + + +static void +parole_plugins_manager_side_page_added_cb (GtkNotebook *side_nt, GtkWidget *widget, guint page_num, ParolePluginsManager *mg) { -parole_plugins_manager_set_show_tabs (GTK_NOTEBOOK (container)); + } static void -parole_plugins_manager_page_removed_cb (GtkContainer *container, GtkWidget *widget, gpointer data) +parole_plugins_manager_side_page_removed_cb (GtkNotebook *side_nt, GtkWidget *widget, guint page_num, ParolePluginsManager *mg) { -parole_plugins_manager_set_show_tabs (GTK_NOTEBOOK (container)); +GtkTreeIter iter; +gboolean valid; +gint id; + +for ( valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (mg->priv->store), &iter); + valid; + valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (mg->priv->store), &iter)) +{ +gtk_tree_model_get (GTK_TREE_MODEL (mg->priv->store), &iter, +COMBO_BOX_COL_TAB_ID, &id, +-1); + + if (id == (gint)page_num) + { + gtk_list_store_remove (mg->priv->store, &iter); + } +} + } static void parole_plugins_manager_set_property (GObject *object, @@ -631,26 +671,26 @@ parole_plugins_manager_init (ParolePluginsManager *manager) builder = parole_builder_get_main_interface (); manager->priv->load_plugins = TRUE; - -manager->priv->list_nt = GTK_WIDGET (gtk_builder_get_object (builder, "notebook-playlist")); + +manager->priv->store = GTK_LIST_STORE (gtk_builder_get_object (builder, "sidebar-combo-liststore")); +manager->priv->list_nt = GTK_WIDGET (gtk_builder_get_object (builder, "sidebar-notebook")); manager->priv->main_nt = GTK_WIDGET (gtk_builder_get_object (builder, "main-notebook")); g_signal_connect (manager->priv->list_nt, "page-added", - G_CALLBACK (parole_plugins_manager_page_added_cb), NULL); + G_CALLBACK (parole_plugins_manager_side_page_added_cb), manager); g_signal
[Xfce4-commits] Query duration on GST_MESSAGE_DURATION only if we are playing.
Updating branch refs/heads/0.2.2 to caa5391efbf74824dbfbe312d83576ad7e7deb27 (commit) from 95b5805d911b7d0fa2a7b13aa131efbd32eec909 (commit) commit caa5391efbf74824dbfbe312d83576ad7e7deb27 Author: Ali Abdallah Date: Sat Dec 18 10:54:16 2010 +0100 Query duration on GST_MESSAGE_DURATION only if we are playing. gst/parole-gst.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index 8b11b52..ac21035 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -1202,8 +1202,11 @@ parole_gst_bus_event (GstBus *bus, GstMessage *msg, gpointer data) parole_gst_application_message (gst, msg); break; case GST_MESSAGE_DURATION: - TRACE ("Duration message"); - parole_gst_query_duration (gst); + if (gst->priv->state == GST_STATE_PLAYING) + { + TRACE ("Duration message"); + parole_gst_query_duration (gst); + } break; case GST_MESSAGE_ELEMENT: break; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Use NOTIFY_CHECK_VERSION.
Updating branch refs/heads/master to 5a4acb6f69a17be1219fc89a9c4a3e4b141d3b51 (commit) from d66cf04142c818689d83cdd0a315e3d3be657d9c (commit) commit 5a4acb6f69a17be1219fc89a9c4a3e4b141d3b51 Author: Ali Abdallah Date: Tue Feb 15 21:30:57 2011 +0100 Use NOTIFY_CHECK_VERSION. src/xfpm-notify.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xfpm-notify.c b/src/xfpm-notify.c index 088f432..b9e96d4 100644 --- a/src/xfpm-notify.c +++ b/src/xfpm-notify.c @@ -216,7 +216,7 @@ xfpm_notify_new_notification_internal (const gchar *title, const gchar *message, NotifyNotification *n; n = notify_notification_new (title, message, NULL -#ifdef HAVE_LIBNOTIFY_07 +#if NOTIFY_CHECK_VERSION (0, 7, 0) ); #else , NULL); @@ -225,7 +225,7 @@ xfpm_notify_new_notification_internal (const gchar *title, const gchar *message, if ( icon_name ) xfpm_notify_set_notification_icon (n, icon_name); -#ifndef HAVE_LIBNOTIFY_07 +#if NOTIFY_CHECK_VERSION (0, 7, 0) if ( icon ) notify_notification_attach_to_status_icon (n, icon); #endif ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix string.
Updating branch refs/heads/master to d66cf04142c818689d83cdd0a315e3d3be657d9c (commit) from 18c242a655e8de14511ccc8b0f76ee3a4f4f9f7d (commit) commit d66cf04142c818689d83cdd0a315e3d3be657d9c Author: Ali Abdallah Date: Tue Feb 15 21:30:18 2011 +0100 Fix string. src/xfpm-power.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/xfpm-power.c b/src/xfpm-power.c index 23f7f25..bbe1a77 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -952,7 +952,7 @@ xfpm_power_battery_charge_changed_cb (XfpmBattery *battery, XfpmPower *power) time_str = xfpm_battery_get_time_left (battery); - msg = g_strdup_printf (_("Your %s y charge level is low\nEstimated time left %s"), battery_name, time_str); + msg = g_strdup_printf (_("Your %s charge level is low\nEstimated time left %s"), battery_name, time_str); xfpm_notify_show_notification (power->priv->notify, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager
Updating branch refs/heads/master to 18c242a655e8de14511ccc8b0f76ee3a4f4f9f7d (commit) from 05b6149b1b1070c9808bfbbc787c362efd1652e7 (commit) commit 18c242a655e8de14511ccc8b0f76ee3a4f4f9f7d Merge: 05b6149 1e52443 Author: Ali Abdallah Date: Tue Feb 15 15:06:24 2011 +0100 Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager commit 1e524439c8accff1cb425a5bd4041914bc5ea7ee Author: Hunt Xu Date: Tue Feb 15 14:21:53 2011 +0100 l10n: Updated Chinese (China) (zh_CN) translation to 99% New status: 203 messages complete with 1 fuzzy and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 5935c467be811c7fd51ef83f7ffd112a3f8621cd Author: Sergio Marques Date: Tue Feb 15 10:59:56 2011 +0100 l10n: Updated Portuguese (pt) translation to 100% New status: 196 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/pt.po| 108 ++--- po/zh_CN.po | 297 +++ 2 files changed, 207 insertions(+), 198 deletions(-) diff --git a/po/pt.po b/po/pt.po index 80a0fe6..ca56511 100644 --- a/po/pt.po +++ b/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xfce4-power-manager\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-12-04 11:02+\n" +"POT-Creation-Date: 2011-02-15 05:03+\n" "PO-Revision-Date: 2009-08-31 16:32+0100\n" "Last-Translator: Nuno Miguel \n" "Language-Team: \n" @@ -150,9 +150,7 @@ msgid "When sleep button is pressed:" msgstr "Quando o botão suspender for pressionado:" #: ../data/interfaces/xfpm-settings.ui.h:31 -#: ../settings/xfpm-settings-main.c:121 ../src/xfpm-power.c:520 -#: ../src/xfpm-power.c:691 ../src/xfpm-main.c:415 -#: ../src/xfce4-power-manager.desktop.in.h:2 +#: ../settings/xfpm-settings-main.c:121 ../src/xfpm-main.c:410 msgid "Xfce Power Manager" msgstr "Gestão de energia Xfce" @@ -287,7 +285,7 @@ msgstr "\"Socket\" do gestor de definições" msgid "SOCKET ID" msgstr "ID de \"SOCKET\"" -#: ../settings/xfpm-settings-main.c:89 ../src/xfpm-main.c:291 +#: ../settings/xfpm-settings-main.c:89 ../src/xfpm-main.c:286 #: ../src/xfpm-power-info.c:948 #, c-format msgid "Type '%s --help' for usage." @@ -301,7 +299,7 @@ msgstr "Falha ao carregar a configuração de gestão de energia, usando as omis msgid "Unable to connect to Xfce Power Manager" msgstr "Incapaz de iniciar a gestão de energia Xfce" -#: ../settings/xfpm-settings-main.c:190 ../src/xfpm-main.c:331 +#: ../settings/xfpm-settings-main.c:190 ../src/xfpm-main.c:326 #, c-format msgid "Xfce power manager is not running" msgstr "A gestão de energia Xfce não está em execução" @@ -315,26 +313,20 @@ msgid "Xfce4 Power Manager is not running, do you want to launch it now?" msgstr "A gestão de energia Xfce4 não está em execução. Pretende iniciar?" #: ../settings/xfce4-power-manager-settings.desktop.in.h:1 +#: ../src/xfpm-power.c:300 ../src/xfpm-power.c:520 ../src/xfpm-power.c:655 +#: ../src/xfpm-power.c:691 ../src/xfpm-power.c:843 ../src/xfpm-power.c:857 +#: ../src/xfpm-battery.c:229 ../src/xfce4-power-manager.desktop.in.h:1 msgid "Power Manager" msgstr "Gestão de energia" #: ../settings/xfce4-power-manager-settings.desktop.in.h:2 -msgid "Settings for the Xfce 4 Power Manager" -msgstr "Definições para a gestão de energia Xfce 4" - -#: ../settings/xfce4-power-manager-settings.desktop.in.h:3 -msgid "Xfce 4 Power Manager" -msgstr "Gestão de energia Xfce 4" +msgid "Settings for the Xfce Power Manager" +msgstr "Definições para a gestão de energia Xfce" #: ../common/xfpm-common.c:155 msgid "translator-credits" msgstr "Nuno Miguel " -#: ../src/xfpm-power.c:300 ../src/xfpm-power.c:655 ../src/xfpm-power.c:843 -#: ../src/xfpm-power.c:857 ../src/xfpm-battery.c:229 -msgid "Xfce power manager" -msgstr "Gestão de energia Xfce" - #: ../src/xfpm-power.c:323 msgid "An application is currently disabling the automatic sleep, doing this action now may damage the working state of this application, are you sure you want to hibernate the system?" msgstr "Actualmente, existe uma aplicação a desactivar a suspensão automática. Se efectuar esta acção agora, pode danificar o estado do trabalho desta aplicação. Tem a certeza que quer hibernar o sistema?" @@ -348,8 +340,8 @@ msgid "All running instances of the power manager will exit" msgstr "Todas as instâncias do gestor de energia irão terminar" #: ../src/xfpm-power.c:424 -msgid "Quit Xfc
[Xfce4-commits] Add configuration for tuning brightness level on AC and on battery power
Updating branch refs/heads/master to 05b6149b1b1070c9808bfbbc787c362efd1652e7 (commit) from 3e26c5d1eee93c073ece30655a133af50d8d1338 (commit) commit 05b6149b1b1070c9808bfbbc787c362efd1652e7 Author: Ali Abdallah Date: Tue Feb 15 14:06:23 2011 +0100 Add configuration for tuning brightness level on AC and on battery power data/interfaces/xfpm-settings.ui | 81 ++ settings/xfpm-settings.c | 54 +- src/xfpm-backlight.c | 13 +- src/xfpm-config.h|4 ++ src/xfpm-xfconf.c| 27 + 5 files changed, 176 insertions(+), 3 deletions(-) diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui index 2614fb5..98f8710 100644 --- a/data/interfaces/xfpm-settings.ui +++ b/data/interfaces/xfpm-settings.ui @@ -662,6 +662,41 @@ 1 + + +True +10 + + +True +Level: + + +False +0 + + + + +True +True +● +adjustment10 +if-valid + + + + +False +False +1 + + + + +2 + + @@ -1055,6 +1090,40 @@ 1 + + +True +10 + + +True +0.4600834465027 +Level: + + +False +0 + + + + +True +True +● +adjustment11 + + + + +False +1 + + + + +2 + + @@ -1360,4 +1429,16 @@ close-button + +80 +1 +100 +1 + + +20 +1 +100 +1 + diff --git a/settings/xfpm
[Xfce4-commits] Support for normal and presentation power mode.
Updating branch refs/heads/master to 3e26c5d1eee93c073ece30655a133af50d8d1338 (commit) from 03951f243b64868adc6082950ba121bd5c130672 (commit) commit 3e26c5d1eee93c073ece30655a133af50d8d1338 Author: Ali Abdallah Date: Tue Feb 15 11:45:32 2011 +0100 Support for normal and presentation power mode. src/xfpm-backlight.c | 19 ++- src/xfpm-battery.c | 23 +- src/xfpm-dpms.c | 25 +++--- src/xfpm-dpms.h |2 + src/xfpm-enum-glib.h |7 src/xfpm-manager.c |3 ++ src/xfpm-power.c | 86 -- src/xfpm-power.h |3 ++ 8 files changed, 143 insertions(+), 25 deletions(-) diff --git a/src/xfpm-backlight.c b/src/xfpm-backlight.c index 0a85e7c..f6043bc 100644 --- a/src/xfpm-backlight.c +++ b/src/xfpm-backlight.c @@ -86,16 +86,19 @@ xfpm_backlight_dim_brightness (XfpmBacklight *backlight) { gboolean ret; -ret = xfpm_brightness_get_level (backlight->priv->brightness, &backlight->priv->last_level); - -if ( !ret ) +if (xfpm_power_get_mode (backlight->priv->power) == XFPM_POWER_MODE_NORMAL ) { - g_warning ("Unable to get current brightness level"); - return; + ret = xfpm_brightness_get_level (backlight->priv->brightness, &backlight->priv->last_level); + + if ( !ret ) + { + g_warning ("Unable to get current brightness level"); + return; + } + XFPM_DEBUG ("Current brightness level before dimming : %u", backlight->priv->last_level); + + backlight->priv->dimmed = xfpm_brightness_dim_down (backlight->priv->brightness); } -XFPM_DEBUG ("Current brightness level before dimming : %u", backlight->priv->last_level); - -backlight->priv->dimmed = xfpm_brightness_dim_down (backlight->priv->brightness); } static gboolean diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index 5e49938..18da99c 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -94,20 +94,27 @@ G_DEFINE_TYPE (XfpmBattery, xfpm_battery, GTK_TYPE_STATUS_ICON) static const gchar * G_GNUC_CONST xfpm_battery_get_icon_index (XfpmDeviceType type, guint percent) { - -g_debug ("Battery percent %d\n", percent); - -if (percent < 10) { +if (percent < 10) +{ return "000"; -} else if (percent < 30) { +} +else if (percent < 30) +{ return ( (type == XFPM_DEVICE_TYPE_BATTERY || type == XFPM_DEVICE_TYPE_UPS) ? "020" : "030"); -} else if (percent < 50) { +} +else if (percent < 50) +{ return ( (type == XFPM_DEVICE_TYPE_BATTERY || type == XFPM_DEVICE_TYPE_UPS ) ? "040" : "030"); -} else if (percent < 70) { +} +else if (percent < 70) +{ return "060"; -} else if (percent < 90) { +} +else if (percent < 90) +{ return ((type == XFPM_DEVICE_TYPE_BATTERY || type == XFPM_DEVICE_TYPE_UPS) ? "080" : "060"); } + return "100"; } diff --git a/src/xfpm-dpms.c b/src/xfpm-dpms.c index 56c6e27..53f3721 100644 --- a/src/xfpm-dpms.c +++ b/src/xfpm-dpms.c @@ -49,7 +49,7 @@ static void xfpm_dpms_finalize (GObject *object); struct XfpmDpmsPrivate { XfpmXfconf *conf; -XfpmPower *power; +XfpmPower *power; gboolean dpms_capable; gboolean inhibited; @@ -149,15 +149,18 @@ xfpm_dpms_get_configuration_timeouts (XfpmDpms *dpms, guint16 *ret_sleep, guint1 *ret_off = off_time * 60; } -static void +void xfpm_dpms_refresh (XfpmDpms *dpms) { gboolean enabled; guint16 off_timeout; guint16 sleep_timeout; gboolean sleep_mode; +gboolean presentation_mode; + +presentation_mode = (xfpm_power_get_mode (dpms->priv->power) == XFPM_POWER_MODE_PRESENTATION); -if ( dpms->priv->inhibited ) +if ( dpms->priv->inhibited || presentation_mode) { xfpm_dpms_disable (dpms); return; @@ -269,9 +272,19 @@ xfpm_dpms_finalize(GObject *object) XfpmDpms * xfpm_dpms_new (void) { -XfpmDpms *dpms = NULL; -dpms = g_object_new (XFPM_TYPE_DPMS, NULL); -return dpms; +static gpointer xfpm_dpms_object = NULL; + +if ( G_LIKELY (xfpm_dpms_object != NULL ) ) +{ + g_object_ref (xfpm_dpms_object); +} +else +{ + xfpm_dpms_object = g_object_new (XFPM_TYPE_DPMS, NULL); + g_object_add_weak_pointer (xfpm_dpms_object, &xfpm_dpms_object); +} + +return XFPM_DPMS (xfpm_dpms_object); } gboolean xfpm_dpms_capable (XfpmDpms *dpms) diff --git a/src/xfpm-dpms.h b/src/xfpm-dpms.h index e4baece..125cbba 100644 --- a/src/xfpm-dpms.h +++ b/src
[Xfce4-commits] Better low level charge notification.
Updating branch refs/heads/master to 03951f243b64868adc6082950ba121bd5c130672 (commit) from 13f01e6f2477f0308416e694c31880db977568db (commit) commit 03951f243b64868adc6082950ba121bd5c130672 Author: Ali Abdallah Date: Tue Feb 15 10:56:54 2011 +0100 Better low level charge notification. src/xfpm-battery.c | 14 ++ src/xfpm-battery.h |4 src/xfpm-power.c | 17 +++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index c701f14..5e49938 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -881,3 +881,17 @@ XfpmBatteryCharge xfpm_battery_get_charge (XfpmBattery *battery) return battery->priv->charge; } + +const gchar *xfpm_battery_get_battery_name (XfpmBattery *battery) +{ +g_return_val_if_fail (XFPM_IS_BATTERY (battery), NULL); + +return battery->priv->battery_name; +} + +gchar *xfpm_battery_get_time_left (XfpmBattery *battery) +{ +g_return_val_if_fail (XFPM_IS_BATTERY (battery), NULL); + +return xfpm_battery_get_time_string (battery->priv->time_to_empty); +} diff --git a/src/xfpm-battery.h b/src/xfpm-battery.h index 58cb784..4d4ca34 100644 --- a/src/xfpm-battery.h +++ b/src/xfpm-battery.h @@ -64,6 +64,10 @@ XfpmDeviceType xfpm_battery_get_device_type (XfpmBattery *battery); XfpmBatteryCharge xfpm_battery_get_charge (XfpmBattery *battery); +const gchar *xfpm_battery_get_battery_name(XfpmBattery *battery); + +gchar *xfpm_battery_get_time_left (XfpmBattery *battery); + G_END_DECLS #endif /* __XFPM_BATTERY_H */ diff --git a/src/xfpm-power.c b/src/xfpm-power.c index 6f1b563..667beb8 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -871,16 +871,29 @@ xfpm_power_battery_charge_changed_cb (XfpmBattery *battery, XfpmPower *power) } else if ( battery_charge == XFPM_BATTERY_CHARGE_LOW ) { - if ( notify ) + { + gchar *msg; + gchar *time_str; + + const gchar *battery_name = xfpm_battery_get_battery_name (battery); + + time_str = xfpm_battery_get_time_left (battery); + + msg = g_strdup_printf (_("Your %s y charge level is low\nEstimated time left %s"), battery_name, time_str); + + xfpm_notify_show_notification (power->priv->notify, _("Power Manager"), - _("Battery charge level is low"), + msg, gtk_status_icon_get_icon_name (GTK_STATUS_ICON (battery)), 1, FALSE, XFPM_NOTIFY_NORMAL, GTK_STATUS_ICON (battery)); + g_free (msg); + g_free (time_str); + } } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix compatibility with libnotify 0.7
Updating branch refs/heads/master to 13f01e6f2477f0308416e694c31880db977568db (commit) from 490a087d4dcad922abd3ef5055de0fcf352a135e (commit) commit 13f01e6f2477f0308416e694c31880db977568db Author: Ali Abdallah Date: Tue Feb 15 10:32:10 2011 +0100 Fix compatibility with libnotify 0.7 src/xfpm-notify.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/xfpm-notify.c b/src/xfpm-notify.c index 4928649..088f432 100644 --- a/src/xfpm-notify.c +++ b/src/xfpm-notify.c @@ -215,13 +215,20 @@ xfpm_notify_new_notification_internal (const gchar *title, const gchar *message, { NotifyNotification *n; -n = notify_notification_new (title, message, NULL, NULL); +n = notify_notification_new (title, message, NULL +#ifdef HAVE_LIBNOTIFY_07 +); +#else +, NULL); +#endif if ( icon_name ) xfpm_notify_set_notification_icon (n, icon_name); - + +#ifndef HAVE_LIBNOTIFY_07 if ( icon ) notify_notification_attach_to_status_icon (n, icon); +#endif notify_notification_set_urgency (n, (NotifyUrgency)urgency); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager
Updating branch refs/heads/master to 490a087d4dcad922abd3ef5055de0fcf352a135e (commit) from 42af0e50ca1c9ec25976beadde2ace326d0cd106 (commit) commit 490a087d4dcad922abd3ef5055de0fcf352a135e Merge: 42af0e5 e4ca717 Author: Ali Abdallah Date: Tue Feb 15 10:03:03 2011 +0100 Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager commit e4ca7175d2e4cbd220bef232e38efa82156a90cb Author: Cristian Marchi Date: Mon Feb 14 20:38:51 2011 +0100 l10n: Updated Italian (it) translation to 100% New status: 196 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit b358d4966b6108d71d8c79677e74e691287924b1 Author: Masato Hashimoto Date: Mon Feb 14 16:14:29 2011 +0100 l10n: Updated Japanese (ja) translation to 100% New status: 196 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/it.po | 34 po/ja.po | 299 +++--- 2 files changed, 185 insertions(+), 148 deletions(-) diff --git a/po/it.po b/po/it.po index 45c4ded..3838eee 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: xfce4-power-manager\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-01-15 11:03+\n" +"POT-Creation-Date: 2011-02-14 17:03+\n" "PO-Revision-Date: 2010-12-23 21:06+0100\n" "Last-Translator: Cristian Marchi \n" "Language-Team: Italian Translation Team \n" @@ -160,9 +160,7 @@ msgid "When sleep button is pressed:" msgstr "Alla pressione del pulsante addormenta:" #: ../data/interfaces/xfpm-settings.ui.h:31 -#: ../settings/xfpm-settings-main.c:121 ../src/xfpm-power.c:520 -#: ../src/xfpm-power.c:691 ../src/xfpm-main.c:410 -#: ../src/xfce4-power-manager.desktop.in.h:2 +#: ../settings/xfpm-settings-main.c:121 ../src/xfpm-main.c:410 msgid "Xfce Power Manager" msgstr "Gestore di energia di Xfce" @@ -325,16 +323,15 @@ msgid "Xfce4 Power Manager is not running, do you want to launch it now?" msgstr "Il gestore di energia di Xfce4 non è in esecuzione; avviarlo ora?" #: ../settings/xfce4-power-manager-settings.desktop.in.h:1 +#: ../src/xfpm-power.c:300 ../src/xfpm-power.c:520 ../src/xfpm-power.c:655 +#: ../src/xfpm-power.c:691 ../src/xfpm-power.c:843 ../src/xfpm-power.c:857 +#: ../src/xfpm-battery.c:229 ../src/xfce4-power-manager.desktop.in.h:1 msgid "Power Manager" msgstr "Gestore di energia" #: ../settings/xfce4-power-manager-settings.desktop.in.h:2 -msgid "Settings for the Xfce 4 Power Manager" -msgstr "Impostazioni per il gestore di energia di Xfce4" - -#: ../settings/xfce4-power-manager-settings.desktop.in.h:3 -msgid "Xfce 4 Power Manager" -msgstr "Gestore di energia di Xfce4" +msgid "Settings for the Xfce Power Manager" +msgstr "Impostazioni per il gestore di energia di Xfce" #: ../common/xfpm-common.c:155 msgid "translator-credits" @@ -343,11 +340,6 @@ msgstr "" "Gianluca Foddis \n" "Cristian Marchi , 2009" -#: ../src/xfpm-power.c:300 ../src/xfpm-power.c:655 ../src/xfpm-power.c:843 -#: ../src/xfpm-power.c:857 ../src/xfpm-battery.c:229 -msgid "Xfce power manager" -msgstr "Gestore di energia di Xfce" - #: ../src/xfpm-power.c:323 msgid "An application is currently disabling the automatic sleep, doing this action now may damage the working state of this application, are you sure you want to hibernate the system?" msgstr "Un'applicazione sta inibendo l'addormentamento automatico; continuando si potrebbe danneggiare lo stato dell'applicazione. Ibernare davvero il sistema?" @@ -361,8 +353,8 @@ msgid "All running instances of the power manager will exit" msgstr "Tutte le istanze in esecuzione del gestore di energia verranno chiuse" #: ../src/xfpm-power.c:424 -msgid "Quit Xfce power manager?" -msgstr "Uscire dal gestore di energia di Xfce?" +msgid "Quit the power manager?" +msgstr "Uscire dal gestore di energia?" #. Power information #: ../src/xfpm-power.c:494 ../src/xfpm-power-info.c:818 @@ -964,7 +956,7 @@ msgstr "Comando" msgid "Details" msgstr "Dettagli" -#: ../src/xfce4-power-manager.desktop.in.h:1 +#: ../src/xfce4-power-manager.desktop.in.h:2 msgid "Power management for the Xfce desktop" msgstr "Gestione dell'energia per l'ambiente Xfce" @@ -982,6 +974,12 @@ msgstr "Nessun dispositivo trovato" msgid "Brightness plugin" msgstr "Plugin della luminosità" +#~ msgid "Xfce 4 Power Manager" +#~ m
[Xfce4-commits] Trigger notification on XF86XK_Battery key press
Updating branch refs/heads/master to 42af0e50ca1c9ec25976beadde2ace326d0cd106 (commit) from ed9fda2c908c1c0a080de34d61b536acc70f0195 (commit) commit 42af0e50ca1c9ec25976beadde2ace326d0cd106 Author: Ali Abdallah Date: Tue Feb 15 10:02:19 2011 +0100 Trigger notification on XF86XK_Battery key press src/xfpm-battery.c | 42 +++--- src/xfpm-battery.h |1 - src/xfpm-button.c|2 ++ src/xfpm-enum-glib.h |1 + src/xfpm-power.c |1 - 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index 26e2560..c701f14 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -36,6 +36,7 @@ #include "xfpm-xfconf.h" #include "xfpm-notify.h" #include "xfpm-config.h" +#include "xfpm-button.h" #include "xfpm-enum-glib.h" #include "xfpm-enum-types.h" #include "xfpm-debug.h" @@ -51,6 +52,7 @@ struct XfpmBatteryPrivate { XfpmXfconf *conf; XfpmNotify*notify; +XfpmButton *button; DBusGProxy *proxy; DBusGProxy*proxy_prop; @@ -65,10 +67,10 @@ struct XfpmBatteryPrivate gint64 time_to_full; gint64 time_to_empty; -const gchar*backend_iface_device; /*upower or devkit*/ const gchar*battery_name; gulong sig; +gulong sig_bt; }; enum @@ -322,18 +324,15 @@ xfpm_battery_refresh_icon (XfpmBattery *battery) gtk_status_icon_set_from_icon_name (GTK_STATUS_ICON (battery), icon_name); } -static gboolean -xfpm_battery_notify_idle (gpointer data) +static void +xfpm_battery_notify (XfpmBattery *battery) { -XfpmBattery *battery; gchar *message = NULL; -battery = XFPM_BATTERY (data); - message = xfpm_battery_get_message_from_battery_state (battery); if ( !message ) - return FALSE; + return; xfpm_notify_show_notification (battery->priv->notify, _("Power Manager"), @@ -345,7 +344,14 @@ xfpm_battery_notify_idle (gpointer data) GTK_STATUS_ICON (battery)); g_free (message); - +} + +static gboolean +xfpm_battery_notify_idle (gpointer data) +{ +XfpmBattery *battery; +battery = XFPM_BATTERY (data); +xfpm_battery_notify (battery); return FALSE; } @@ -574,12 +580,19 @@ xfpm_battery_refresh (XfpmBattery *battery, GHashTable *props) } static void +xfpm_battery_button_pressed_cb (XfpmButton *button, XfpmButtonKey type, XfpmBattery *battery) +{ +if (type == BUTTON_BATTERY) + xfpm_battery_notify (battery); +} + +static void xfpm_battery_changed_cb (DBusGProxy *proxy, XfpmBattery *battery) { GHashTable *props; props = xfpm_power_get_interface_properties (battery->priv->proxy_prop, - battery->priv->backend_iface_device); +UPOWER_IFACE_DEVICE); if ( props ) xfpm_battery_refresh (battery, props); @@ -721,10 +734,15 @@ xfpm_battery_init (XfpmBattery *battery) battery->priv->icon_prefix = NULL; battery->priv->time_to_full = 0; battery->priv->time_to_empty = 0; +battery->priv->button= xfpm_button_new (); battery->priv->ac_online = TRUE; battery->priv->sig = g_signal_connect (G_OBJECT (battery->priv->conf), "notify::" SHOW_TRAY_ICON_CFG, G_CALLBACK (xfpm_battery_tray_icon_settings_changed), battery); + + +battery->priv->sig_bt = g_signal_connect (G_OBJECT (battery->priv->button), "button-pressed", + G_CALLBACK (xfpm_battery_button_pressed_cb), battery); } static void @@ -741,11 +759,15 @@ xfpm_battery_finalize (GObject *object) if ( g_signal_handler_is_connected (battery->priv->conf, battery->priv->sig ) ) g_signal_handler_disconnect (G_OBJECT (battery->priv->conf), battery->priv->sig); + + if ( g_signal_handler_is_connected (battery->priv->button, battery->priv->sig_bt ) ) + g_signal_handler_disconnect (G_OBJECT (battery->priv->button), battery->priv->sig_bt); g_object_unref (battery->priv->proxy); g_object_unref (battery->priv->proxy_prop); g_object_unref (battery->priv->conf); g_object_unref (battery->priv->notify); +g_object_unref (battery->priv->button); G_OBJECT_CLASS (xfpm_battery
[Xfce4-commits] Just process new charge state.
Updating branch refs/heads/master to 0f99e9e7b82c2439438cec01ff0dbf0e45b21b83 (commit) from 629d610ba09c84a6ab1e4fc0652d0344bed44394 (commit) commit 0f99e9e7b82c2439438cec01ff0dbf0e45b21b83 Author: Ali Abdallah Date: Mon Feb 14 14:24:34 2011 +0100 Just process new charge state. src/xfpm-power.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/xfpm-power.c b/src/xfpm-power.c index 6c5d80f..b0bf5c9 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -79,6 +79,8 @@ struct XfpmPowerPrivate XfpmXfconf *conf; GtkStatusIcon *adapter_icon; +XfpmBatterState overall_state; + gbooleaninhibited; XfpmNotify *notify; @@ -783,7 +785,7 @@ xfpm_power_process_critical_action (XfpmPower *power, XfpmShutdownRequest req) } static void -xfpm_power_system_on_low_power (XfpmPower *power, XfpmBattery *battery) +xfpm_power_system_on_critical_power (XfpmPower *power, XfpmBattery *battery) { XfpmShutdownRequest critical_action; @@ -816,9 +818,15 @@ xfpm_power_battery_charge_changed_cb (XfpmBattery *battery, XfpmPower *power) XFPM_DEBUG_ENUM (current_charge, XFPM_TYPE_BATTERY_CHARGE, "Current system charge status"); +if (current_charge == power->priv->overall_state) + return; + +power->priv->overall_state = current_state; + if ( current_charge == XFPM_BATTERY_CHARGE_CRITICAL && power->priv->on_battery) { - xfpm_power_system_on_low_power (power, battery); + xfpm_power_system_on_critical_power (power, battery); + power->priv->on_low_battery = TRUE; g_signal_emit (G_OBJECT (power), signals [LOW_BATTERY_CHANGED], 0, power->priv->on_low_battery); return; @@ -1220,6 +1228,7 @@ xfpm_power_init (XfpmPower *power) power->priv->auth_suspend= TRUE; power->priv->dialog = NULL; power->priv->adapter_icon= NULL; +power->priv->overall_state = XFPM_BATTERY_CHARGE_OK; power->priv->inhibit = xfpm_inhibit_new (); power->priv->notify = xfpm_notify_new (); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Better battery notifications.
Updating branch refs/heads/master to ed9fda2c908c1c0a080de34d61b536acc70f0195 (commit) from 614083b9cbe37c26a69049803394305fe00b8969 (commit) commit ed9fda2c908c1c0a080de34d61b536acc70f0195 Author: Ali Abdallah Date: Tue Feb 15 09:44:36 2011 +0100 Better battery notifications. src/xfpm-battery.c | 253 1 files changed, 175 insertions(+), 78 deletions(-) diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index a23c132..26e2560 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -66,6 +66,7 @@ struct XfpmBatteryPrivate gint64 time_to_empty; const gchar*backend_iface_device; /*upower or devkit*/ +const gchar*battery_name; gulong sig; }; @@ -91,6 +92,9 @@ G_DEFINE_TYPE (XfpmBattery, xfpm_battery, GTK_TYPE_STATUS_ICON) static const gchar * G_GNUC_CONST xfpm_battery_get_icon_index (XfpmDeviceType type, guint percent) { + +g_debug ("Battery percent %d\n", percent); + if (percent < 10) { return "000"; } else if (percent < 30) { @@ -138,27 +142,126 @@ xfpm_battery_refresh_visible (XfpmBattery *battery) } -static const gchar * G_GNUC_CONST -xfpm_battery_get_message_from_battery_state (XfpmDeviceState state, gboolean ac_online) +/* + * Taken from gpm + */ +static gchar * +xfpm_battery_get_time_string (guint seconds) { -const gchar *msg = NULL; +char* timestring = NULL; +gint hours; +gint minutes; + +/* Add 0.5 to do rounding */ +minutes = (int) ( ( seconds / 60.0 ) + 0.5 ); + +if (minutes == 0) +{ + timestring = g_strdup (_("Unknown time")); + return timestring; +} + +if (minutes < 60) +{ + timestring = g_strdup_printf (ngettext ("%i minute", + "%i minutes", + minutes), minutes); + return timestring; +} + +hours = minutes / 60; +minutes = minutes % 60; + +if (minutes == 0) + timestring = g_strdup_printf (ngettext ( + "%i hour", + "%i hours", + hours), hours); +else + /* TRANSLATOR: "%i %s %i %s" are "%i hours %i minutes" +* Swap order with "%2$s %2$i %1$s %1$i if needed */ + timestring = g_strdup_printf (_("%i %s %i %s"), + hours, ngettext ("hour", "hours", hours), + minutes, ngettext ("minute", "minutes", minutes)); +return timestring; +} + +static gchar * +xfpm_battery_get_message_from_battery_state (XfpmBattery *battery) +{ +gchar *msg = NULL; -switch (state) + +if (battery->priv->type == XFPM_DEVICE_TYPE_BATTERY || battery->priv->type == XFPM_DEVICE_TYPE_UPS) { - case XFPM_DEVICE_STATE_FULLY_CHARGED: - msg = _("Your battery is fully charged"); - break; - case XFPM_DEVICE_STATE_CHARGING: - msg = _("Your battery is charging"); - break; - case XFPM_DEVICE_STATE_DISCHARGING: - msg = ac_online ? _("Your battery is discharging"): _("System is running on battery power"); - break; - case XFPM_DEVICE_STATE_EMPTY: - msg = _("Battery is empty"); - break; - default: - break; + switch (battery->priv->state) + { + case XFPM_DEVICE_STATE_FULLY_CHARGED: + msg = g_strdup_printf (_("Your %s is fully charged"), battery->priv->battery_name); + break; + case XFPM_DEVICE_STATE_CHARGING: + msg = g_strdup_printf (_("Your %s is charging"), battery->priv->battery_name); + + if ( battery->priv->time_to_full != 0 ) + { + gchar *tmp, *est_time_str; + tmp = g_strdup (msg); + g_free (msg); + + est_time_str = xfpm_battery_get_time_string (battery->priv->time_to_full); + + msg = g_strdup_printf ("%s (%i%%)\n%s until is fully charged.", tmp, battery->priv->percentage, est_time_str); + g_free (est_time_str); + g_free (tmp); + } + + break; + case XFPM_DEVICE_STATE_DISCHARGING: + if (battery->priv->ac_online) + msg = g_strdup_printf (_("Your %s is discharging"), battery->priv->battery_name); + else + msg = g_strdup_printf (_("System is running on %s power"), battery->priv
[Xfce4-commits] Avoid two hibernate because of low power in one row.
Updating branch refs/heads/master to 614083b9cbe37c26a69049803394305fe00b8969 (commit) from 0f99e9e7b82c2439438cec01ff0dbf0e45b21b83 (commit) commit 614083b9cbe37c26a69049803394305fe00b8969 Author: Ali Abdallah Date: Mon Feb 14 14:31:08 2011 +0100 Avoid two hibernate because of low power in one row. src/xfpm-power.c | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/xfpm-power.c b/src/xfpm-power.c index b0bf5c9..2a37601 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -79,7 +79,8 @@ struct XfpmPowerPrivate XfpmXfconf *conf; GtkStatusIcon *adapter_icon; -XfpmBatterState overall_state; +XfpmBatteryCharge overall_state; +gboolean critical_action_done; gbooleaninhibited; @@ -802,7 +803,15 @@ xfpm_power_system_on_critical_power (XfpmPower *power, XfpmBattery *battery) } else { - xfpm_power_process_critical_action (power, critical_action); + if (power->priv->critical_action_done == FALSE) + { + power->priv->critical_action_done = TRUE; + xfpm_power_process_critical_action (power, critical_action); + } + else + { + xfpm_power_show_critical_action (power, battery); + } } } @@ -821,7 +830,10 @@ xfpm_power_battery_charge_changed_cb (XfpmBattery *battery, XfpmPower *power) if (current_charge == power->priv->overall_state) return; -power->priv->overall_state = current_state; +if (current_charge >= XFPM_BATTERY_CHARGE_LOW) + power->priv->critical_action_done = FALSE; + +power->priv->overall_state = current_charge; if ( current_charge == XFPM_BATTERY_CHARGE_CRITICAL && power->priv->on_battery) { @@ -1229,6 +1241,7 @@ xfpm_power_init (XfpmPower *power) power->priv->dialog = NULL; power->priv->adapter_icon= NULL; power->priv->overall_state = XFPM_BATTERY_CHARGE_OK; +power->priv->critical_action_done = FALSE; power->priv->inhibit = xfpm_inhibit_new (); power->priv->notify = xfpm_notify_new (); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Avoid possible crash in idle critical notification timer.
Updating branch refs/heads/master to 629d610ba09c84a6ab1e4fc0652d0344bed44394 (commit) from 041f8db3585189df51b6b4ce99e8bee3d1c05c75 (commit) commit 629d610ba09c84a6ab1e4fc0652d0344bed44394 Author: Ali Abdallah Date: Mon Feb 14 14:24:12 2011 +0100 Avoid possible crash in idle critical notification timer. src/xfpm-notify.c | 23 +-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/xfpm-notify.c b/src/xfpm-notify.c index 8c1862f..4928649 100644 --- a/src/xfpm-notify.c +++ b/src/xfpm-notify.c @@ -65,6 +65,9 @@ struct XfpmNotifyPrivate NotifyNotification *notification; NotifyNotification *critical; +gulong critical_id; +gulong notify_id; + gboolean supports_actions; gboolean supports_sync; /*For x-canonical-private-synchronous */ }; @@ -167,6 +170,9 @@ xfpm_notify_init (XfpmNotify *notify) notify->priv->notification = NULL; notify->priv->critical = NULL; +notify->priv->critical_id = 0; +notify->priv->notify_id = 0; + notify->priv->monitor = xfpm_dbus_monitor_new (); xfpm_dbus_monitor_add_service (notify->priv->monitor, DBUS_BUS_SESSION, "org.freedesktop.Notifications"); g_signal_connect (notify->priv->monitor, "service-connection-changed", @@ -249,6 +255,12 @@ xfpm_notify_show (NotifyNotification *n) static void xfpm_notify_close_notification (XfpmNotify *notify ) { +if (notify->priv->notify_id != 0) +{ + g_source_remove (notify->priv->notify_id); + notify->priv->notify_id = 0; +} + if ( notify->priv->notification ) { if (!notify_notification_close (notify->priv->notification, NULL)) @@ -335,7 +347,7 @@ void xfpm_notify_present_notification (XfpmNotify *notify, NotifyNotification *n notify->priv->notification = n; } -g_idle_add ((GSourceFunc) xfpm_notify_show, n); +notify->priv->notify_id = g_idle_add ((GSourceFunc) xfpm_notify_show, n); } void xfpm_notify_critical (XfpmNotify *notify, NotifyNotification *n) @@ -349,13 +361,20 @@ void xfpm_notify_critical (XfpmNotify *notify, NotifyNotification *n) g_signal_connect (G_OBJECT (n), "closed", G_CALLBACK (xfpm_notify_close_critical_cb), notify); -g_idle_add ((GSourceFunc) xfpm_notify_show, n); +notify->priv->critical_id = g_idle_add ((GSourceFunc) xfpm_notify_show, n); } void xfpm_notify_close_critical (XfpmNotify *notify) { g_return_if_fail (XFPM_IS_NOTIFY (notify)); + +if (notify->priv->critical_id != 0) +{ + g_source_remove (notify->priv->critical_id); + notify->priv->critical_id = 0; +} + if ( notify->priv->critical ) { if (!notify_notification_close (notify->priv->critical, NULL)) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Add empty batter notification
Updating branch refs/heads/master to 041f8db3585189df51b6b4ce99e8bee3d1c05c75 (commit) from 747b3956d8f83a1c144a6f8de60f701bc33a274e (commit) commit 041f8db3585189df51b6b4ce99e8bee3d1c05c75 Author: Ali Abdallah Date: Mon Feb 14 14:08:44 2011 +0100 Add empty batter notification src/xfpm-battery.c | 15 +++ 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index 73208fb..a23c132 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -141,20 +141,27 @@ xfpm_battery_refresh_visible (XfpmBattery *battery) static const gchar * G_GNUC_CONST xfpm_battery_get_message_from_battery_state (XfpmDeviceState state, gboolean ac_online) { +const gchar *msg = NULL; + switch (state) { case XFPM_DEVICE_STATE_FULLY_CHARGED: - return _("Your battery is fully charged"); + msg = _("Your battery is fully charged"); break; case XFPM_DEVICE_STATE_CHARGING: - return _("Your battery is charging"); + msg = _("Your battery is charging"); break; case XFPM_DEVICE_STATE_DISCHARGING: - return ac_online ? _("Your battery is discharging"): _("System is running on battery power"); + msg = ac_online ? _("Your battery is discharging"): _("System is running on battery power"); + break; + case XFPM_DEVICE_STATE_EMPTY: + msg = _("Battery is empty"); break; default: - return NULL; + break; } + +return msg; } static void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Remove Xfce prefix from notifications, dialogs, ... (bug#7268)
Updating branch refs/heads/master to 747b3956d8f83a1c144a6f8de60f701bc33a274e (commit) from c8d29b6e2dde6091e0bebbd2761f98f323beba02 (commit) commit 747b3956d8f83a1c144a6f8de60f701bc33a274e Author: Ali Abdallah Date: Mon Feb 14 11:01:55 2011 +0100 Remove Xfce prefix from notifications, dialogs, ... (bug#7268) settings/xfce4-power-manager-settings.desktop.in |4 ++-- src/xfce4-power-manager.desktop.in |2 +- src/xfpm-battery.c |2 +- src/xfpm-power.c | 14 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/settings/xfce4-power-manager-settings.desktop.in b/settings/xfce4-power-manager-settings.desktop.in index 55fc303..7cbd09f 100644 --- a/settings/xfce4-power-manager-settings.desktop.in +++ b/settings/xfce4-power-manager-settings.desktop.in @@ -1,8 +1,8 @@ [Desktop Entry] Version=1.0 -_Name=Xfce 4 Power Manager +_Name=Power Manager _GenericName=Power Manager -_Comment=Settings for the Xfce 4 Power Manager +_Comment=Settings for the Xfce Power Manager Exec=xfce4-power-manager-settings Icon=xfpm-ac-adapter Terminal=false diff --git a/src/xfce4-power-manager.desktop.in b/src/xfce4-power-manager.desktop.in index 6df34ad..34074eb 100644 --- a/src/xfce4-power-manager.desktop.in +++ b/src/xfce4-power-manager.desktop.in @@ -1,5 +1,5 @@ [Desktop Entry] -_Name=Xfce Power Manager +_Name=Power Manager _Comment=Power management for the Xfce desktop Icon=xfpm-ac-adapter Exec=xfce4-power-manager diff --git a/src/xfpm-battery.c b/src/xfpm-battery.c index 81f4a4c..73208fb 100644 --- a/src/xfpm-battery.c +++ b/src/xfpm-battery.c @@ -226,7 +226,7 @@ xfpm_battery_notify_idle (gpointer data) return FALSE; xfpm_notify_show_notification (battery->priv->notify, - _("Xfce power manager"), + _("Power Manager"), message, gtk_status_icon_get_icon_name (GTK_STATUS_ICON (battery)), 8000, diff --git a/src/xfpm-power.c b/src/xfpm-power.c index ff12d69..6c5d80f 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -297,7 +297,7 @@ xfpm_power_report_error (XfpmPower *power, const gchar *error, const gchar *icon } xfpm_notify_show_notification (power->priv->notify, - _("Xfce power manager"), + _("Power Manager"), error, icon_name, 1, @@ -421,7 +421,7 @@ xfpm_power_tray_exit_activated_cb (gpointer data) _("Quit"), _("All running instances of the power manager will exit"), "%s", - _("Quit Xfce power manager?")); + _("Quit the power manager?")); if ( ret ) { xfpm_quit (); @@ -517,7 +517,7 @@ xfpm_power_show_tray_menu (XfpmPower *power, mi = gtk_image_menu_item_new_from_stock (GTK_STOCK_ABOUT, NULL); gtk_widget_set_sensitive (mi, TRUE); gtk_widget_show (mi); -g_signal_connect (mi, "activate", G_CALLBACK (xfpm_about), _("Xfce Power Manager")); +g_signal_connect (mi, "activate", G_CALLBACK (xfpm_about), _("Power Manager")); gtk_menu_shell_append (GTK_MENU_SHELL(menu), mi); @@ -652,7 +652,7 @@ xfpm_power_show_critical_action_notification (XfpmPower *power, XfpmBattery *bat n = xfpm_notify_new_notification (power->priv->notify, - _("Xfce power manager"), + _("Power Manager"), message, gtk_status_icon_get_icon_name (GTK_STATUS_ICON (battery)), 2, @@ -688,7 +688,7 @@ xfpm_power_show_critical_action_gtk (XfpmPower *power) message = _("System is running on low power. "\ "Save your work to avoid losing data"); -dialog = gtk_dialog_new_with_buttons (_("Xfce Power Manager"), NULL, GTK_DIALOG_MODAL, +dialog = gtk_dialog_new_with_buttons (_("Power Manager"), NULL, GTK_DIALOG_MODAL, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), @@ -840,7 +840,7 @@ xfpm_power_battery_charge_changed_cb (XfpmBattery *battery, XfpmPower *power) { if ( notify ) xfpm_notify_show_notification (power->priv->notify, -
[Xfce4-commits] Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager
Updating branch refs/heads/master to c8d29b6e2dde6091e0bebbd2761f98f323beba02 (commit) from 7714d57008384c30f64bee2b6e7cdb1e1b377be0 (commit) commit c8d29b6e2dde6091e0bebbd2761f98f323beba02 Merge: 7714d57 3316d8e Author: Ali Abdallah Date: Mon Feb 14 10:53:35 2011 +0100 Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager commit 3316d8e6c7dc7fc38b8c474f595fc9ba68f859ac Author: Xavier Devlamynck Date: Sun Jan 30 10:39:42 2011 +0100 l10n: Updated French (fr) translation to 100% New status: 198 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit aed0d6d9f371dec88f5b8bc61752f9368672 Author: gianluca foddis Date: Sat Jan 15 14:37:20 2011 +0100 l10n: Updated Italian (it) translation to 100% New status: 198 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/fr.po | 108 + po/it.po | 317 ++ 2 files changed, 200 insertions(+), 225 deletions(-) diff --git a/po/fr.po b/po/fr.po index 0c15dee..a719cce 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,16 +9,16 @@ msgid "" msgstr "" "Project-Id-Version: xfce4-power-manager\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-10-18 04:02+\n" +"POT-Creation-Date: 2011-01-30 05:03+\n" "PO-Revision-Date: 2010-02-08 18:17+0100\n" "Last-Translator: Douart Patrick \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Country: FRANCE\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: French\n" -"X-Poedit-Country: FRANCE\n" #: ../data/interfaces/xfpm-settings.ui.h:1 msgid "Actions" @@ -155,7 +155,7 @@ msgstr "Appui sur le bouton de mise en veille :" #: ../data/interfaces/xfpm-settings.ui.h:31 #: ../settings/xfpm-settings-main.c:121 ../src/xfpm-power.c:520 -#: ../src/xfpm-power.c:691 ../src/xfpm-main.c:415 +#: ../src/xfpm-power.c:691 ../src/xfpm-main.c:410 #: ../src/xfce4-power-manager.desktop.in.h:2 msgid "Xfce Power Manager" msgstr "Gestionnaire d'alimentation" @@ -197,9 +197,8 @@ msgstr "Secondes" #: ../settings/xfpm-settings.c:761 ../settings/xfpm-settings.c:948 #: ../settings/xfpm-settings.c:1410 -#, fuzzy msgid "Hibernate and suspend operations not supported" -msgstr "Opérations de mise en veille prolongée et de mise en veille non autorisées" +msgstr "Opérations de mise en veille prolongée et de mise en veille non supportées" #: ../settings/xfpm-settings.c:766 ../settings/xfpm-settings.c:953 #: ../settings/xfpm-settings.c:1415 @@ -245,18 +244,16 @@ msgid "Disable Display Power Management Signaling (DPMS), e.g don't attempt to s msgstr "Désactiver le DPMS, e.g. pour ne pas tenter l'extinction de l'écran ou sa mise en veille" #: ../settings/xfpm-settings.c:1319 -#, fuzzy msgid "Suspend operation not supported" -msgstr "Opération de mise en veille non autorisée" +msgstr "Opération de mise en veille non supportée" #: ../settings/xfpm-settings.c:1325 msgid "Suspend operation not permitted" msgstr "Opération de mise en veille non autorisée" #: ../settings/xfpm-settings.c:1331 -#, fuzzy msgid "Hibernate operation not supported" -msgstr "Opération de mise en veille prolongée non autorisée" +msgstr "Opération de mise en veille prolongée non supportée" #: ../settings/xfpm-settings.c:1336 msgid "Hibernate operation not permitted" @@ -294,7 +291,7 @@ msgstr "Socket du gestionnaire de paramètres" msgid "SOCKET ID" msgstr "ID SOCKET" -#: ../settings/xfpm-settings-main.c:89 ../src/xfpm-main.c:291 +#: ../settings/xfpm-settings-main.c:89 ../src/xfpm-main.c:286 #: ../src/xfpm-power-info.c:948 #, c-format msgid "Type '%s --help' for usage." @@ -308,7 +305,7 @@ msgstr "Impossible de charger la configuration, les paramètres par défauts ser msgid "Unable to connect to Xfce Power Manager" msgstr "Échec au chargement du gestionnaire d'alimentation Xfce" -#: ../settings/xfpm-settings-main.c:190 ../src/xfpm-main.c:331 +#: ../settings/xfpm-settings-main.c:190 ../src/xfpm-main.c:326 #, c-format msgid "Xfce power manager is not running" msgstr "Le gestionnaire d'alimentation Xfce n'est pas lancé" @@ -355,9 +352,8 @@ msgid "Quit" msgstr "Quitter" #: ../src/xfpm-power.c:422 -#, fuzzy msgid "All running instances of the p
[Xfce4-commits] Use __FreeBSD__ instead of HAVE_FREEBSD as it is not defined in config.h.
Updating branch refs/heads/master to 7714d57008384c30f64bee2b6e7cdb1e1b377be0 (commit) from 50f8c1aa194be51b2f12b8be2d12dcf9911ee2e1 (commit) commit 7714d57008384c30f64bee2b6e7cdb1e1b377be0 Author: Ali Abdallah Date: Fri Jan 7 15:23:35 2011 +0100 Use __FreeBSD__ instead of HAVE_FREEBSD as it is not defined in config.h. src/xfpm-polkit.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/xfpm-polkit.c b/src/xfpm-polkit.c index 0460cf1..a50c2db 100644 --- a/src/xfpm-polkit.c +++ b/src/xfpm-polkit.c @@ -32,7 +32,7 @@ #include -#ifndef HAVE_FREEBSD +#if defined(__FreeBSD__) #include #else #include ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Update copyright year.
Updating branch refs/heads/master to 9fc2b557f8c1210890abc29e9bdc2b353a35e9d2 (commit) from 7f977d69a0ca4c17dc27554762f50acee1530b07 (commit) commit 9fc2b557f8c1210890abc29e9bdc2b353a35e9d2 Author: Ali Abdallah Date: Wed Jan 5 00:11:49 2011 +0100 Update copyright year. common/xfpm-brightness.c |2 +- common/xfpm-brightness.h |2 +- common/xfpm-common.c |4 ++-- common/xfpm-common.h |2 +- common/xfpm-debug.c |2 +- common/xfpm-debug.h |2 +- common/xfpm-icons.h |2 +- libdbus/xfpm-dbus-monitor.c |2 +- libdbus/xfpm-dbus-monitor.h |2 +- libdbus/xfpm-dbus.c |2 +- libdbus/xfpm-dbus.h |2 +- libdbus/xfpm-unique.c|2 +- libdbus/xfpm-unique.h|2 +- panel-plugins/brightness/brightness-button.c |2 +- panel-plugins/brightness/brightness-button.h |2 +- panel-plugins/brightness/brightness-plugin.c |2 +- settings/xfpm-settings-main.c|2 +- settings/xfpm-settings.c |2 +- settings/xfpm-settings.h |2 +- src/xfpm-backlight.c |2 +- src/xfpm-backlight.h |2 +- src/xfpm-battery.c |2 +- src/xfpm-battery.h |2 +- src/xfpm-button.c|2 +- src/xfpm-button.h|2 +- src/xfpm-config.h|2 +- src/xfpm-console-kit.c |2 +- src/xfpm-console-kit.h |2 +- src/xfpm-disks.c |2 +- src/xfpm-disks.h |2 +- src/xfpm-dpms.c |2 +- src/xfpm-dpms.h |2 +- src/xfpm-enum-glib.h |2 +- src/xfpm-enum.h |2 +- src/xfpm-errors.c|2 +- src/xfpm-errors.h|2 +- src/xfpm-inhibit.c |2 +- src/xfpm-inhibit.h |2 +- src/xfpm-main.c |2 +- src/xfpm-manager.c |2 +- src/xfpm-manager.h |2 +- src/xfpm-network-manager.c |2 +- src/xfpm-network-manager.h |2 +- src/xfpm-notify.c|2 +- src/xfpm-notify.h|2 +- src/xfpm-polkit.c|2 +- src/xfpm-polkit.h|2 +- src/xfpm-power-common.c |2 +- src/xfpm-power-common.h |2 +- src/xfpm-power-info.c|2 +- src/xfpm-power.c |2 +- src/xfpm-power.h |2 +- src/xfpm-xfconf.c|2 +- src/xfpm-xfconf.h|2 +- 54 files changed, 55 insertions(+), 55 deletions(-) diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c index 84e6b87..e0b9c3c 100644 --- a/common/xfpm-brightness.c +++ b/common/xfpm-brightness.c @@ -1,5 +1,5 @@ /* - * * Copyright (C) 2009 Ali + * * Copyright (C) 2009-2011 Ali * * Licensed under the GNU General Public License Version 2 * diff --git a/common/xfpm-brightness.h b/common/xfpm-brightness.h index e687371..f0398e6 100644 --- a/common/xfpm-brightness.h +++ b/common/xfpm-brightness.h @@ -1,5 +1,5 @@ /* - * * Copyright (C) 2009 Ali + * * Copyright (C) 2009-2011 Ali * * Licensed under the GNU General Public License Version 2 * diff --git a/common/xfpm-common.c b/common/xfpm-common.c index 039c05c..eca2ed5 100644 --- a/common/xfpm-common.c +++ b/common/xfpm-common.c @@ -1,5 +1,5 @@ /* - * * Copyright (C) 2008-2009 Ali + * * Copyright (C) 2008-2011 Ali * * Licensed under the GNU General Public License Version 2 * @@ -147,7 +147,7 @@ xfpm_about (GtkWidget *widget, gpointer data) gtk_show_about_dialog (NULL, "authors", authors, -"copyright", "Copyright \302\251 2008-2009 Ali Abdallah", +"copyright", "Copyright \302\251 2008-2011 Ali Abdallah", "destroy-with-parent", TRUE, "documenters", documenters, "license", XFCE_LICENSE_GPL, diff --git a/common/xfpm-common.h b/common/xfpm-common.h index 80f47cd..2dce854 100644 --- a/common/xfpm-common.h +++ b/common/xfpm-common.h @@ -1,5 +1,5 @@ /* - * *
[Xfce4-commits] Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager
Updating branch refs/heads/master to 8977b9f51e932d6034a0e25055096f070bc523fc (commit) from 9fc2b557f8c1210890abc29e9bdc2b353a35e9d2 (commit) commit 8977b9f51e932d6034a0e25055096f070bc523fc Merge: 9fc2b55 6ef9a84 Author: Ali Abdallah Date: Fri Jan 7 12:28:03 2011 +0100 Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager commit 6ef9a84761f72a1023d86faf10d2ebbcb0ad182a Author: forfolias Date: Fri Jan 7 10:34:25 2011 +0100 l10n: Updated Greek (el) translation to 100% New status: 198 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). commit 2a22d2745aeb9036da978eaa68e09f697935b665 Author: forfolias Date: Thu Jan 6 16:57:08 2011 +0100 l10n: Updated Greek (el) translation to 63% New status: 126 messages complete with 57 fuzzies and 15 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/el.po | 537 +- 1 files changed, 217 insertions(+), 320 deletions(-) diff --git a/po/el.po b/po/el.po index e5ca5b7..36262c9 100644 --- a/po/el.po +++ b/po/el.po @@ -1,24 +1,24 @@ # Translation of xfce4-power-manager to Greek # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# +# # Evaggelos Balaskas , 2008, 2009. msgid "" msgstr "" "Project-Id-Version: xfce4-power-manager git\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-03-25 18:01+0100\n" +"POT-Creation-Date: 2011-01-07 05:03+\n" "PO-Revision-Date: 2010-03-26 00:12+0200\n" "Last-Translator: Evaggelos Balaskas \n" "Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 0.2\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Greek\n" -"X-Poedit-Country: GREECE\n" "X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Country: GREECE\n" +"X-Generator: Lokalize 0.2\n" #: ../data/interfaces/xfpm-settings.ui.h:1 msgid "Actions" @@ -49,14 +49,10 @@ msgid "Consider the computer on low power at:" msgstr "Θεωρείστε τον υπολογιστή σε λίγο ρεύμα στο:" #. Hibernate menu option -#: ../data/interfaces/xfpm-settings.ui.h:8 -#: ../settings/xfpm-settings.c:789 -#: ../settings/xfpm-settings.c:857 -#: ../settings/xfpm-settings.c:995 -#: ../settings/xfpm-settings.c:1160 -#: ../settings/xfpm-settings.c:1215 -#: ../settings/xfpm-settings.c:1265 -#: ../src/xfpm-power.c:443 +#: ../data/interfaces/xfpm-settings.ui.h:8 ../settings/xfpm-settings.c:789 +#: ../settings/xfpm-settings.c:857 ../settings/xfpm-settings.c:995 +#: ../settings/xfpm-settings.c:1160 ../settings/xfpm-settings.c:1215 +#: ../settings/xfpm-settings.c:1265 ../src/xfpm-power.c:443 #: ../src/xfpm-power.c:704 msgid "Hibernate" msgstr "Αδρανοποίηση" @@ -65,8 +61,7 @@ msgstr "Αδρανοποίηση" msgid "Lock screen when going for suspend/hibernate" msgstr "Κλείδωμα οθόνης όταν μεταβαίνει για αναστολή/αδρανοποίηση" -#: ../data/interfaces/xfpm-settings.ui.h:10 -#: ../src/xfpm-power-common.c:132 +#: ../data/interfaces/xfpm-settings.ui.h:10 ../src/xfpm-power-common.c:132 msgid "Monitor" msgstr "Οθόνη" @@ -74,12 +69,9 @@ msgstr "Οθόνη" msgid "Monitor power management control" msgstr "Παρακολούθηση ελέγχου διαχείρισης ρεύματος" -#: ../data/interfaces/xfpm-settings.ui.h:12 -#: ../settings/xfpm-settings.c:778 -#: ../settings/xfpm-settings.c:846 -#: ../settings/xfpm-settings.c:984 -#: ../settings/xfpm-settings.c:1149 -#: ../settings/xfpm-settings.c:1204 +#: ../data/interfaces/xfpm-settings.ui.h:12 ../settings/xfpm-settings.c:778 +#: ../settings/xfpm-settings.c:846 ../settings/xfpm-settings.c:984 +#: ../settings/xfpm-settings.c:1149 ../settings/xfpm-settings.c:1204 #: ../settings/xfpm-settings.c:1254 msgid "Nothing" msgstr "Τίποτα" @@ -118,21 +110,17 @@ msgstr "Να εμφανίζονται ειδοποιήσεις σχετικά μ #: ../data/interfaces/xfpm-settings.ui.h:21 msgid "Spin down hard disks" -msgstr "" +msgstr "Μείωση αυτοστροφορμής σκληρών δίσκων" #: ../data/interfaces/xfpm-settings.ui.h:22 msgid "Standby" msgstr "Σε αναμονή" #. Suspend menu option -#: ../data/interfaces/xfpm-settings.ui.h:23 -#: ../settings/xfpm-settings.c:783 -#: ../settings/xfpm-settings.c:851 -#: ../settings/xfpm-settings.c:989 -#: ../settings/xfpm-settings.c:1154 -#: ../settings/xfpm-settings.c:1209 -#: ../settings/xfpm-settings.c:1259 -#: ../src/xfpm-power.c:458 +#: ../data/interfaces/xfpm-settings.ui.h:23 ../settings/xfpm-set
[Xfce4-commits] Fix compilation on FREEBSD.
Updating branch refs/heads/master to 50f8c1aa194be51b2f12b8be2d12dcf9911ee2e1 (commit) from 8977b9f51e932d6034a0e25055096f070bc523fc (commit) commit 50f8c1aa194be51b2f12b8be2d12dcf9911ee2e1 Author: Ali Abdallah Date: Fri Jan 7 12:28:20 2011 +0100 Fix compilation on FREEBSD. src/xfpm-polkit.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/src/xfpm-polkit.c b/src/xfpm-polkit.c index f8f7f9a..0460cf1 100644 --- a/src/xfpm-polkit.c +++ b/src/xfpm-polkit.c @@ -30,6 +30,18 @@ #include #endif +#include + +#ifndef HAVE_FREEBSD +#include +#else +#include +#include +#include +#endif + +#include + #include #include "xfpm-polkit.h" ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix linking against x11, dbus and randr
Updating branch refs/heads/master to 7f977d69a0ca4c17dc27554762f50acee1530b07 (commit) from de0320e7748ba1a227442887a693a846281977d4 (commit) commit 7f977d69a0ca4c17dc27554762f50acee1530b07 Author: Yves-Alexis Perez Date: Tue Jan 4 23:56:31 2011 +0100 Fix linking against x11, dbus and randr common/Makefile.am |6 ++ configure.ac.in |2 ++ libdbus/Makefile.am |5 + 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/common/Makefile.am b/common/Makefile.am index 8805985..f2d504f 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -16,3 +16,9 @@ libxfpmcommon_la_CFLAGS = \ $(GTK_CFLAGS) \ $(GLIB_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) + +libxfpmcommon_la_LIBADD = \ + $(GTK_LIBS) \ + $(GLIB_LIBS)\ + $(XRANDR_LIBS) \ + $(X11_LIBS) diff --git a/configure.ac.in b/configure.ac.in index fcb0c08..3cada9f 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -65,6 +65,7 @@ m4_define([libxfce4panel_minimum_version],[4.6.0]) m4_define([libnotify_minimum_version], [0.4.1]) m4_define([xrandr_minimum_version], [1.2.0]) +m4_define([x11_minimum_version], [1.0.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [gtk_minimum_version]) XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [glib_minimum_version]) @@ -78,6 +79,7 @@ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1],[libxfce4ui_minimum_version]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_version]) XDT_CHECK_PACKAGE([LIBNOTIFY],[libnotify], [libnotify_minimum_version]) XDT_CHECK_PACKAGE([XRANDR],[xrandr], [xrandr_minimum_version]) +XDT_CHECK_PACKAGE([X11], [x11], [x11_minimum_version]) #===# # Polkit? # diff --git a/libdbus/Makefile.am b/libdbus/Makefile.am index 6a47cbb..cada510 100644 --- a/libdbus/Makefile.am +++ b/libdbus/Makefile.am @@ -17,6 +17,11 @@ libxfpmdbus_la_CFLAGS = \ $(LIBXFCE4UTIL_CFLAGS) \ $(DBUS_GLIB_CFLAGS) +libxfpmdbus_la_LIBADD =\ + $(GLIB_LIBS)\ + $(DBUS_GLIB_LIBS) \ + $(DBUS_LIBS) + if MAINTAINER_MODE BUILT_SOURCES =\ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 1.0.3
Updating annotated tag refs/tags/1.0.3 as new annotated tag to d74c3778facbdaa30cc69ed65c9c397df31c7b2c (tag) succeeds 1.0.2-9-gc00ccde tagged by Ali Abdallah on 2011-01-04 14:08 + Ali Abdallah (1): Completely drop the usage of HAL. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Completely drop the usage of HAL.
Updating branch refs/heads/master to de0320e7748ba1a227442887a693a846281977d4 (commit) from c00ccde6295b1ee8cbf57653bbaf26060d60f002 (commit) commit de0320e7748ba1a227442887a693a846281977d4 Author: Ali Abdallah Date: Tue Jan 4 14:45:21 2011 +0100 Completely drop the usage of HAL. Makefile.am |5 - common/Makefile.am | 10 - configure.ac.in | 18 -- libhal/Makefile.am | 40 libhal/hal-device.c | 416 -- libhal/hal-device.h | 87 --- libhal/hal-manager.c | 282 --- libhal/hal-manager.h | 69 -- libhal/hal-marshal.list |3 - panel-plugins/brightness/Makefile.am | 10 - src/xfpm-button.c| 159 - src/xfpm-errors.c|1 - src/xfpm-errors.h|1 - src/xfpm-main.c |5 - 14 files changed, 0 insertions(+), 1106 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7827b2d..328aa68 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,14 +4,9 @@ if BUILD_PANEL_PLUGINS plugins_dir = panel-plugins endif -if ENABLE_HAL -libhal_dir = libhal -endif - SUBDIRS = \ data\ libdbus \ - $(libhal_dir) \ common \ src \ settings\ diff --git a/common/Makefile.am b/common/Makefile.am index e004a46..8805985 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -16,13 +16,3 @@ libxfpmcommon_la_CFLAGS = \ $(GTK_CFLAGS) \ $(GLIB_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) - -if ENABLE_HAL - -libxfpmcommon_la_CFLAGS += \ - $(DBUS_GLIB_CFLAGS) \ - -I$(top_srcdir)/libhal - -libxfpmcommon_la_LIBADD = \ - $(top_builddir)/libhal/libxfpmhal.la -endif diff --git a/configure.ac.in b/configure.ac.in index 63d63f1..fcb0c08 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -99,22 +99,6 @@ fi AM_CONDITIONAL([ENABLE_POLKIT], [test "x$polkit" = "xyes"]) #===# -# Use HAL?# -#===# -AC_ARG_ENABLE([hal], - [AC_HELP_STRING([--disable-hal], - [Do not enable HAL (default=enabled)])], - [ac_cv_enable_hal=$enableval], - [ac_cv_enable_hal=yes]) -if test "x$ac_cv_enable_hal" = "xno"; then - enable_hal="no" -else - enable_hal="yes" - AC_DEFINE(WITH_HAL, 1 , [HAL support]) -fi -AM_CONDITIONAL([ENABLE_HAL], [test "x$enable_hal" = "xyes"]) - -#===# # Check for DPMS support # #===# DPMS_LIBS= @@ -224,7 +208,6 @@ AC_SUBST([PLATFORM_LDFLAGS]) AC_OUTPUT([ Makefile libdbus/Makefile -libhal/Makefile common/Makefile src/Makefile settings/Makefile @@ -264,7 +247,6 @@ echo " prefix: ${prefix} xdg autostart: ${sysconfdir/xdg/autostart} - HAL:${enable_hal} POLKIT: ${polkit} DPMS: ${have_dpms} Network manager:${ac_network_manager} diff --git a/libhal/Makefile.am b/libhal/Makefile.am deleted file mode 100644 index d6e6853..000 --- a/libhal/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -noinst_LTLIBRARIES = \ - libxfpmhal.la - -libxfpmhal_la_SOURCES =\ - hal-manager.c \ - hal-manager.h \ - hal-device.c\ - hal-device.h\ - hal-marshal.c \ - hal-marshal.h - -libxfpmhal_la_CFLAGS = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/libdbus \ - $(GLIB_CFLAGS) \ - $(DBUS_GLIB_CFLAGS) - -libxfpmhal_la_LIBADD = \ - $(top_builddir)/libdbus/libxfpmdbus.la - -if MAINTAINER_MODE - -BUILT_SOURCES =\ - hal-marshal.c \ - hal-marshal.h - -hal-marshal.c: hal-marshal.list - echo "#include \"hal-marshal.h\"" > $@ && \ - glib-genmarshal $< --prefix=_hal_marshal --body >> $@ - -hal-marshal.h: hal-marshal.list - glib-genmarshal $< --prefix=_hal_marshal --header > $@ - -endif - -EXTRA_DIST = \ - hal-marshal.list - -DISTCLEANFILES = \ - $(BUILT_SOURCES) \ No newline at end of fi
[Xfce4-commits] Fix POTFILES.in
Updating branch refs/heads/master to c00ccde6295b1ee8cbf57653bbaf26060d60f002 (commit) from 645c365233870d8181949484725fd7cd1b811f6a (commit) commit c00ccde6295b1ee8cbf57653bbaf26060d60f002 Author: Ali Abdallah Date: Tue Jan 4 14:31:25 2011 +0100 Fix POTFILES.in po/POTFILES.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index f30c97f..109452b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -14,6 +14,6 @@ src/xfpm-dpms.c src/xfpm-inhibit.c src/xfpm-power-info.c src/xfce4-power-manager.desktop.in -src/org.xfce.power.policy.in +src/org.xfce.power.policy.in2 panel-plugins/brightness/brightness-button.c panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Install the brightness plugin in libdir instead of libexecdir
Updating branch refs/heads/master to 645c365233870d8181949484725fd7cd1b811f6a (commit) from 350e40ab0d9d1c4ef2a8325c7609152b904456f4 (commit) commit 645c365233870d8181949484725fd7cd1b811f6a Author: Ali Abdallah Date: Tue Jan 4 13:39:39 2011 +0100 Install the brightness plugin in libdir instead of libexecdir configure.ac.in|2 +- panel-plugins/brightness/Makefile.am |4 +- .../xfce4-brightness-plugin.desktop.in.in |2 +- src/Makefile.am|6 ++-- src/org.xfce.power.policy | 25 5 files changed, 7 insertions(+), 32 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 5763d2b..63d63f1 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,7 +1,7 @@ m4_define([intltool_minimum_version], [0.31]) m4_define([xfpm_version_major], [1]) m4_define([xfpm_version_minor], [0]) -m4_define([xfpm_version_micro], [2]) +m4_define([xfpm_version_micro], [3]) m4_define([xfpm_version_build], []) m4_define([xfpm_version_tag],[]) m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [git], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])]) diff --git a/panel-plugins/brightness/Makefile.am b/panel-plugins/brightness/Makefile.am index 11597a8..922cc68 100644 --- a/panel-plugins/brightness/Makefile.am +++ b/panel-plugins/brightness/Makefile.am @@ -1,4 +1,4 @@ -plugindir = $(libexecdir)/xfce4/panel-plugins +plugindir = $(libdir)/xfce4/panel-plugins plugin_PROGRAMS = xfce4-brightness-plugin xfce4_brightness_plugin_SOURCES = \ @@ -59,4 +59,4 @@ CLEANFILES = \ $(desktop_DATA) %.desktop.in: %.desktop.in.in - sed -e "s,\...@libexecdir\@,$(libexecdir),g" < $< > $@ + sed -e "s,\...@libdir\@,$(libdir),g" < $< > $@ diff --git a/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in b/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in index 1a5e440..6adccea 100644 --- a/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in +++ b/panel-plugins/brightness/xfce4-brightness-plugin.desktop.in.in @@ -3,5 +3,5 @@ Type=X-XFCE-PanelPlugin _Name=Brightness plugin _Comment=Control your LCD brightness Icon=xfpm-brightness-lcd -x-xfce-ex...@libexecdir@/xfce4/panel-plugins/xfce4-brightness-plugin +x-xfce-ex...@libdir@/xfce4/panel-plugins/xfce4-brightness-plugin X-XFCE-Unique=TRUE diff --git a/src/Makefile.am b/src/Makefile.am index 52bd53c..eaca181 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -201,11 +201,11 @@ autostart_DATA = $(autostart_in_files:.desktop.in=.desktop) EXTRA_DIST =\ xfpm-marshal.list \ $(autostart_in_files) \ -org.gnome.power.policy.in2 \ +org.xfce.power.policy.in2 \ $(manpage_DATA) DISTCLEANFILES =\ $(BUILT_SOURCES)\ xfce4-power-manager.desktop \ -org.gnome.power.policy \ -org.gnome.power.policy.in +org.xfce.power.policy \ +org.xfce.power.policy.in diff --git a/src/org.xfce.power.policy b/src/org.xfce.power.policy deleted file mode 100644 index 748bcf1..000 --- a/src/org.xfce.power.policy +++ /dev/null @@ -1,25 +0,0 @@ - -http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd";> - - - - - XFCE Power Manager - http://goodies.xfce.org/projects/applications/xfce4-power-manager - battery - - - -Modify the laptop display brightness -Authentication is required to modify the laptop display brightness - - no - no - yes - -/usr/sbin/xfpm-power-backlight-helper - - - \ No newline at end of file ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix compilation error with --enable-debug=full
Updating branch refs/heads/master to 350e40ab0d9d1c4ef2a8325c7609152b904456f4 (commit) from bda605a30808def8b66f144deae800eb9a985f59 (commit) commit 350e40ab0d9d1c4ef2a8325c7609152b904456f4 Author: Ali Abdallah Date: Tue Jan 4 13:17:32 2011 +0100 Fix compilation error with --enable-debug=full src/xfpm-backlight-helper.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/xfpm-backlight-helper.c b/src/xfpm-backlight-helper.c index 9e5bd47..f52bb52 100644 --- a/src/xfpm-backlight-helper.c +++ b/src/xfpm-backlight-helper.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #define GCM_BACKLIGHT_HELPER_EXIT_CODE_SUCCESS 0 #define GCM_BACKLIGHT_HELPER_EXIT_CODE_FAILED 1 @@ -38,7 +40,7 @@ * gcm_backlight_helper_get_best_backlight: **/ static gchar * -gcm_backlight_helper_get_best_backlight () +gcm_backlight_helper_get_best_backlight (void) { gchar *filename; guint i; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] HAL has been deprecated and unmaintained for a long time now, and isn't being installed by newer distros any more, so it's time to get rid of the HAL brigh
Updating branch refs/heads/master to bda605a30808def8b66f144deae800eb9a985f59 (commit) from 887bbe6922a6a8ebb894d75456ecffab6ce2c0d7 (commit) commit bda605a30808def8b66f144deae800eb9a985f59 Author: Martin Pitt Date: Tue Jan 4 12:50:41 2011 +0100 HAL has been deprecated and unmaintained for a long time now, and isn't being installed by newer distros any more, so it's time to get rid of the HAL brightness backend entirely, so drop it. Since there are still X.org drivers which do not support brightness setting through XRandR, add a xfpm-power-backlight-helper program which reads/writes brightness setting in /sys/class/backlight/, and use it as a fallback if XRandR brightness isn't available. Reading doesn't require any privileges, but for writing the helper needs to be run as root through pkexec, so add a default policy which allows running that without a password for the local foreground console. This was inspired from gnome-power-manager: http://git.gnome.org/browse/gnome-power-manager/commit/?id=4886023c and the helper code comes from gpm, with slight adaptions. common/Makefile.am|3 +- common/xfpm-brightness.c | 359 ++--- common/xfpm-brightness.h | 12 -- configure.ac.in |1 + po/POTFILES.in|1 + src/Makefile.am | 34 - src/org.xfce.power.policy | 25 +++ src/org.xfce.power.policy.in2 | 32 src/xfpm-backlight-helper.c | 261 ++ src/xfpm-backlight.c | 17 -- 10 files changed, 510 insertions(+), 235 deletions(-) diff --git a/common/Makefile.am b/common/Makefile.am index fd5d98c..e004a46 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -12,6 +12,7 @@ libxfpmcommon_la_SOURCES = \ libxfpmcommon_la_CFLAGS = \ -I$(top_srcdir) \ + -DSBINDIR=\"$(sbindir)\"\ $(GTK_CFLAGS) \ $(GLIB_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) @@ -24,4 +25,4 @@ libxfpmcommon_la_CFLAGS +=\ libxfpmcommon_la_LIBADD = \ $(top_builddir)/libhal/libxfpmhal.la -endif \ No newline at end of file +endif diff --git a/common/xfpm-brightness.c b/common/xfpm-brightness.c index 887aeb1..84e6b87 100644 --- a/common/xfpm-brightness.c +++ b/common/xfpm-brightness.c @@ -36,12 +36,6 @@ #include -#ifdef WITH_HAL -#include -#include "libhal/hal-manager.h" -#include "libhal/hal-device.h" -#endif - #include "xfpm-brightness.h" #include "xfpm-debug.h" @@ -56,20 +50,12 @@ struct XfpmBrightnessPrivate Atom backlight; gint output; gboolean xrandr_has_hw; +gboolean helper_has_hw; gint max_level; gint current_level; gint min_level; gint step; - -#ifdef WITH_HAL -HalManager*manager; -DBusGConnection*bus; -DBusGProxy *hal_proxy; -gboolean hal_brightness_in_hw; -gboolean hal_hw_found; -gboolean connected; -#endif }; G_DEFINE_TYPE (XfpmBrightness, xfpm_brightness, G_TYPE_OBJECT) @@ -294,178 +280,187 @@ xfpm_brightness_xrand_down (XfpmBrightness *brightness, gint *new_level) } /* - * Begin HAL optional brightness code. - * + * Non-XRandR fallback using xfpm-backlight-helper */ -#ifdef WITH_HAL -static gboolean -xfpm_brightness_hal_get_level (XfpmBrightness *brg, gint *level) +#ifdef ENABLE_POLKIT + +static gint +xfpm_brightness_helper_get_value (const gchar *argument) { +gboolean ret; GError *error = NULL; -gboolean ret = FALSE; - -if (!brg->priv->connected) - return FALSE; - -ret = dbus_g_proxy_call (brg->priv->hal_proxy, "GetBrightness", &error, -G_TYPE_INVALID, -G_TYPE_INT, level, -G_TYPE_INVALID); - -if (error) +gchar *stdout_data = NULL; +gint exit_status = 0; +gint value = -1; +gchar *command = NULL; + +command = g_strdup_printf (SBINDIR "/xfpm-power-backlight-helper --%s", argument); +ret = g_spawn_command_line_sync (command, + &stdout_data, NULL, &exit_status, &error); +if ( !ret ) { - g_warning ("GetBrightness failed : %s\n", error->message); + g_warning ("failed to get value: %s", error->message); g_error_free (error); + goto out; } - -return ret; +g_debug ("executed %s; retval: %i", command, exit_status); +if ( exit_status != 0 ) + goto out; + +value = atoi (stdout_data); + +out: +g_free (command); +g_free (stdout_data); +return value; } static gboolean -xfpm_brightness_hal_set_level (XfpmBrightness *brg, gint level) +xfpm_brightnes
[Xfce4-commits] Fix compilation error with --disable-polkit, patch from Lierdakil, bug #6568
Updating branch refs/heads/master to 448d287873e60a46d59e8ffa347ec65aaaf5a7ca (commit) from ef267cd6ce562e65c59e55373572286c8d906545 (commit) commit 448d287873e60a46d59e8ffa347ec65aaaf5a7ca Author: Ali Abdallah Date: Sun Dec 19 20:14:09 2010 +0100 Fix compilation error with --disable-polkit, patch from Lierdakil, bug #6568 configure.ac.in |4 ++-- src/xfpm-polkit.c |2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 936c6e8..899e938 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -85,10 +85,10 @@ XDT_CHECK_PACKAGE([XRANDR],[xrandr], [xrandr_minimum_version]) AC_ARG_ENABLE([polkit], [AC_HELP_STRING([--disable-polkit], [Do not enable PolicyKit support (default=enabled)])], -[], +[ac_cv_enable_polkit=$enableval], [ac_cv_enable_polkit=polkit]) AC_MSG_CHECKING([whether to build with polkit support]) -if test "x$ac_cv_enable_polkit" = !"xyes"; then +if test "x$ac_cv_enable_polkit" = "xno"; then AC_MSG_RESULT([no]) polkit="no" else diff --git a/src/xfpm-polkit.c b/src/xfpm-polkit.c index e699e80..1d0d178 100644 --- a/src/xfpm-polkit.c +++ b/src/xfpm-polkit.c @@ -565,6 +565,8 @@ xfpm_polkit_get (void) gboolean xfpm_polkit_check_auth(XfpmPolkit *polkit, const gchar *action_id) { +#ifdef ENABLE_POLKIT xfpm_polkit_init_data (polkit); +#endif return xfpm_polkit_check_auth_intern (polkit, action_id); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 1.0.2
Updating annotated tag refs/tags/1.0.2 as new annotated tag to 70aabbf80e495669fd2a07004cf7328507901663 (tag) succeeds 1.0.1-24-gae22bd7 tagged by Ali Abdallah on 2010-12-19 12:22 + Ali Abdallah (1): Version 1.0.2 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix minimim power level value to be 1%.
Updating branch refs/heads/master to ae22bd7474e81221eb4d2372f33b90f3aa228b47 (commit) from 1fa099a888734289a23b422a90d51562649f4e87 (commit) commit ae22bd7474e81221eb4d2372f33b90f3aa228b47 Author: Ali Abdallah Date: Sun Dec 19 13:12:44 2010 +0100 Fix minimim power level value to be 1%. data/interfaces/xfpm-settings.ui |6 +++--- src/xfpm-xfconf.c|2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/interfaces/xfpm-settings.ui b/data/interfaces/xfpm-settings.ui index 78a618e..2614fb5 100644 --- a/data/interfaces/xfpm-settings.ui +++ b/data/interfaces/xfpm-settings.ui @@ -53,8 +53,8 @@ 1 -10 -5 +5 +1 20 1 @@ -129,7 +129,6 @@ center-on-parent xfpm-ac-adapter dialog -False Power manager settings @@ -1235,6 +1234,7 @@ True True ● +none adjustment9 diff --git a/src/xfpm-xfconf.c b/src/xfpm-xfconf.c index 3ac3a46..c87f2fc 100644 --- a/src/xfpm-xfconf.c +++ b/src/xfpm-xfconf.c @@ -239,7 +239,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass) NULL, NULL, 1, 20, - 10, + 5, G_PARAM_READWRITE)); /** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Version 1.0.2
Updating branch refs/heads/master to ef267cd6ce562e65c59e55373572286c8d906545 (commit) from ae22bd7474e81221eb4d2372f33b90f3aa228b47 (commit) commit ef267cd6ce562e65c59e55373572286c8d906545 Author: Ali Abdallah Date: Sun Dec 19 13:16:07 2010 +0100 Version 1.0.2 configure.ac.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 1cf592c..936c6e8 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,7 +1,7 @@ m4_define([intltool_minimum_version], [0.31]) m4_define([xfpm_version_major], [1]) m4_define([xfpm_version_minor], [0]) -m4_define([xfpm_version_micro], [1]) +m4_define([xfpm_version_micro], [2]) m4_define([xfpm_version_build], []) m4_define([xfpm_version_tag],[]) m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [git], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])]) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Avoid global shadow declaration.
Updating branch refs/heads/master to 4189b1e3f44345badaff3283f4df8431bb7f7bb8 (commit) from 4b4907b1a109f1f6e4f2d97810956f0ad48d1515 (commit) commit 4189b1e3f44345badaff3283f4df8431bb7f7bb8 Author: Ali Abdallah Date: Sun Dec 19 13:02:33 2010 +0100 Avoid global shadow declaration. common/xfpm-common.c | 10 ++-- src/egg-idletime.c | 120 +- src/xfpm-backlight.c |6 +- src/xfpm-dpms.c | 10 ++-- src/xfpm-power.c |6 +- 5 files changed, 76 insertions(+), 76 deletions(-) diff --git a/common/xfpm-common.c b/common/xfpm-common.c index cde612a..039c05c 100644 --- a/common/xfpm-common.c +++ b/common/xfpm-common.c @@ -53,16 +53,16 @@ GtkBuilder *xfpm_builder_new_from_string (const gchar *ui, GError **error) } static void -xfpm_link_browser (GtkAboutDialog *about, const gchar *link, gpointer data) +xfpm_link_browser (GtkAboutDialog *about, const gchar *linkto, gpointer data) { gchar *cmd; -cmd = g_strdup_printf ("%s %s","xdg-open", link); +cmd = g_strdup_printf ("%s %s","xdg-open", linkto); if ( !g_spawn_command_line_async (cmd, NULL) ) { g_free (cmd); - cmd = g_strdup_printf ("%s %s","xfbrowser4", link); + cmd = g_strdup_printf ("%s %s","xfbrowser4", linkto); g_spawn_command_line_async (cmd, NULL); } g_free (cmd); @@ -70,9 +70,9 @@ xfpm_link_browser (GtkAboutDialog *about, const gchar *link, gpointer data) } static void -xfpm_link_mailto (GtkAboutDialog *about, const gchar *link, gpointer data) +xfpm_link_mailto (GtkAboutDialog *about, const gchar *linkto, gpointer data) { -gchar *cmd = g_strdup_printf( "%s %s", "xdg-email", link); +gchar *cmd = g_strdup_printf( "%s %s", "xdg-email", linkto); g_spawn_command_line_async (cmd, NULL); diff --git a/src/egg-idletime.c b/src/egg-idletime.c index 1d3e579..9db5fd7 100644 --- a/src/egg-idletime.c +++ b/src/egg-idletime.c @@ -105,7 +105,7 @@ egg_idletime_get_time (EggIdletime *idletime) * egg_idletime_xsync_alarm_set: */ static void -egg_idletime_xsync_alarm_set (EggIdletime *idletime, EggIdletimeAlarm *alarm, EggIdletimeAlarmType alarm_type) +egg_idletime_xsync_alarm_set (EggIdletime *idletime, EggIdletimeAlarm *eggalarm, EggIdletimeAlarmType alarm_type) { XSyncAlarmAttributes attr; XSyncValue delta; @@ -114,9 +114,9 @@ egg_idletime_xsync_alarm_set (EggIdletime *idletime, EggIdletimeAlarm *alarm, Eg /* just remove it */ if (alarm_type == EGG_IDLETIME_ALARM_TYPE_DISABLED) { - if (alarm->xalarm) { - XSyncDestroyAlarm (idletime->priv->dpy, alarm->xalarm); - alarm->xalarm = None; + if (eggalarm->xalarm) { + XSyncDestroyAlarm (idletime->priv->dpy, eggalarm->xalarm); + eggalarm->xalarm = None; } return; } @@ -132,15 +132,15 @@ egg_idletime_xsync_alarm_set (EggIdletime *idletime, EggIdletimeAlarm *alarm, Eg attr.trigger.counter = idletime->priv->idle_counter; attr.trigger.value_type = XSyncAbsolute; attr.trigger.test_type = test; - attr.trigger.wait_value = alarm->timeout; + attr.trigger.wait_value = eggalarm->timeout; attr.delta = delta; flags = XSyncCACounter | XSyncCAValueType | XSyncCATestType | XSyncCAValue | XSyncCADelta; - if (alarm->xalarm) - XSyncChangeAlarm (idletime->priv->dpy, alarm->xalarm, flags, &attr); + if (eggalarm->xalarm) + XSyncChangeAlarm (idletime->priv->dpy, eggalarm->xalarm, flags, &attr); else - alarm->xalarm = XSyncCreateAlarm (idletime->priv->dpy, flags, &attr); + eggalarm->xalarm = XSyncCreateAlarm (idletime->priv->dpy, flags, &attr); } /** @@ -150,19 +150,19 @@ void egg_idletime_alarm_reset_all (EggIdletime *idletime) { guint i; - EggIdletimeAlarm *alarm; + EggIdletimeAlarm *eggalarm; g_return_if_fail (EGG_IS_IDLETIME (idletime)); /* reset all the alarms (except the reset alarm) to their timeouts */ for (i=1; ipriv->array->len; i++) { - alarm = g_ptr_array_index (idletime->priv->array, i); - egg_idletime_xsync_alarm_set (idletime, alarm, EGG_IDLETIME_ALARM_TYPE_POSITIVE); + eggalarm = g_ptr_array_index (idletime->priv->array, i); + egg_idletime_xsync_alarm_set (idletime, eggalarm, EGG_IDLETIME_ALARM_TYPE_POSITIVE); } /* set the reset alarm to be disabled */ - alarm = g_ptr_array_index (idletime->priv->array, 0); - egg_idletime_xsync_ala
[Xfce4-commits] Wrong data passed to callback function, fix bug #7007.
Updating branch refs/heads/master to 1fa099a888734289a23b422a90d51562649f4e87 (commit) from 4189b1e3f44345badaff3283f4df8431bb7f7bb8 (commit) commit 1fa099a888734289a23b422a90d51562649f4e87 Author: Ali Abdallah Date: Sun Dec 19 13:02:51 2010 +0100 Wrong data passed to callback function, fix bug #7007. src/xfpm-manager.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xfpm-manager.c b/src/xfpm-manager.c index b17c8f9..a91f9c2 100644 --- a/src/xfpm-manager.c +++ b/src/xfpm-manager.c @@ -523,11 +523,11 @@ void xfpm_manager_start (XfpmManager *manager) g_signal_connect (manager->priv->idle, "alarm-expired", G_CALLBACK (xfpm_manager_alarm_timeout_cb), manager); -g_signal_connect (manager->priv->conf, "notify::" ON_AC_INACTIVITY_TIMEOUT, - G_CALLBACK (xfpm_manager_set_idle_alarm_on_ac), manager); +g_signal_connect_swapped (manager->priv->conf, "notify::" ON_AC_INACTIVITY_TIMEOUT, + G_CALLBACK (xfpm_manager_set_idle_alarm_on_ac), manager); -g_signal_connect (manager->priv->conf, "notify::" ON_BATTERY_INACTIVITY_TIMEOUT, - G_CALLBACK (xfpm_manager_set_idle_alarm_on_battery), manager); +g_signal_connect_swapped (manager->priv->conf, "notify::" ON_BATTERY_INACTIVITY_TIMEOUT, + G_CALLBACK (xfpm_manager_set_idle_alarm_on_battery), manager); xfpm_manager_set_idle_alarm (manager); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix the menu position when parole is maximized.
Updating branch refs/heads/0.2.2 to 0c2c4009e840cb923d93553294e341dde37dab95 (commit) from 8e5c896915a3bf73b25b7a2ee3ff7e092989c2cd (commit) commit 0c2c4009e840cb923d93553294e341dde37dab95 Author: Ali Abdallah Date: Thu Dec 16 20:38:36 2010 +0100 Fix the menu position when parole is maximized. data/interfaces/parole.ui | 625 +++-- 1 files changed, 313 insertions(+), 312 deletions(-) diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui index c58766a..fa2d6af 100644 --- a/data/interfaces/parole.ui +++ b/data/interfaces/parole.ui @@ -118,7 +118,7 @@ True -30 +5 True @@ -139,107 +139,112 @@ True - + True - -_Media + True -True -image11 -False -True - - + + +_Media True - - -gtk-open -True -True -True - - - - - -_Open location -True -True -image17 -False - - - - - -True - - - - -gtk-quit +True +image11 +False +True + + True -True -True - + + +gtk-open +True +True +True + + + + + +_Open location +True +True +image17 +False + + + + + +True
[Xfce4-commits] Stop playing in an idle function, since it is not allowed to stop using the main thread.n
Updating branch refs/heads/0.2.2 to 95b5805d911b7d0fa2a7b13aa131efbd32eec909 (commit) from 0c2c4009e840cb923d93553294e341dde37dab95 (commit) commit 95b5805d911b7d0fa2a7b13aa131efbd32eec909 Author: Ali Abdallah Date: Thu Dec 16 20:40:07 2010 +0100 Stop playing in an idle function, since it is not allowed to stop using the main thread.n gst/parole-gst.c | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index a8673da..8b11b52 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -586,7 +586,13 @@ out: static void parole_gst_tick (ParoleGst *gst) { -if ( gst->priv->state >= GST_STATE_PAUSED ) +gboolean live; + +g_object_get (gst->priv->stream, + "live", &live, + NULL); + +if ( gst->priv->state >= GST_STATE_PAUSED && !live) { if ( gst->priv->tick_id != 0 ) { @@ -1970,18 +1976,30 @@ void parole_gst_resume (ParoleGst *gst) parole_gst_change_state (gst, GST_STATE_PLAYING); } +static gboolean +parole_gst_stop_idle (gpointer data) +{ +ParoleGst *gst; + +gst = PAROLE_GST (data); + +parole_gst_change_state (gst, GST_STATE_NULL); + +return FALSE; +} + void parole_gst_stop (ParoleGst *gst) { g_mutex_lock (gst->priv->lock); parole_stream_init_properties (gst->priv->stream); -gst->priv->target = GST_STATE_READY; - +gst->priv->target = GST_STATE_NULL; + g_mutex_unlock (gst->priv->lock); parole_window_busy_cursor (GTK_WIDGET (gst)->window); -parole_gst_change_state (gst, GST_STATE_READY); +g_idle_add ((GSourceFunc) parole_gst_stop_idle, gst); } void parole_gst_terminate (ParoleGst *gst) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Don't call gdk_flush on gdk cursor change to avoid an X error
Updating branch refs/heads/0.2.2 to 7cfd86fd23b811183954c8a6cd412b1338b27268 (commit) from b74b453d3b6c704972411cc59ead1b2f3f341774 (commit) commit 7cfd86fd23b811183954c8a6cd412b1338b27268 Author: Ali Abdallah Date: Thu Dec 16 20:34:52 2010 +0100 Don't call gdk_flush on gdk cursor change to avoid an X error common/parole-common.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/common/parole-common.c b/common/parole-common.c index f3be90d..fda2518 100644 --- a/common/parole-common.c +++ b/common/parole-common.c @@ -71,7 +71,7 @@ void parole_dialog_error (GtkWindow *parent, const gchar *title, const gchar *ms parole_dialog_show (parent, GTK_MESSAGE_ERROR, _("Error"), title, msg); } -void parole_window_busy_cursor (GdkWindow *window) +void parole_window_busy_cursor (GdkWindow *window) { GdkCursor *cursor; @@ -81,11 +81,9 @@ void parole_window_busy_cursor (GdkWindow *window) cursor = gdk_cursor_new (GDK_WATCH); gdk_window_set_cursor (window, cursor); gdk_cursor_unref (cursor); - -gdk_flush (); } -void parole_window_invisible_cursor(GdkWindow *window) +void parole_window_invisible_cursor (GdkWindow *window) { GdkBitmap *empty_bitmap; GdkCursor *cursor; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Just show the progress bar when buffering, don't show values.
Updating branch refs/heads/0.2.2 to 8e5c896915a3bf73b25b7a2ee3ff7e092989c2cd (commit) from 7cfd86fd23b811183954c8a6cd412b1338b27268 (commit) commit 8e5c896915a3bf73b25b7a2ee3ff7e092989c2cd Author: Ali Abdallah Date: Thu Dec 16 20:35:34 2010 +0100 Just show the progress bar when buffering, don't show values. src/parole-statusbar.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/parole-statusbar.c b/src/parole-statusbar.c index 70425be..425aad8 100644 --- a/src/parole-statusbar.c +++ b/src/parole-statusbar.c @@ -56,16 +56,10 @@ G_DEFINE_TYPE (ParoleStatusbar, parole_statusbar, G_TYPE_OBJECT) static void parole_statusbar_set_buffering (ParoleStatusbar *bar, gint percentage) { -gchar *buff; - -buff = g_strdup_printf ("%s %d%%", _("Buffering"), percentage); - -gtk_progress_bar_set_text (GTK_PROGRESS_BAR (bar->priv->progress), buff); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar->priv->progress), (gdouble) percentage/100); gtk_widget_hide (bar->priv->label_text); gtk_widget_hide (bar->priv->label_duration); gtk_widget_show (bar->priv->progress); -g_free (buff); } static void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Handle the new about-to-finish playbin2 signal.
Updating branch refs/heads/0.2.2 to b74b453d3b6c704972411cc59ead1b2f3f341774 (commit) from 7ac7b70286e663921092495ad8f7ca27457e26ee (commit) commit b74b453d3b6c704972411cc59ead1b2f3f341774 Author: Ali Abdallah Date: Thu Dec 16 18:23:38 2010 +0100 Handle the new about-to-finish playbin2 signal. data/interfaces/parole.ui |1 - gst/parole-gst.c | 19 ++- parole/parole-stream.h|1 + src/parole-player.c | 11 +-- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui index c60be1e..c58766a 100644 --- a/data/interfaces/parole.ui +++ b/data/interfaces/parole.ui @@ -773,7 +773,6 @@ True -2 2 5 5 diff --git a/gst/parole-gst.c b/gst/parole-gst.c index c8ff6bd..a8673da 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -897,6 +897,7 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState case GST_STATE_PLAYING: { gst->priv->media_state = PAROLE_STATE_PLAYING; + parole_gst_query_duration (gst); g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, gst->priv->stream, PAROLE_STATE_PLAYING); break; @@ -914,7 +915,6 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState if ( (media_type == PAROLE_MEDIA_TYPE_LOCAL_FILE && old == GST_STATE_READY) || media_type != PAROLE_MEDIA_TYPE_LOCAL_FILE ) { - parole_gst_query_duration (gst); parole_gst_query_capabilities (gst); parole_gst_query_info (gst); } @@ -1525,6 +1525,19 @@ parole_gst_terminate_internal (ParoleGst *gst, gboolean fade_sound) } static void +parole_gst_about_to_finish_cb (GstElement *elm, gpointer data) +{ +ParoleGst *gst; + +gst = PAROLE_GST (data); + + +g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, + gst->priv->stream, PAROLE_STATE_ABOUT_TO_FINISH); + +} + +static void parole_gst_conf_notify_cb (GObject *object, GParamSpec *spec, ParoleGst *gst) { if ( !g_strcmp0 ("vis-enabled", spec->name) || !g_strcmp0 ("vis-name", spec->name) ) @@ -1687,6 +1700,10 @@ parole_gst_constructed (GObject *object) g_signal_connect (gst->priv->playbin, "notify::source", G_CALLBACK (parole_gst_source_notify_cb), gst); + +g_signal_connect (gst->priv->playbin, "about-to-finish", + G_CALLBACK (parole_gst_about_to_finish_cb), gst); + parole_gst_update_vis (gst); parole_gst_load_logo (gst); diff --git a/parole/parole-stream.h b/parole/parole-stream.h index 157598d..46e7ef1 100644 --- a/parole/parole-stream.h +++ b/parole/parole-stream.h @@ -51,6 +51,7 @@ typedef enum { PAROLE_STATE_STOPPED = 0, PAROLE_STATE_PLAYBACK_FINISHED, +PAROLE_STATE_ABOUT_TO_FINISH, PAROLE_STATE_PAUSED, PAROLE_STATE_PLAYING diff --git a/src/parole-player.c b/src/parole-player.c index 89c92c2..55d4fee 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -581,6 +581,7 @@ out: g_free (uri); } + static void parole_player_playing (ParolePlayer *player, const ParoleStream *stream) { @@ -832,9 +833,15 @@ parole_player_media_state_cb (ParoleGst *gst, const ParoleStream *stream, Parole { parole_player_stopped (player); } -else if ( state == PAROLE_STATE_PLAYBACK_FINISHED ) +else if ( state == PAROLE_STATE_PLAYBACK_FINISHED || state == PAROLE_STATE_ABOUT_TO_FINISH) { - TRACE ("***Playback finished***"); +#ifdef DEBUG + if (state == PAROLE_STATE_PLAYBACK_FINISHED ) + TRACE ("***Playback finished***"); + else + TRACE ("***Playback about to finish***"); +#endif + parole_player_play_next (player, TRUE); } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Use taglibc if available to get the media length
Updating branch refs/heads/0.2.2 to 88c21ec6ca28e8cc7405d62270b3c100732c2997 (commit) from 2577312bc433e1112a97c0270bd7a936c52f6414 (commit) commit 88c21ec6ca28e8cc7405d62270b3c100732c2997 Author: Ali Abdallah Date: Thu Dec 16 11:00:33 2010 +0100 Use taglibc if available to get the media length gst/parole-gst.c |1 + src/parole-medialist.c |1 + src/parole-utils.c | 51 +++- src/parole-utils.h |1 + 4 files changed, 53 insertions(+), 1 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index 9f6ad9f..c8ff6bd 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -871,6 +871,7 @@ parole_gst_update_vis (ParoleGst *gst) gst->priv->update_vis = FALSE; g_free (vis_name); +gtk_widget_queue_draw (GTK_WIDGET (gst)); TRACE ("end"); } diff --git a/src/parole-medialist.c b/src/parole-medialist.c index 2981629..14f1018 100644 --- a/src/parole-medialist.c +++ b/src/parole-medialist.c @@ -215,6 +215,7 @@ parole_media_list_add (ParoleMediaList *list, ParoleFile *file, gboolean emit, g &iter, NAME_COL, parole_file_get_display_name (file), DATA_COL, file, + LENGTH_COL, parole_taglibc_get_media_length (file), -1); if ( emit || select_row ) diff --git a/src/parole-utils.c b/src/parole-utils.c index 7c9655e..3d09548 100644 --- a/src/parole-utils.c +++ b/src/parole-utils.c @@ -38,6 +38,10 @@ #include #endif +#ifdef HAVE_TAGLIBC +#include +#endif + #include #include @@ -618,7 +622,13 @@ parole_set_widget_image_from_stock (GtkWidget *widget, gchar *stock_id) } } - +/** + * parole_format_media_length: + * + * @total_seconds: lenght of the media file in seconds + * + * Returns : formated string for the media lenght + **/ gchar *parole_format_media_length (gint total_seconds) { gchar *timestring; @@ -643,3 +653,42 @@ gchar *parole_format_media_length (gint total_seconds) return timestring; } + +/** + * parole_taglibc_get_media_length: + * + * @ParoleFile: a ParoleFile + * + * Returns: the length of the media only if the file is a local + * media file. + **/ +gchar *parole_taglibc_get_media_length (ParoleFile *file) +{ +#ifdef HAVE_TAGLIBC + +TagLib_File *tag_file; + +if (g_str_has_prefix (parole_file_get_uri (file), "file:/")) +{ + tag_file = taglib_file_new (parole_file_get_file_name (file)); + + if ( tag_file ) + { + gint length = 0; + const TagLib_AudioProperties *prop = taglib_file_audioproperties (tag_file); + + length = taglib_audioproperties_length (prop); + + taglib_file_free (tag_file); + + if (length != 0) + return parole_format_media_length (length); + } +} + +#endif /* HAVE_TAGLIBC */ + +return NULL; +} + + diff --git a/src/parole-utils.h b/src/parole-utils.h index f2d49da..f5f4472 100644 --- a/src/parole-utils.h +++ b/src/parole-utils.h @@ -55,5 +55,6 @@ void parole_set_widget_image_from_stock (GtkWidget *widget, gchar *parole_format_media_length (gint total_seconds); +gchar *parole_taglibc_get_media_length (ParoleFile *file); #endif /* __PAROLE_UTILS_ */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Get rid of the old PAROLE_MEDIA_STATE enum and just use PAROLE_STATE enum .
Updating branch refs/heads/0.2.2 to cd7fd90fdc0e7415f5c35c57627d262b78820360 (commit) from 294293148da04d171f5798b6b7b982fe7db78e8f (commit) commit cd7fd90fdc0e7415f5c35c57627d262b78820360 Author: Ali Abdallah Date: Wed Dec 15 17:32:16 2010 +0100 Get rid of the old PAROLE_MEDIA_STATE enum and just use PAROLE_STATE enum . gst/parole-gst.c| 28 +- gst/parole-gst.h| 18 ++-- parole/parole-provider-player.h |9 +--- parole/parole-stream.h | 11 ++ src/parole-player.c | 40 +++--- src/parole-plugin-player.c |2 +- src/parole-statusbar.c | 24 +++--- 7 files changed, 62 insertions(+), 70 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index 9c39233..9701b35 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -72,7 +72,7 @@ struct ParoleGstPrivate GMutex *lock; GstState state; GstState target; -ParoleMediaState media_state; +ParoleState media_state; ParoleStream *stream; gulong tick_id; @@ -860,9 +860,9 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState { case GST_STATE_PLAYING: { - gst->priv->media_state = PAROLE_MEDIA_STATE_PLAYING; + gst->priv->media_state = PAROLE_STATE_PLAYING; g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, - gst->priv->stream, PAROLE_MEDIA_STATE_PLAYING); + gst->priv->stream, PAROLE_STATE_PLAYING); break; } case GST_STATE_PAUSED: @@ -890,17 +890,17 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState parole_gst_set_video_color_balance (gst); } - gst->priv->media_state = PAROLE_MEDIA_STATE_PAUSED; + gst->priv->media_state = PAROLE_STATE_PAUSED; g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, - gst->priv->stream, PAROLE_MEDIA_STATE_PAUSED); + gst->priv->stream, PAROLE_STATE_PAUSED); break; } case GST_STATE_READY: { gst->priv->buffering = FALSE; - gst->priv->media_state = PAROLE_MEDIA_STATE_STOPPED; + gst->priv->media_state = PAROLE_STATE_STOPPED; g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, - gst->priv->stream, PAROLE_MEDIA_STATE_STOPPED); + gst->priv->stream, PAROLE_STATE_STOPPED); if ( gst->priv->target == GST_STATE_PLAYING && pending < GST_STATE_PAUSED) { @@ -920,9 +920,9 @@ parole_gst_evaluate_state (ParoleGst *gst, GstState old, GstState new, GstState case GST_STATE_NULL: { gst->priv->buffering = FALSE; - gst->priv->media_state = PAROLE_MEDIA_STATE_STOPPED; + gst->priv->media_state = PAROLE_STATE_STOPPED; g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, - gst->priv->stream, PAROLE_MEDIA_STATE_STOPPED); + gst->priv->stream, PAROLE_STATE_STOPPED); break; } default: @@ -1102,9 +1102,9 @@ parole_gst_bus_event (GstBus *bus, GstMessage *msg, gpointer data) } } - gst->priv->media_state = PAROLE_MEDIA_STATE_FINISHED; + gst->priv->media_state = PAROLE_STATE_PLAYBACK_FINISHED; g_signal_emit (G_OBJECT (gst), signals [MEDIA_STATE], 0, - gst->priv->stream, PAROLE_MEDIA_STATE_FINISHED); + gst->priv->stream, PAROLE_STATE_PLAYBACK_FINISHED); break; } case GST_MESSAGE_ERROR: @@ -1702,7 +1702,7 @@ parole_gst_class_init (ParoleGstClass *klass) NULL, NULL, _gmarshal_VOID__OBJECT_ENUM, G_TYPE_NONE, 2, - PAROLE_TYPE_STREAM, GST_ENUM_TYPE_MEDIA_STATE); + PAROLE_TYPE_STREAM, PAROLE_ENUM_TYPE_STATE); signals[MEDIA_PROGRESSED] = g_signal_new ("media-progressed", @@ -1768,7 +1768,7 @@ parole_gst_init (ParoleGst *gst) gst->priv->state = GST_STATE_VOID_PENDING; gst->priv->target = GST_STATE_VOID_PENDING; -gst->priv->media_state = PAROLE_MEDIA_STATE_STOPPED; +gst->priv->media_state = PAROLE_STATE_STOPPED; gst->priv->aspect_ratio = PAROLE_ASPECT_RATIO_NONE; gst->priv->lock = g_mutex_new (); gst->priv->stream = parole_stream_new (); @@ -2000,7 +2000,7 @@ gdou
[Xfce4-commits] Fix visualisation with the new playbin2
Updating branch refs/heads/0.2.2 to 2577312bc433e1112a97c0270bd7a936c52f6414 (commit) from e7327883568b1f013f320435a7b87e3d39fb054b (commit) commit 2577312bc433e1112a97c0270bd7a936c52f6414 Author: Ali Abdallah Date: Wed Dec 15 18:31:50 2010 +0100 Fix visualisation with the new playbin2 gst/parole-gst.c| 57 +- src/parole-player.c |3 +- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index 9701b35..9f6ad9f 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -62,11 +62,26 @@ static void parole_gst_terminate_internal (ParoleGst *gst, static void parole_gst_seek_cdda_track (ParoleGst *gst, gint track); +typedef enum +{ +GST_PLAY_FLAG_VIDEO = (1 << 0), +GST_PLAY_FLAG_AUDIO = (1 << 1), +GST_PLAY_FLAG_TEXT = (1 << 2), +GST_PLAY_FLAG_VIS = (1 << 3), +GST_PLAY_FLAG_SOFT_VOLUME = (1 << 4), +GST_PLAY_FLAG_NATIVE_AUDIO = (1 << 5), +GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 6), +GST_PLAY_FLAG_DOWNLOAD = (1 << 7), +GST_PLAY_FLAG_BUFFERING = (1 << 8), +GST_PLAY_FLAG_DEINTERLACE = (1 << 9) + +} GstPlayFlags; + struct ParoleGstPrivate { GstElement *playbin; GstElement *video_sink; -GstElement *vis_sink; + GstBus *bus; GMutex *lock; @@ -87,6 +102,7 @@ struct ParoleGstPrivate gboolean update_vis; gboolean with_vis; +gboolean vis_loaded; gboolean buffering; gboolean update_color_balance; @@ -494,16 +510,15 @@ parole_gst_expose_event (GtkWidget *widget, GdkEventExpose *ev) switch ( gst->priv->state ) { case GST_STATE_PLAYING: - if ( playing_video || gst->priv->with_vis) + if ( playing_video || gst->priv->vis_loaded) { - printf ("Testing v=%d vis=%d\n", playing_video, gst->priv->with_vis); gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink)); } else parole_gst_draw_logo (gst); break; case GST_STATE_PAUSED: - if ( playing_video || gst->priv->with_vis || gst->priv->target == GST_STATE_PLAYING ) + if ( playing_video || gst->priv->vis_loaded || gst->priv->target == GST_STATE_PLAYING ) gst_x_overlay_expose (GST_X_OVERLAY (gst->priv->video_sink)); else parole_gst_draw_logo (gst); @@ -809,7 +824,8 @@ static void parole_gst_update_vis (ParoleGst *gst) { gchar *vis_name; - +gint flags; + TRACE ("start"); g_object_get (G_OBJECT (gst->priv->conf), @@ -818,22 +834,41 @@ parole_gst_update_vis (ParoleGst *gst) NULL); TRACE ("Vis name %s enabled %d\n", vis_name, gst->priv->with_vis); - + +g_object_get (G_OBJECT (gst->priv->playbin), + "flags", &flags, + NULL); + if ( gst->priv->with_vis ) { - gst->priv->vis_sink = gst_element_factory_make (vis_name, "vis"); - g_object_set (G_OBJECT (gst->priv->playbin), - "vis-plugin", gst->priv->vis_sink, - NULL); + GstElement *vis_sink; + flags |= GST_PLAY_FLAG_VIS; + + vis_sink = gst_element_factory_make (vis_name, "vis"); + + if (vis_sink) + { + g_object_set (G_OBJECT (gst->priv->playbin), + "vis-plugin", vis_sink, +NULL); + + gst->priv->vis_loaded = TRUE; + } } else { + flags &= ~GST_PLAY_FLAG_VIS; g_object_set (G_OBJECT (gst->priv->playbin), "vis-plugin", NULL, NULL); gtk_widget_queue_draw (GTK_WIDGET (gst)); + gst->priv->vis_loaded = FALSE; } +g_object_set (G_OBJECT (gst->priv->playbin), + "flags", flags, + NULL); + gst->priv->update_vis = FALSE; g_free (vis_name); TRACE ("end"); @@ -1775,7 +1810,6 @@ parole_gst_init (ParoleGst *gst) gst->priv->tick_id = 0; gst->priv->hidecursor_timer = g_timer_new (); gst->priv->update_vis = FALSE; -gst->priv->vis_sink = NULL; gst->priv->buffering = FALSE; gst->priv->update_color_balance = TRUE; gst->priv->state_change_id = 0; @@ -1783,6 +1817,7 @@ parole_gst_init (ParoleGst *gst) gst->priv->enable_tags = TRUE; gst->
[Xfce4-commits] Correctly handle window minimize
Updating branch refs/heads/0.2.2 to e7327883568b1f013f320435a7b87e3d39fb054b (commit) from cd7fd90fdc0e7415f5c35c57627d262b78820360 (commit) commit e7327883568b1f013f320435a7b87e3d39fb054b Author: Ali Abdallah Date: Wed Dec 15 17:56:58 2010 +0100 Correctly handle window minimize data/interfaces/parole.ui |5 - src/parole-conf.c | 12 ++-- src/parole-player.c | 27 --- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui index 0eaf552..dce5250 100644 --- a/data/interfaces/parole.ui +++ b/data/interfaces/parole.ui @@ -687,7 +687,7 @@ -100 +80 2 True True @@ -697,6 +697,9 @@ +False +False +end 5 diff --git a/src/parole-conf.c b/src/parole-conf.c index d45a64f..f5f1bbc 100644 --- a/src/parole-conf.c +++ b/src/parole-conf.c @@ -65,6 +65,7 @@ enum PROP_ASPECT_RATIO, PROP_WINDOW_WIDTH, PROP_WINDOW_HEIGHT, +PROP_MINIMIZED, PROP_MULTIMEDIA_KEYS, /*Playlist*/ PROP_REPLACE_PLAYLIST, @@ -248,6 +249,13 @@ parole_conf_class_init (ParoleConfClass *klass) G_PARAM_READWRITE)); g_object_class_install_property (object_class, + PROP_MINIMIZED, + g_param_spec_boolean ("minimized", + NULL, NULL, + FALSE, + G_PARAM_READWRITE)); + +g_object_class_install_property (object_class, PROP_SUBTITLE_FONT, g_param_spec_string ("subtitle-font", NULL, NULL, @@ -315,7 +323,7 @@ parole_conf_class_init (ParoleConfClass *klass) PROP_WINDOW_WIDTH, g_param_spec_int ("window-width", NULL, NULL, - 320, + 100, G_MAXINT16, 760, G_PARAM_READWRITE)); @@ -324,7 +332,7 @@ parole_conf_class_init (ParoleConfClass *klass) PROP_WINDOW_HEIGHT, g_param_spec_int ("window-height", NULL, NULL, - 220, + 100, G_MAXINT16, 420, G_PARAM_READWRITE)); diff --git a/src/parole-player.c b/src/parole-player.c index 599bdd0..47f495f 100644 --- a/src/parole-player.c +++ b/src/parole-player.c @@ -949,19 +949,29 @@ parole_player_range_value_changed (GtkRange *range, ParolePlayer *player) void parole_player_minimize_clicked_cb (GtkWidget *widget, ParolePlayer *player) { - if ( player->minimized ) { + gint w, h; + + g_object_get (G_OBJECT (player->conf), + "window-width", &w, + "window-height", &h, + NULL); + + gtk_window_resize (GTK_WINDOW(player->window), w, h); + gtk_widget_show (GTK_WIDGET (player->gst)); gtk_widget_show (GTK_WIDGET (player->video_view)); gtk_widget_show (GTK_WIDGET (player->sidebar)); gtk_widget_show (player->show_hide_playlist); parole_set_widget_image_from_stock (player->min_view, GTK_STOCK_REMOVE); - player->minimized = FAL
[Xfce4-commits] Fix the query of a video capability for playbin2, since the previous commit parole uses playbin2, which has a cleaner API.
Updating branch refs/heads/0.2.2 to 294293148da04d171f5798b6b7b982fe7db78e8f (commit) from 07e68468448bcd8c19c5b00655c86c13c44c3450 (commit) commit 294293148da04d171f5798b6b7b982fe7db78e8f Author: Ali Abdallah Date: Wed Dec 15 16:56:08 2010 +0100 Fix the query of a video capability for playbin2, since the previous commit parole uses playbin2, which has a cleaner API. gst/parole-gst.c | 78 ++--- 1 files changed, 27 insertions(+), 51 deletions(-) diff --git a/gst/parole-gst.c b/gst/parole-gst.c index b20cc6c..9c39233 100644 --- a/gst/parole-gst.c +++ b/gst/parole-gst.c @@ -757,68 +757,44 @@ parole_gst_get_pad_capabilities (GObject *object, GParamSpec *pspec, ParoleGst * static void parole_gst_query_info (ParoleGst *gst) { -const GList *info = NULL; -GObject *obj; -GParamSpec *pspec; -GEnumValue *val; -gint type; -gboolean has_video = FALSE; +GstPad *videopad = NULL; + +gint n_audio, n_video, i; g_object_get (G_OBJECT (gst->priv->playbin), - "stream-info", &info, + "n-audio", &n_audio, + "n-video", &n_video, NULL); -for ( ; info != NULL; info = info->next ) + +g_object_set (G_OBJECT (gst->priv->stream), + "has-video", (n_video > 0), + "has-audio", (n_audio > 0), + NULL); + +if (n_video > 0) { - obj = info->data; - - g_object_get (obj, - "type", &type, - NULL); - - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (obj), "type"); - val = g_enum_get_value (G_PARAM_SPEC_ENUM (pspec)->enum_class, type); - - if ( g_ascii_strcasecmp (val->value_name, "video") == 0 || -g_ascii_strcasecmp (val->value_nick, "video") == 0) - { - GstPad *pad = NULL; + for (i = 0; i < n_video && videopad == NULL; i++) + g_signal_emit_by_name (gst->priv->playbin, "get-video-pad", i, &videopad); - g_object_get (G_OBJECT (obj), - "object", &pad, - NULL); + if (videopad) + { + GstCaps *caps; - if ( pad ) + if ((caps = gst_pad_get_negotiated_caps (videopad))) { - if ( GST_IS_PAD (pad) && GST_PAD_CAPS (pad) ) - { - parole_gst_get_pad_capabilities (G_OBJECT (pad), NULL, gst); - } - else - { - g_signal_connect (pad, "notify::caps", - G_CALLBACK (parole_gst_get_pad_capabilities), - gst); - } - g_object_unref (pad); + parole_gst_get_pad_capabilities (G_OBJECT (videopad), NULL, gst); + g_object_unref (caps); } - TRACE ("Stream has video"); - g_object_set (G_OBJECT (gst->priv->stream), - "has-video", TRUE, - NULL); - has_video = TRUE; - } - if ( g_ascii_strcasecmp (val->value_name, "audio") == 0 || -g_ascii_strcasecmp (val->value_nick, "audio") == 0) - { - TRACE ("Stream has audio"); - g_object_set (G_OBJECT (gst->priv->stream), - "has-audio", TRUE, - NULL); + + g_signal_connect (videopad, "notify::caps", + G_CALLBACK (parole_gst_get_pad_capabilities), + gst); + g_object_unref (videopad); } } - -if ( !has_video ) + +if ( n_video == 0 ) gtk_widget_queue_draw (GTK_WIDGET (gst)); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Lot of changes with respect to the new interface...
Updating branch refs/heads/0.2.2 to 07e68468448bcd8c19c5b00655c86c13c44c3450 (commit) from 82783c4d4aa882b1e7ff3263e921b42d0b9926c3 (commit) commit 07e68468448bcd8c19c5b00655c86c13c44c3450 Author: Ali Abdallah Date: Wed Dec 15 16:25:17 2010 +0100 Lot of changes with respect to the new interface... configure.ac.in |2 - data/interfaces/Makefile.am |3 + data/interfaces/parole-fullscreen.ui | 60 data/interfaces/parole.ui| 61 +++-- gst/Makefile.am |6 +- gst/parole-gst-iface.c | 108 - gst/parole-gst-iface.h | 70 -- gst/parole-gst.c | 158 ++- gst/parole-gst.h |3 +- src/parole-medialist.c | 35 +++- src/parole-medialist.h |8 ++- src/parole-player.c | 174 -- src/parole-utils.c | 46 + src/parole-utils.h |6 + 14 files changed, 344 insertions(+), 396 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 9b628f8..10eb67b 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -247,8 +247,6 @@ plugins/properties/Makefile plugins/tray/Makefile plugins/window-title/Makefile plugins/power-manager/Makefile -browser-plugin/Makefile -browser-plugin/media-plugin/Makefile docs/Makefile docs/plugin-api/version.xml docs/plugin-api/Makefile diff --git a/data/interfaces/Makefile.am b/data/interfaces/Makefile.am index c1450b6..7256030 100644 --- a/data/interfaces/Makefile.am +++ b/data/interfaces/Makefile.am @@ -2,6 +2,7 @@ interfaces =\ parole.ui \ parole-settings.ui \ playlist.ui \ + parole-fullscreen.ui\ mediachooser.ui \ save-playlist.ui\ plugins.ui \ @@ -34,6 +35,8 @@ plugins_ui.h: plugins.ui open-location_ui.h: open-location.ui exo-csource --static --strip-comments --strip-content --name=open_location_ui $< > $@ +parole-fullscreen_ui.h: parole-fullscreen.ui + exo-csource --static --strip-comments --strip-content --name=parole_fullscreen_ui $< > $@ endif diff --git a/data/interfaces/parole-fullscreen.ui b/data/interfaces/parole-fullscreen.ui new file mode 100644 index 000..10b1d85 --- /dev/null +++ b/data/interfaces/parole-fullscreen.ui @@ -0,0 +1,60 @@ + + + + + +popup +center +south-west + + +True +vertical + + + + + +True + + +True + + + + + +False +False +0 + + + + +True + + + + + +1 + + + + + + + + + + +False +False +1 + + + + + + + diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui index c1d6994..0eaf552 100644 --- a/data/interfaces/parole.ui +++ b/data/interfaces/parole.ui @@ -96,13 +96,12 @@ False -True +False True -2 True @@ -317,7 +316,7 @@ True - + True None True @@ -326,7 +325,7 @@ - + True Auto True @@ -
[Xfce4-commits] Creating annotated tag 1.0.1
Updating annotated tag refs/tags/1.0.1 as new annotated tag to 95725f97096cbfb559b8c1d2df9f4ad8b64f186a (tag) succeeds 1.0.0 tagged by Ali Abdallah on 2010-08-30 09:18 + Ali Abdallah (1): Start polkit daemon at startup if it is not running otherwise the power manager ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix old lixfcegui4 inlude+remove consolekit cookie subject, and use only PID subject for polkit auth detection.
Updating branch refs/heads/master to 17f616d957f6ab7be0d61487babb582b53ed2459 (commit) from c917631c9b15ef3a151cf35a0484ea9576fbcff8 (commit) commit 17f616d957f6ab7be0d61487babb582b53ed2459 Author: Ali Abdallah Date: Thu Aug 12 10:55:04 2010 +0200 Fix old lixfcegui4 inlude+remove consolekit cookie subject, and use only PID subject for polkit auth detection. configure.ac.in |6 +++--- panel-plugins/brightness/brightness-button.c |2 +- src/xfpm-polkit.c| 15 +++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 50727af..b4856fe 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,7 +1,7 @@ m4_define([intltool_minimum_version], [0.31]) -m4_define([xfpm_version_major], [0]) -m4_define([xfpm_version_minor], [9]) -m4_define([xfpm_version_micro], [98]) +m4_define([xfpm_version_major], [1]) +m4_define([xfpm_version_minor], [0]) +m4_define([xfpm_version_micro], [0]) m4_define([xfpm_version_build], []) m4_define([xfpm_version_tag],[]) m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [git], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])]) diff --git a/panel-plugins/brightness/brightness-button.c b/panel-plugins/brightness/brightness-button.c index 8c4998b..5693372 100644 --- a/panel-plugins/brightness/brightness-button.c +++ b/panel-plugins/brightness/brightness-button.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include "common/xfpm-common.h" #include "common/xfpm-icons.h" diff --git a/src/xfpm-polkit.c b/src/xfpm-polkit.c index a14bf33..e18bea9 100644 --- a/src/xfpm-polkit.c +++ b/src/xfpm-polkit.c @@ -213,9 +213,9 @@ xfpm_polkit_free_data (gpointer data) static void xfpm_polkit_init_data (XfpmPolkit *polkit) { -const gchar *consolekit_cookie; +//const gchar *consolekit_cookie; GValue hash_elem = { 0 }; -gboolean subject_created = FALSE; +//gboolean subject_created = FALSE; if (polkit->priv->subject_valid) return; @@ -226,6 +226,10 @@ xfpm_polkit_init_data (XfpmPolkit *polkit) * it is set by the session manager (4.8 and above) * since we don't have a login manager, yet! **/ + /* + * + *Disable for the moment + * consolekit_cookie = g_getenv ("XDG_SESSION_COOKIE"); if ( consolekit_cookie ) @@ -240,6 +244,7 @@ xfpm_polkit_init_data (XfpmPolkit *polkit) "/org/freedesktop/ConsoleKit/Manager", "org.freedesktop.ConsoleKit.Manager", NULL); + if ( proxy ) { ret = dbus_g_proxy_call (proxy, "GetSessionForCookie", &error, @@ -280,9 +285,11 @@ xfpm_polkit_init_data (XfpmPolkit *polkit) g_warning ("'GetSessionForCookie' failed : %s", error->message); g_error_free (error); } + } - -if ( subject_created == FALSE ) +*/ + +//if ( subject_created == FALSE ) { gint pid; guint64 start_time; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Start polkit daemon at startup if it is not running otherwise the power manager may fail to get suspend/hibernate polkit authorization.
Updating branch refs/heads/master to 5fab7afbb7bf25f721ef5ac26ae0b9c726b65cb7 (commit) from 17f616d957f6ab7be0d61487babb582b53ed2459 (commit) commit 5fab7afbb7bf25f721ef5ac26ae0b9c726b65cb7 Author: Ali Abdallah Date: Mon Aug 30 11:16:51 2010 +0200 Start polkit daemon at startup if it is not running otherwise the power manager may fail to get suspend/hibernate polkit authorization. configure.ac.in |2 +- src/xfpm-polkit.c | 12 +--- src/xfpm-power-info.c |4 +++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index b4856fe..0c1802e 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,7 +1,7 @@ m4_define([intltool_minimum_version], [0.31]) m4_define([xfpm_version_major], [1]) m4_define([xfpm_version_minor], [0]) -m4_define([xfpm_version_micro], [0]) +m4_define([xfpm_version_micro], [1]) m4_define([xfpm_version_build], []) m4_define([xfpm_version_tag],[]) m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [git], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])]) diff --git a/src/xfpm-polkit.c b/src/xfpm-polkit.c index e18bea9..e699e80 100644 --- a/src/xfpm-polkit.c +++ b/src/xfpm-polkit.c @@ -494,11 +494,10 @@ xfpm_polkit_init (XfpmPolkit *polkit) #ifdef ENABLE_POLKIT polkit->priv->proxy = - dbus_g_proxy_new_for_name_owner (polkit->priv->bus, -"org.freedesktop.PolicyKit1", - "/org/freedesktop/PolicyKit1/Authority", -"org.freedesktop.PolicyKit1.Authority", -&error); + dbus_g_proxy_new_for_name (polkit->priv->bus, + "org.freedesktop.PolicyKit1", + "/org/freedesktop/PolicyKit1/Authority", + "org.freedesktop.PolicyKit1.Authority"); if (G_LIKELY (polkit->priv->proxy) ) { @@ -508,8 +507,7 @@ xfpm_polkit_init (XfpmPolkit *polkit) } else { - g_warning ("Failed to create proxy for 'org.freedesktop.PolicyKit1' : %s", error->message); - g_error_free (error); + g_warning ("Failed to create proxy for 'org.freedesktop.PolicyKit1'"); } #endif /*ENABLE_POLKIT*/ diff --git a/src/xfpm-power-info.c b/src/xfpm-power-info.c index b2f6ea2..5922bdf 100644 --- a/src/xfpm-power-info.c +++ b/src/xfpm-power-info.c @@ -683,6 +683,7 @@ xfpm_info_update_wakeups (XfpmInfo *info) } g_ptr_array_free (array, TRUE); + } static gboolean @@ -776,6 +777,7 @@ xfpm_info_cpu_wakeups (XfpmInfo *info) xfpm_info_update_wakeups (info); +xfpm_info_update_wakeups (info); g_timeout_add_seconds (4, (GSourceFunc) xfpm_info_update_wakeups_idle, info); gtk_widget_show (vbox); @@ -818,7 +820,7 @@ xfpm_info_create (XfpmInfo *info) GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); - +gtk_window_set_position (GTK_WINDOW (info->dialog), GTK_WIN_POS_CENTER_ALWAYS); gtk_window_set_default_size (GTK_WINDOW (info->dialog), -1, 400); gtk_window_set_icon_name (GTK_WINDOW (info->dialog), GTK_STOCK_INFO); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 1.0.0
Updating annotated tag refs/tags/1.0.0 as new annotated tag to 0cf5531c92e04a1afcf4ee298c0244b3e0ef44b7 (tag) succeeds 0.9.98-12-gc917631 tagged by Ali Abdallah on 2010-08-12 08:55 + Ali Abdallah (1): Fix old lixfcegui4 inlude+remove consolekit cookie subject, and use only PID ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Update POTFILES.in
Updating branch refs/heads/master to b197db96284a0c0e9514253d780e5909e2ce9ff6 (commit) from a318c6f625353ccbbaf3d9a5d0bb0b68cc2cc1b7 (commit) commit b197db96284a0c0e9514253d780e5909e2ce9ff6 Author: Ali Abdallah Date: Sun May 30 20:50:55 2010 +0200 Update POTFILES.in po/POTFILES.in |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index 4942d87..b975ec1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -33,5 +33,3 @@ plugins/window-title/window-title-provider.c plugins/window-title/window-title-provider.h plugins/window-title/window-title.desktop.in plugins/power-manager/power-manager.desktop.in -browser-plugin/media-plugin/main.c -browser-plugin/media-plugin/parole-plugin-player.c ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Prepare 0.9.98
Updating branch refs/heads/master to d79bc32401a342af381425d8a20678ce7f83b936 (commit) from 132c617743dbeed0c7e7cea0b6cb5c4a65b815f1 (commit) commit d79bc32401a342af381425d8a20678ce7f83b936 Author: Ali Abdallah Date: Wed May 19 11:22:51 2010 +0200 Prepare 0.9.98 configure.ac.in |7 +++ src/Makefile.am |6 ++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index bdbe8b0..50727af 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,9 +1,9 @@ m4_define([intltool_minimum_version], [0.31]) m4_define([xfpm_version_major], [0]) m4_define([xfpm_version_minor], [9]) -m4_define([xfpm_version_micro], [90]) -m4_define([xfpm_version_build], [...@revision@]) -m4_define([xfpm_version_tag],[git]) +m4_define([xfpm_version_micro], [98]) +m4_define([xfpm_version_build], []) +m4_define([xfpm_version_tag],[]) m4_define([xfpm_version], [xfpm_version_major().xfpm_version_minor().xfpm_version_micro()ifelse(xfpm_version_tag(), [git], [xfpm_version_tag().xfpm_version_build()], [xfpm_version_tag()])]) AC_INIT([xfce4-power-manager], [xfpm_version], [http://bugzilla.xfce.org/]) @@ -60,7 +60,6 @@ m4_define([libxfce4panel_minimum_version],[4.6.0]) m4_define([libnotify_minimum_version], [0.4.1]) m4_define([xrandr_minimum_version], [1.2.0]) -m4_define([polkit_minimum_version], [0.91]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [gtk_minimum_version]) XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [glib_minimum_version]) diff --git a/src/Makefile.am b/src/Makefile.am index 8685f8c..8f6a505 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -55,7 +55,6 @@ xfce4_power_manager_CFLAGS =\ $(XFCONF_CFLAGS)\ $(LIBNOTIFY_CFLAGS) \ $(XRANDR_CFLAGS)\ - $(POLKIT_CFLAGS)\ $(DPMS_CFLAGS) xfce4_power_manager_LDADD = \ @@ -68,7 +67,6 @@ xfce4_power_manager_LDADD = \ $(XFCONF_LIBS) \ $(LIBNOTIFY_LIBS) \ $(XRANDR_LIBS) \ - $(POLKIT_LIBS) \ $(DPMS_LIBS) xfce4_power_information_SOURCES = \ @@ -99,8 +97,6 @@ manpage_DATA = xfce4-power-manager.1 xfpm_glib_headers = \ $(srcdir)/xfpm-enum-glib.h -if MAINTAINER_MODE - BUILT_SOURCES =\ xfce-power-manager-dbus-server.h\ xfce-power-manager-dbus-client.h\ @@ -111,6 +107,8 @@ BUILT_SOURCES = \ org.freedesktop.PowerManagement.h \ org.freedesktop.PowerManagement.Inhibit.h +if MAINTAINER_MODE + xfpm-enum-types.h: $(xfpm_glib_headers) ( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef _XFPM_ENUM_TYPES_H\n#define _XFPM_ENUM_TYPES_H\n#include \nG_BEGIN_DECLS\n" \ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 0.9.98
Updating annotated tag refs/tags/0.9.98 as new annotated tag to 59b1499f2deaf04736571c884a3b11f58d692c14 (tag) succeeds 0.9.90-72-g132c617 tagged by Ali Abdallah on 2010-05-19 09:23 + Ali Abdallah (1): Prepare 0.9.98 ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix a typo in hal sleeps enums...
Updating branch refs/heads/master to f5ad4be540697590c2a298b5eabbe1671bf86333 (commit) from f5cb0d88cc507af669b4f1788a75139a9b422ded (commit) commit f5ad4be540697590c2a298b5eabbe1671bf86333 Author: Ali Abdallah Date: Sat May 8 18:59:02 2010 +0200 Fix a typo in hal sleeps enums... xfce4-session/xfsm-shutdown-helper.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xfce4-session/xfsm-shutdown-helper.c b/xfce4-session/xfsm-shutdown-helper.c index 949223d..ed687a0 100644 --- a/xfce4-session/xfsm-shutdown-helper.c +++ b/xfce4-session/xfsm-shutdown-helper.c @@ -1858,7 +1858,7 @@ gboolean xfsm_shutdown_helper_suspend (XfsmShutdownHelper *helper, GError **erro #endif #ifdef ENABLE_HAL - if ( helper->sleep_backend == XFSM_SHUTDOWN_BACKEND_HAL ) + if ( helper->sleep_backend == XFSM_SLEEP_BACKEND_HAL ) { return xfsm_shutdown_helper_hal_send (helper, "Suspend", error); } @@ -1885,7 +1885,7 @@ gboolean xfsm_shutdown_helper_hibernate (XfsmShutdownHelper *helper, GError **er #endif #ifdef ENABLE_HAL - if ( helper->sleep_backend == XFSM_SHUTDOWN_BACKEND_HAL ) + if ( helper->sleep_backend == XFSM_SLEEP_BACKEND_HAL ) { return xfsm_shutdown_helper_hal_send (helper, "Hibernate", error); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Patch from Jerome to fix compilation issue cause by libxfcegui4 removal.
Updating branch refs/heads/master to 8722d56f4731afa2ef593975603f0162d4ebdb95 (commit) from e02894947b3a5e2ac4e7789d97798a83a4aa59e8 (commit) commit 8722d56f4731afa2ef593975603f0162d4ebdb95 Author: Ali Abdallah Date: Thu Apr 8 20:18:50 2010 +0200 Patch from Jerome to fix compilation issue cause by libxfcegui4 removal. panel-plugins/brightness/Makefile.am |4 ++-- panel-plugins/brightness/brightness-button.c | 20 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/panel-plugins/brightness/Makefile.am b/panel-plugins/brightness/Makefile.am index 4832205..c849096 100644 --- a/panel-plugins/brightness/Makefile.am +++ b/panel-plugins/brightness/Makefile.am @@ -12,14 +12,14 @@ xfce4_brightness_plugin_CFLAGS =\ -DLOCALEDIR=\"$(localedir)\"\ $(LIBXFCE4PANEL_CFLAGS) \ $(LIBXFCE4UTIL_CFLAGS) \ - $(LIBXFCE4GUI_CFLAGS) \ + $(LIBXFCE4UI_CFLAGS)\ $(GTK_CFLAGS) \ $(GLIB_CFLAGS) xfce4_brightness_plugin_LDADD =\ $(top_builddir)/common/libxfpmcommon.la \ $(LIBXFCE4PANEL_LIBS) \ - $(LIBXFCE4GUI_LIBS) \ + $(LIBXFCE4UI_LIBS) \ $(LIBXFCE4UTIL_LIBS)\ $(GTK_LIBS) \ $(GLIB_LIBS) diff --git a/panel-plugins/brightness/brightness-button.c b/panel-plugins/brightness/brightness-button.c index b6e1893..8c4998b 100644 --- a/panel-plugins/brightness/brightness-button.c +++ b/panel-plugins/brightness/brightness-button.c @@ -558,18 +558,22 @@ brightness_button_set_icon (BrightnessButton *button, gint width) gboolean hw_found; GdkPixbuf *pixbuf; const gchar *icon_name; - + hw_found = xfpm_brightness_has_hw (button->priv->brightness); - + icon_name = hw_found ? XFPM_DISPLAY_BRIGHTNESS_ICON : XFPM_DISPLAY_BRIGHTNESS_INVALID_ICON; - -pixbuf = xfce_themed_icon_load (icon_name, width); - + +pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), + icon_name, + width, + GTK_ICON_LOOKUP_FORCE_SIZE, + NULL); + if ( pixbuf ) { - gtk_image_set_from_pixbuf (GTK_IMAGE (button->priv->image), pixbuf); - g_object_unref (pixbuf); - return TRUE; +gtk_image_set_from_pixbuf (GTK_IMAGE (button->priv->image), pixbuf); +g_object_unref (pixbuf); +return TRUE; } return FALSE; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix a typo in upower interfrace name
Updating branch refs/heads/master to 2e3a5cc0badfd674e053aa60feabd2585bb357c4 (commit) from 03c12f674dee2b1c41d483fe286a25c924a976c2 (commit) commit 2e3a5cc0badfd674e053aa60feabd2585bb357c4 Author: Ali Abdallah Date: Thu Apr 8 10:19:51 2010 +0200 Fix a typo in upower interfrace name xfce4-session/xfsm-shutdown-helper.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xfce4-session/xfsm-shutdown-helper.c b/xfce4-session/xfsm-shutdown-helper.c index 1f5b0c3..949223d 100644 --- a/xfce4-session/xfsm-shutdown-helper.c +++ b/xfce4-session/xfsm-shutdown-helper.c @@ -691,7 +691,7 @@ xfsm_shutdown_helper_check_devkit_upower (XfsmShutdownHelper *helper) /* Check for upower first */ name = "org.freedesktop.UPower"; path = "/org/freedesktop/UPower"; - iface = "org.freedesktop.Power"; + iface = "org.freedesktop.UPower"; helper->devkit_is_upower = TRUE; @@ -1461,7 +1461,7 @@ xfsm_shutdown_helper_upower_sleep (XfsmShutdownHelper *helper, { name = "org.freedesktop.UPower"; path = "/org/freedesktop/UPower"; - iface = "org.freedesktop.Power"; + iface = "org.freedesktop.UPower"; } else { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Okay, since udisks/upower both now have releases with no API break (in xfpm pov), i'm going to rely just on these two daemons, since having xfpm handling d
Updating branch refs/heads/master to 9e00d74faf9a7757adaf3a407977e1eccc539bb8 (commit) from c15f43c16010d394c494d9fbe7136c1d12e62662 (commit) commit 9e00d74faf9a7757adaf3a407977e1eccc539bb8 Author: Ali Abdallah Date: Thu Mar 18 11:07:40 2010 +0100 Okay, since udisks/upower both now have releases with no API break (in xfpm pov), i'm going to rely just on these two daemons, since having xfpm handling devkit/upower presence on runtime was a bad idea, because xfpm needs to be always connected to these daemons, so there is no easy way to do it. Xfpm, requires now upower and udisks in order to work, consolekit (optional) dependeny will be removed also. Hopefully things will go stable in the regard of upower/udisk, so we can finally concentrate on usuability issues. src/xfpm-disks.c| 34 ++- src/xfpm-power-common.h | 25 +++- src/xfpm-power-info.c | 69 - src/xfpm-power.c| 153 -- 4 files changed, 40 insertions(+), 241 deletions(-) diff --git a/src/xfpm-disks.c b/src/xfpm-disks.c index 5fc31f4..3f9f986 100644 --- a/src/xfpm-disks.c +++ b/src/xfpm-disks.c @@ -51,9 +51,6 @@ struct XfpmDisksPrivate gchar *cookie; gboolean set; gboolean can_spin; - - -gboolean is_udisks; }; G_DEFINE_TYPE (XfpmDisks, xfpm_disks, G_TYPE_OBJECT) @@ -165,7 +162,7 @@ xfpm_disks_get_is_auth_to_spin (XfpmDisks *disks) { const gchar *action_id; -action_id = disks->priv->is_udisks ? "org.freedesktop.udisks.drive-set-spindown" : "org.freedesktop.devicekit.disks.drive-set-spindown"; +action_id = "org.freedesktop.udisks.drive-set-spindown"; disks->priv->can_spin = xfpm_polkit_check_auth (disks->priv->polkit, action_id); @@ -188,7 +185,6 @@ xfpm_disks_init (XfpmDisks *disks) disks->priv->cookie = NULL; disks->priv->polkit = NULL; -disks->priv->is_udisks = FALSE; disks->priv->bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); @@ -199,31 +195,11 @@ xfpm_disks_init (XfpmDisks *disks) goto out; } -disks->priv->proxy = dbus_g_proxy_new_for_name_owner (disks->priv->bus, - "org.freedesktop.UDisks", - "/org/freedesktop/UDisks", - "org.freedesktop.UDisks", - NULL); +disks->priv->proxy = dbus_g_proxy_new_for_name (disks->priv->bus, + "org.freedesktop.UDisks", + "/org/freedesktop/UDisks", + "org.freedesktop.UDisks"); -if ( !disks->priv->proxy ) -{ - g_message ("UDisks not found, trying devkit-disks"); - disks->priv->proxy = dbus_g_proxy_new_for_name_owner (disks->priv->bus, - "org.freedesktop.DeviceKit.Disks", - "/org/freedesktop/DeviceKit/Disks", - "org.freedesktop.DeviceKit.Disks", - NULL); -} -else -{ - disks->priv->is_udisks = TRUE; -} - -if ( !disks->priv->proxy ) -{ - g_warning ("Unable to create proxy for 'org.freedesktop.DeviceKit.Disks'"); - goto out; -} disks->priv->conf = xfpm_xfconf_new (); disks->priv->power = xfpm_power_get (); diff --git a/src/xfpm-power-common.h b/src/xfpm-power-common.h index 914441c..d5b5518 100644 --- a/src/xfpm-power-common.h +++ b/src/xfpm-power-common.h @@ -23,26 +23,19 @@ #include -#define DKP_NAME"org.freedesktop.DeviceKit.Power" -#define DKP_PATH"/org/freedesktop/DeviceKit/Power" +#define UPOWER_NAME "org.freedesktop.UPower" +#define UPOWER_PATH "/org/freedesktop/UPower" -#define DKP_IFACE "org.freedesktop.DeviceKit.Power" -#define DKP_IFACE_DEVICE "org.freedesktop.DeviceKit.Power.Device" -#define DKP_PATH_DEVICE "/org/freedesktop/DeviceKit/Power/devices/" +#define UPOWER_IFACE "org.freedesktop.UPower" +#define UPOWER_IFACE_DEVICE "org.freedesktop.UPower.Device" +#define UPOWER_PATH_DEVICE"/org/freedesktop/UPowe
[Xfce4-commits] Added png icons.
Updating branch refs/heads/0.8-hal-based to c05aabc0f0efdc4fb2e53214e263ecae78013eb3 (commit) from b25c5a58c688476e70244980005fa596611ab59f (commit) commit c05aabc0f0efdc4fb2e53214e263ecae78013eb3 Author: Ali Abdallah Date: Tue Mar 2 18:22:19 2010 +0100 Added png icons. configure.ac.in| 15 +- data/icons/{scalable => 16x16}/Makefile.am |0 data/icons/16x16/actions/Makefile.am |8 +++ data/icons/16x16/actions/xfpm-hibernate.png| Bin 0 -> 685 bytes data/icons/16x16/actions/xfpm-suspend.png | Bin 0 -> 801 bytes data/icons/16x16/status/Makefile.am| 49 data/icons/16x16/status/xfpm-ac-adapter.png| Bin 0 -> 719 bytes .../16x16/status/xfpm-brightness-lcd-invalid.png | Bin 0 -> 546 bytes data/icons/16x16/status/xfpm-brightness-lcd.png| Bin 0 -> 546 bytes data/icons/16x16/status/xfpm-keyboard-000.png | Bin 0 -> 670 bytes data/icons/16x16/status/xfpm-keyboard-030.png | Bin 0 -> 683 bytes data/icons/16x16/status/xfpm-keyboard-060.png | Bin 0 -> 696 bytes data/icons/16x16/status/xfpm-keyboard-100.png | Bin 0 -> 679 bytes data/icons/16x16/status/xfpm-mouse-000.png | Bin 0 -> 718 bytes data/icons/16x16/status/xfpm-mouse-030.png | Bin 0 -> 732 bytes data/icons/16x16/status/xfpm-mouse-060.png | Bin 0 -> 737 bytes data/icons/16x16/status/xfpm-mouse-100.png | Bin 0 -> 710 bytes data/icons/16x16/status/xfpm-phone-000.png | Bin 0 -> 833 bytes data/icons/16x16/status/xfpm-phone-030.png | Bin 0 -> 846 bytes data/icons/16x16/status/xfpm-phone-060.png | Bin 0 -> 834 bytes data/icons/16x16/status/xfpm-phone-100.png | Bin 0 -> 796 bytes .../16x16/status/xfpm-primary-000-charging.png | Bin 0 -> 911 bytes data/icons/16x16/status/xfpm-primary-000.png | Bin 0 -> 648 bytes .../16x16/status/xfpm-primary-020-charging.png | Bin 0 -> 915 bytes data/icons/16x16/status/xfpm-primary-020.png | Bin 0 -> 662 bytes .../16x16/status/xfpm-primary-040-charging.png | Bin 0 -> 915 bytes data/icons/16x16/status/xfpm-primary-040.png | Bin 0 -> 644 bytes .../16x16/status/xfpm-primary-060-charging.png | Bin 0 -> 913 bytes data/icons/16x16/status/xfpm-primary-060.png | Bin 0 -> 645 bytes .../16x16/status/xfpm-primary-080-charging.png | Bin 0 -> 914 bytes data/icons/16x16/status/xfpm-primary-080.png | Bin 0 -> 623 bytes .../16x16/status/xfpm-primary-100-charging.png | Bin 0 -> 924 bytes data/icons/16x16/status/xfpm-primary-100.png | Bin 0 -> 601 bytes data/icons/16x16/status/xfpm-primary-charged.png | Bin 0 -> 1404 bytes data/icons/16x16/status/xfpm-primary-missing.png | Bin 0 -> 810 bytes data/icons/16x16/status/xfpm-ups-000-charging.png | Bin 0 -> 586 bytes data/icons/16x16/status/xfpm-ups-000.png | Bin 0 -> 522 bytes data/icons/16x16/status/xfpm-ups-020-charging.png | Bin 0 -> 612 bytes data/icons/16x16/status/xfpm-ups-020.png | Bin 0 -> 544 bytes data/icons/16x16/status/xfpm-ups-040-charging.png | Bin 0 -> 605 bytes data/icons/16x16/status/xfpm-ups-040.png | Bin 0 -> 547 bytes data/icons/16x16/status/xfpm-ups-060-charging.png | Bin 0 -> 622 bytes data/icons/16x16/status/xfpm-ups-060.png | Bin 0 -> 565 bytes data/icons/16x16/status/xfpm-ups-080-charging.png | Bin 0 -> 587 bytes data/icons/16x16/status/xfpm-ups-080.png | Bin 0 -> 533 bytes data/icons/16x16/status/xfpm-ups-100-charging.png | Bin 0 -> 604 bytes data/icons/16x16/status/xfpm-ups-100.png | Bin 0 -> 527 bytes data/icons/16x16/status/xfpm-ups-charged.png | Bin 0 -> 744 bytes data/icons/16x16/status/xfpm-ups-missing.png | Bin 0 -> 694 bytes data/icons/{scalable => 24x24}/Makefile.am |0 data/icons/24x24/actions/Makefile.am |8 +++ data/icons/24x24/actions/xfpm-hibernate.png| Bin 0 -> 1035 bytes data/icons/24x24/actions/xfpm-suspend.png | Bin 0 -> 1031 bytes data/icons/24x24/status/Makefile.am| 49 data/icons/24x24/status/xfpm-ac-adapter.png| Bin 0 -> 1170 bytes .../24x24/status/xfpm-brightness-lcd-invalid.png | Bin 0 -> 1876 bytes data/icons/24x24/status/xfpm-brightness-lcd.png| Bin 0 -> 1160 bytes data/icons/24x24/status/xfpm-keyboard-000.png | Bin 0 -> 1073 bytes data/icons/24x24/status/xfpm-keyboard-030.png | Bin 0 -> 1087 bytes data/icons/24x24/status/xfpm-keyboard-060.png | Bin 0 -> 1099 bytes data/icons/24x24/status/xfpm-keyboard-100.png | Bin 0 -> 1067 bytes data/icons/24x24/status/xfpm-mouse-000.png | B
[Xfce4-commits] Handle weired negative brightness level reported by HAL on some systems.
Updating branch refs/heads/0.8-hal-based to b25c5a58c688476e70244980005fa596611ab59f (commit) from ae4f70d52bbc098c2cec5de1d1b979eb0bff87ac (commit) commit b25c5a58c688476e70244980005fa596611ab59f Author: Ali Abdallah Date: Tue Mar 2 18:21:00 2010 +0100 Handle weired negative brightness level reported by HAL on some systems. src/xfpm-brightness-hal.c | 30 +++--- src/xfpm-brightness-hal.h |4 ++-- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/xfpm-brightness-hal.c b/src/xfpm-brightness-hal.c index 0b0c7d3..7b0c051 100644 --- a/src/xfpm-brightness-hal.c +++ b/src/xfpm-brightness-hal.c @@ -61,9 +61,9 @@ struct XfpmBrightnessHalPrivate XfpmAdapter *adapter; XfpmScreenSaver *saver; -guint max_level; -guint hw_level; -guint step; +gintmax_level; +ginthw_level; +gintstep; gbooleanbrightness_in_hw; gbooleanhw_found; gbooleanblock; @@ -180,6 +180,16 @@ xfpm_brightness_hal_read_hal_level (XfpmBrightnessHal *brg) g_warning ("Error getting brightness level: %s\n", error->message); g_error_free (error); } + +/* + * Sometimes HAL send us negative values, it seems to be + * a bug in rounding in bash shell + */ +if (brg->priv->hw_level < 0) +{ + g_warning ("Negative value returned by HAL, assuming 0"); + brg->priv->hw_level = 0; +} } static gboolean @@ -231,7 +241,6 @@ xfpm_brightness_hal_up (XfpmBrightnessHal *brg) signal: xfpm_brightness_hal_read_hal_level (brg); - if ( show_popup ) g_signal_emit (G_OBJECT (brg), signals [BRIGHTNESS_UP], 0, brg->priv->hw_level); } @@ -248,7 +257,7 @@ xfpm_brightness_hal_down (XfpmBrightnessHal *brg) if ( enable_brightness == FALSE || brg->priv->brightness_in_hw) goto signal; - + if ( brg->priv->hw_level != 0) { TRACE("Brightness key down"); @@ -257,7 +266,6 @@ xfpm_brightness_hal_down (XfpmBrightnessHal *brg) signal: xfpm_brightness_hal_read_hal_level (brg); - if ( show_popup ) g_signal_emit (G_OBJECT (brg), signals [BRIGHTNESS_UP], 0, brg->priv->hw_level); } @@ -281,7 +289,7 @@ static void xfpm_brightness_hal_reset_cb (EggIdletime *idle, XfpmBrightnessHal *brg) { GError *error = NULL; -guint level; +gint level; if (brg->priv->block) return; @@ -309,7 +317,7 @@ static void xfpm_brightness_timeout_on_ac (XfpmBrightnessHal *brg) { GError *error = NULL; -guint level; +gint level; if ( brg->priv->on_battery ) return; @@ -336,7 +344,7 @@ static void xfpm_brightness_timeout_on_battery (XfpmBrightnessHal *brg) { GError *error = NULL; -guint level; +gint level; if ( !brg->priv->on_battery ) return; @@ -579,14 +587,14 @@ gboolean xfpm_brightness_hal_has_hw (XfpmBrightnessHal *brg) return brg->priv->hw_found; } -void xfpm_brightness_hal_update_level (XfpmBrightnessHal *brg, guint level) +void xfpm_brightness_hal_update_level (XfpmBrightnessHal *brg, gint level) { g_return_if_fail (XFPM_IS_BRIGHTNESS_HAL (brg)); brg->priv->hw_level = level; } -guint xfpm_brightness_hal_get_max_level (XfpmBrightnessHal *brg) +gint xfpm_brightness_hal_get_max_level (XfpmBrightnessHal *brg) { g_return_val_if_fail (XFPM_IS_BRIGHTNESS_HAL (brg), 0); diff --git a/src/xfpm-brightness-hal.h b/src/xfpm-brightness-hal.h index b574677..c7b25dc 100644 --- a/src/xfpm-brightness-hal.h +++ b/src/xfpm-brightness-hal.h @@ -56,9 +56,9 @@ XfpmBrightnessHal *xfpm_brightness_hal_new (void); gbooleanxfpm_brightness_hal_has_hw (XfpmBrightnessHal *brg) G_GNUC_PURE; voidxfpm_brightness_hal_update_level (XfpmBrightnessHal *brg, - guint level); + gint level); -guint xfpm_brightness_hal_get_max_level (XfpmBrightnessHal *brg) G_GNUC_PURE; +gintxfpm_brightness_hal_get_max_level (XfpmBrightnessHal *brg) G_GNUC_PURE; G_END_DECLS #endif /* __XFPM_BRIGHTNESS_HAL_H */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating annotated tag 0.8.5
Updating annotated tag refs/tags/0.8.5 as new annotated tag to 70b72c0cba92b9467944464207cad360ae92b415 (tag) succeeds 0.8.4.2-14-gb25c5a5 tagged by Ali Abdallah on 2010-03-02 17:22 + Ali Abdallah (1): Added png icons. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Using dbus_g_proxy_new_for_name_owner when the session tries to figure out which backend to use for sleep/hibernate is a bad idea, since the name
Updating branch refs/heads/aliov/hal-deprecation to cc24525d892e010771da1a0754d695371e63f3a8 (commit) from 2edf92df6b1acfe3b43e8cadd61672ab45000997 (commit) commit cc24525d892e010771da1a0754d695371e63f3a8 Author: Ali Abdallah Date: Wed Feb 10 16:50:03 2010 +0100 Using dbus_g_proxy_new_for_name_owner when the session tries to figure out which backend to use for sleep/hibernate is a bad idea, since the name might not have an owner, using dbus_g_proxy_new_for_name always returns a valid proxy for that name, so when calling a method on the proxy the bus will activate the service if it is not already running and was provided by a .service file. xfce4-session/xfsm-shutdown-helper.c | 204 -- 1 files changed, 119 insertions(+), 85 deletions(-) diff --git a/xfce4-session/xfsm-shutdown-helper.c b/xfce4-session/xfsm-shutdown-helper.c index 79e223d..1f5b0c3 100644 --- a/xfce4-session/xfsm-shutdown-helper.c +++ b/xfce4-session/xfsm-shutdown-helper.c @@ -336,12 +336,11 @@ xfsm_shutdown_helper_init_polkit_data (XfsmShutdownHelper *helper) gboolean subject_created = FALSE; helper->polkit_proxy = -dbus_g_proxy_new_for_name_owner (helper->system_bus, -"org.freedesktop.PolicyKit1", -"/org/freedesktop/PolicyKit1/Authority", -"org.freedesktop.PolicyKit1.Authority", -NULL); - +dbus_g_proxy_new_for_name (helper->system_bus, + "org.freedesktop.PolicyKit1", + "/org/freedesktop/PolicyKit1/Authority", + "org.freedesktop.PolicyKit1.Authority"); + if ( !helper->polkit_proxy ) return FALSE; @@ -360,11 +359,11 @@ xfsm_shutdown_helper_init_polkit_data (XfsmShutdownHelper *helper) gboolean ret; gchar *consolekit_session; - proxy = dbus_g_proxy_new_for_name_owner (helper->system_bus, - "org.freedesktop.ConsoleKit", - "/org/freedesktop/ConsoleKit/Manager", - "org.freedesktop.ConsoleKit.Manager", - NULL); + proxy = dbus_g_proxy_new_for_name (helper->system_bus, + "org.freedesktop.ConsoleKit", + "/org/freedesktop/ConsoleKit/Manager", + "org.freedesktop.ConsoleKit.Manager"); + if ( proxy ) { ret = dbus_g_proxy_call (proxy, "GetSessionForCookie", &error, @@ -395,13 +394,13 @@ xfsm_shutdown_helper_init_polkit_data (XfsmShutdownHelper *helper) g_free (consolekit_session); subject_created = TRUE; } + else if (error) + { + g_warning ("'GetSessionForCookie' failed : %s", error->message); + g_error_free (error); + } g_object_unref (proxy); } - else if (error) - { - g_warning ("'GetSessionForCookie' failed : %s", error->message); - g_error_free (error); - } } /** @@ -612,17 +611,65 @@ error0: return FALSE; } +#ifdef ENABLE_UPOWER /** - * xfsm_shutdown_helper_check_upower: + * xfsm_shutdown_helper_get_power_props: + * + **/ +static GHashTable * +xfsm_shutdown_helper_get_power_props (XfsmShutdownHelper *helper, + const gchar *name, + const gchar *path, + const gchar *iface) +{ + DBusGProxy *proxy_prop; + GHashTable *props; + GType g_type_hash_map; + GError *error = NULL; + + proxy_prop = dbus_g_proxy_new_for_name (helper->system_bus, + name, + path, + DBUS_INTERFACE_PROPERTIES); + + if ( !proxy_prop ) +{ + g_warning ("Unable to create proxy for %s", name); + return NULL; +} + + /* The Hash table is a pair of (strings, GValues) */ + g_type_hash_map = dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE); + + dbus_g_proxy_call (proxy_prop, "GetAll", &error, +G_TYPE_STRING, iface, +G_TYPE_INVALID, +g_type_hash_map, &props, +G_TYPE_INVALID); + + g_object_unref (proxy_prop); + + if ( error ) +{ + g_warning ("Method 'GetAll' failed : %s",
[Xfce4-commits] Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager
Updating branch refs/heads/master to 3e079cad8b69c4a2bf3af83a0a6f59ffeb8b215a (commit) from 26fd1a273a67a660e28c1be75aa77399d450807c (commit) commit 3e079cad8b69c4a2bf3af83a0a6f59ffeb8b215a Merge: 26fd1a273a67a660e28c1be75aa77399d450807c dfd6af12c2d62f33da6b3e0846a25572674d4a0a Author: Ali Abdallah Date: Thu Feb 4 17:51:18 2010 +0100 Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-power-manager commit dfd6af12c2d62f33da6b3e0846a25572674d4a0a Author: Masato Hashimoto Date: Thu Feb 4 10:19:13 2010 +0100 l10n: Updated Japanese (ja) translation to 100% New status: 202 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/ja.po | 297 -- 1 files changed, 155 insertions(+), 142 deletions(-) diff --git a/po/ja.po b/po/ja.po index dd064f3..c3748d2 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: xfce4-power-manager 0.6.0svn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-30 22:17+0900\n" -"PO-Revision-Date: 2010-01-30 23:33+0900\n" +"POT-Creation-Date: 2010-02-04 18:12+0900\n" +"PO-Revision-Date: 2010-02-04 18:12+0900\n" "Last-Translator: Masato Hashimoto \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" @@ -49,8 +49,8 @@ msgstr "コンピュータが低電力状態にあるとみなす充電率:" #: ../data/interfaces/xfpm-settings.ui.h:8 ../settings/xfpm-settings.c:789 #: ../settings/xfpm-settings.c:857 ../settings/xfpm-settings.c:995 #: ../settings/xfpm-settings.c:1160 ../settings/xfpm-settings.c:1215 -#: ../settings/xfpm-settings.c:1265 ../src/xfpm-power.c:508 -#: ../src/xfpm-power.c:769 +#: ../settings/xfpm-settings.c:1265 ../src/xfpm-power.c:524 +#: ../src/xfpm-power.c:785 msgid "Hibernate" msgstr "ハイバネート" @@ -58,7 +58,7 @@ msgstr "ハイバネート" msgid "Lock screen when going for suspend/hibernate" msgstr "サスペンド/ハイバネートへ遷移中に画面をロックする" -#: ../data/interfaces/xfpm-settings.ui.h:10 ../src/xfpm-power-common.c:131 +#: ../data/interfaces/xfpm-settings.ui.h:10 ../src/xfpm-power-common.c:132 msgid "Monitor" msgstr "モニタ" @@ -118,8 +118,8 @@ msgstr "スタンバイ" #: ../data/interfaces/xfpm-settings.ui.h:23 ../settings/xfpm-settings.c:783 #: ../settings/xfpm-settings.c:851 ../settings/xfpm-settings.c:989 #: ../settings/xfpm-settings.c:1154 ../settings/xfpm-settings.c:1209 -#: ../settings/xfpm-settings.c:1259 ../src/xfpm-power.c:523 -#: ../src/xfpm-power.c:782 +#: ../settings/xfpm-settings.c:1259 ../src/xfpm-power.c:539 +#: ../src/xfpm-power.c:798 msgid "Suspend" msgstr "サスペンド" @@ -153,8 +153,8 @@ msgid "When sleep button is pressed:" msgstr "スリープボタンが押されたとき:" #: ../data/interfaces/xfpm-settings.ui.h:31 -#: ../settings/xfpm-settings-main.c:121 ../src/xfpm-power.c:585 -#: ../src/xfpm-power.c:756 ../src/xfpm-main.c:418 +#: ../settings/xfpm-settings-main.c:121 ../src/xfpm-power.c:601 +#: ../src/xfpm-power.c:772 ../src/xfpm-main.c:418 #: ../src/xfce4-power-manager.desktop.in.h:2 msgid "Xfce Power Manager" msgstr "Xfce 電源管理" @@ -205,7 +205,7 @@ msgid "Hibernate and suspend operations not permitted" msgstr "ハイバネートおよびサスペンド操作が許可されていません" #: ../settings/xfpm-settings.c:795 ../settings/xfpm-settings.c:1166 -#: ../src/xfpm-power.c:795 +#: ../src/xfpm-power.c:811 msgid "Shutdown" msgstr "シャットダウン" @@ -296,7 +296,7 @@ msgid "SOCKET ID" msgstr "SOCKET ID" #: ../settings/xfpm-settings-main.c:89 ../src/xfpm-main.c:294 -#: ../src/xfpm-power-info.c:947 +#: ../src/xfpm-power-info.c:991 #, c-format msgid "Type '%s --help' for usage." msgstr "'%s --help' で使用方法を表示します。" @@ -338,7 +338,7 @@ msgstr "Xfce 4 電源管理" msgid "translator-credits" msgstr "Masato Hashimoto " -#: ../src/xfpm-power.c:298 +#: ../src/xfpm-power.c:314 msgid "" "Xfce Power Manager requires version 011 of devicekit-power to work properly " "while the version found is" @@ -346,16 +346,16 @@ msgstr "" "Xfce 電源管理を正常に動作させるためには devicekit-power バージョン 011 以降が" "必要です。現在のバージョン :" -#: ../src/xfpm-power.c:303 ../src/xfpm-power.c:309 +#: ../src/xfpm-power.c:319 ../src/xfpm-power.c:325 msgid "Devicekit-power version 011 or above not found" msgstr "DeviceKit-power バージョン 011 以降が見つかりませんでした。" -#: ../src/xfpm-power.c:365 ../src/xfpm-power.c:720 ../src/xfpm-power.c:908 -#: ../src/xfpm-power.c:922 ../src/xfpm-battery.c:227 +#: ../src/xfpm-power.c:381 ../src/xfpm-power.c:736 ../src/xfpm-power.c:924 +#: ../src/xfpm-power.c:938 ../src/xfpm-battery.c:229 msgid "Xfce power manager&quo
[Xfce4-commits] Fix Has lid property that was shown twice with --dump.
Updating branch refs/heads/master to 26fd1a273a67a660e28c1be75aa77399d450807c (commit) from 87970320d0522c40c258d758dc5d8900e46825fe (commit) commit 26fd1a273a67a660e28c1be75aa77399d450807c Author: Ali Abdallah Date: Thu Feb 4 17:50:40 2010 +0100 Fix Has lid property that was shown twice with --dump. src/xfpm-main.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/xfpm-main.c b/src/xfpm-main.c index 3caa3da..6ae06a1 100644 --- a/src/xfpm-main.c +++ b/src/xfpm-main.c @@ -141,10 +141,7 @@ xfpm_dump (GHashTable *hash) "%s: %s\n" "%s: %s\n" "%s: %s\n" - "%s: %s\n" "%s: %s\n", -_("Has LID"), -xfpm_bool_to_local_string (has_lid), _("Can suspend"), xfpm_bool_to_local_string (can_suspend), _("Can hibernate"), ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix configure.in.in polkit variable.
Updating branch refs/heads/master to 87970320d0522c40c258d758dc5d8900e46825fe (commit) from 523e5864893a465ec91fb1af7139272b6b80e7d2 (commit) commit 87970320d0522c40c258d758dc5d8900e46825fe Author: Ali Abdallah Date: Wed Feb 3 14:18:36 2010 +0100 Fix configure.in.in polkit variable. configure.ac.in |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 2176a20..bdbe8b0 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -86,9 +86,11 @@ AC_ARG_ENABLE([polkit], AC_MSG_CHECKING([whether to build with polkit support]) if test "x$ac_cv_enable_polkit" = !"xyes"; then AC_MSG_RESULT([no]) +polkit="no" else AC_MSG_RESULT([yes]) AC_DEFINE(ENABLE_POLKIT, 1 , [PolicyKit support]) +polkit="yes" fi #===# @@ -245,7 +247,7 @@ echo " prefix: ${prefix} xdg autostart: ${sysconfdir/xdg/autostart} HAL:${enable_hal} - POLKIT: ${ac_cv_enable_polkit} + POLKIT: ${polkit} DPMS: ${have_dpms} Network manager:${ac_network_manager} Build panel plugins:${build_panel_plugins} ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Fix a typo for system bus ckeck.
Updating branch refs/heads/aliov/hal-deprecation to 2edf92df6b1acfe3b43e8cadd61672ab45000997 (commit) from f0b7814ec07b05a24dbe609f9e38408a341855df (commit) commit 2edf92df6b1acfe3b43e8cadd61672ab45000997 Author: Ali Abdallah Date: Wed Feb 3 18:21:47 2010 +0100 Fix a typo for system bus ckeck. xfce4-session/xfsm-manager.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c index cf8f902..e0dcdf4 100644 --- a/xfce4-session/xfsm-manager.c +++ b/xfce4-session/xfsm-manager.c @@ -257,7 +257,7 @@ xfsm_manager_init (XfsmManager *manager) #ifdef ENABLE_CONSOLE_KIT manager->system_bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); - if ( G_LIKELY (manager->system_bus == NULL) ) + if ( G_LIKELY (manager->system_bus != NULL) ) { xfsm_manager_consolekit_init (manager); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Don't depend on libpolkit-gobject, instead use dbus-glib to get authorization information directly from polkitd
Updating branch refs/heads/master to c933b8cfc97a09d788856f175592272da1d09c5d (commit) from bcb39852b82c6263a8bbe9312421be3534f5b45a (commit) commit c933b8cfc97a09d788856f175592272da1d09c5d Author: Ali Abdallah Date: Wed Feb 3 13:40:35 2010 +0100 Don't depend on libpolkit-gobject, instead use dbus-glib to get authorization information directly from polkitd configure.ac.in| 19 ++- src/Makefile.am|4 +- src/xfpm-console-kit.c |9 +- src/xfpm-disks.c | 18 +- src/xfpm-main.c|2 +- src/xfpm-polkit.c | 461 +++- src/xfpm-power.c | 20 +- 7 files changed, 462 insertions(+), 71 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index 19b7f93..2176a20 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -75,8 +75,21 @@ XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0],[libxfce4util_minimum_versi XDT_CHECK_PACKAGE([LIBNOTIFY],[libnotify], [libnotify_minimum_version]) XDT_CHECK_PACKAGE([XRANDR],[xrandr], [xrandr_minimum_version]) -POLKIT="no" -XDT_CHECK_OPTIONAL_PACKAGE([POLKIT], [polkit-gobject-1], [polkit_minimum_version], [polkit], [Polkit support]) +#===# +# Polkit? # +#===# +AC_ARG_ENABLE([polkit], +[AC_HELP_STRING([--disable-polkit], +[Do not enable PolicyKit support (default=enabled)])], +[], +[ac_cv_enable_polkit=polkit]) +AC_MSG_CHECKING([whether to build with polkit support]) +if test "x$ac_cv_enable_polkit" = !"xyes"; then +AC_MSG_RESULT([no]) +else +AC_MSG_RESULT([yes]) +AC_DEFINE(ENABLE_POLKIT, 1 , [PolicyKit support]) +fi #===# # Use HAL?# @@ -232,7 +245,7 @@ echo " prefix: ${prefix} xdg autostart: ${sysconfdir/xdg/autostart} HAL:${enable_hal} - POLKIT: ${POLKIT_FOUND} + POLKIT: ${ac_cv_enable_polkit} DPMS: ${have_dpms} Network manager:${ac_network_manager} Build panel plugins:${build_panel_plugins} diff --git a/src/Makefile.am b/src/Makefile.am index 9792b33..8685f8c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -99,6 +99,8 @@ manpage_DATA = xfce4-power-manager.1 xfpm_glib_headers = \ $(srcdir)/xfpm-enum-glib.h +if MAINTAINER_MODE + BUILT_SOURCES =\ xfce-power-manager-dbus-server.h\ xfce-power-manager-dbus-client.h\ @@ -109,8 +111,6 @@ BUILT_SOURCES = \ org.freedesktop.PowerManagement.h \ org.freedesktop.PowerManagement.Inhibit.h -if MAINTAINER_MODE - xfpm-enum-types.h: $(xfpm_glib_headers) ( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef _XFPM_ENUM_TYPES_H\n#define _XFPM_ENUM_TYPES_H\n#include \nG_BEGIN_DECLS\n" \ diff --git a/src/xfpm-console-kit.c b/src/xfpm-console-kit.c index cffc8b5..775d219 100644 --- a/src/xfpm-console-kit.c +++ b/src/xfpm-console-kit.c @@ -140,10 +140,11 @@ xfpm_console_kit_init (XfpmConsoleKit *console) goto out; } -console->priv->proxy = dbus_g_proxy_new_for_name (console->priv->bus, - "org.freedesktop.ConsoleKit", - "/org/freedesktop/ConsoleKit/Manager", - "org.freedesktop.ConsoleKit.Manager"); +console->priv->proxy = dbus_g_proxy_new_for_name_owner (console->priv->bus, + "org.freedesktop.ConsoleKit", + "/org/freedesktop/ConsoleKit/Manager", + "org.freedesktop.ConsoleKit.Manager", + NULL); if ( !console->priv->proxy ) { diff --git a/src/xfpm-disks.c b/src/xfpm-disks.c index dbceaad..e9f36f1 100644 --- a/src/xfpm-disks.c +++ b/src/xfpm-disks.c @@ -190,18 +190,20 @@ xfpm_disks_init (XfpmDisks *disks) goto out; } -disks->priv->proxy = dbus_g_proxy_new_for_name (disks->priv->bus, - "org.freedesktop.UDisks", - "/org/
[Xfce4-commits] Fix polkit data clean up timeout.
Updating branch refs/heads/master to 1eb850ae435a284bbd891851286d90768346ef92 (commit) from c933b8cfc97a09d788856f175592272da1d09c5d (commit) commit 1eb850ae435a284bbd891851286d90768346ef92 Author: Ali Abdallah Date: Wed Feb 3 13:47:54 2010 +0100 Fix polkit data clean up timeout. src/xfpm-polkit.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xfpm-polkit.c b/src/xfpm-polkit.c index cfe65aa..a14bf33 100644 --- a/src/xfpm-polkit.c +++ b/src/xfpm-polkit.c @@ -340,11 +340,10 @@ xfpm_polkit_init_data (XfpmPolkit *polkit) g_str_equal, g_free, g_free); - -/*Clean these data after 2 minutes*/ +/*Clean these data after 1 minute*/ polkit->priv->destroy_id = - g_timeout_add_seconds (2, (GSourceFunc) xfpm_polkit_free_data, polkit); + g_timeout_add_seconds (60, (GSourceFunc) xfpm_polkit_free_data, polkit); polkit->priv->subject_valid = TRUE; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Make sure which polkit action_id to use for disks spinning down, (udisks, of devkit-disks).
Updating branch refs/heads/master to 523e5864893a465ec91fb1af7139272b6b80e7d2 (commit) from 1eb850ae435a284bbd891851286d90768346ef92 (commit) commit 523e5864893a465ec91fb1af7139272b6b80e7d2 Author: Ali Abdallah Date: Wed Feb 3 13:48:16 2010 +0100 Make sure which polkit action_id to use for disks spinning down, (udisks, of devkit-disks). src/xfpm-disks.c | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/xfpm-disks.c b/src/xfpm-disks.c index e9f36f1..5fc31f4 100644 --- a/src/xfpm-disks.c +++ b/src/xfpm-disks.c @@ -51,6 +51,9 @@ struct XfpmDisksPrivate gchar *cookie; gboolean set; gboolean can_spin; + + +gboolean is_udisks; }; G_DEFINE_TYPE (XfpmDisks, xfpm_disks, G_TYPE_OBJECT) @@ -160,8 +163,12 @@ xfpm_disks_set_spin_timeouts (XfpmDisks *disks) static void xfpm_disks_get_is_auth_to_spin (XfpmDisks *disks) { +const gchar *action_id; + +action_id = disks->priv->is_udisks ? "org.freedesktop.udisks.drive-set-spindown" : "org.freedesktop.devicekit.disks.drive-set-spindown"; + disks->priv->can_spin = xfpm_polkit_check_auth (disks->priv->polkit, - "org.freedesktop.devicekit.disks.drive-set-spindown"); + action_id); XFPM_DEBUG ("Is auth to spin down disks : %d", disks->priv->can_spin); } @@ -177,9 +184,11 @@ xfpm_disks_init (XfpmDisks *disks) disks->priv->bus= NULL; disks->priv->proxy = NULL; disks->priv->conf = NULL; -disks->priv->power= NULL; +disks->priv->power = NULL; disks->priv->cookie = NULL; disks->priv->polkit = NULL; + +disks->priv->is_udisks = FALSE; disks->priv->bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error); @@ -189,7 +198,7 @@ xfpm_disks_init (XfpmDisks *disks) g_error_free (error); goto out; } - + disks->priv->proxy = dbus_g_proxy_new_for_name_owner (disks->priv->bus, "org.freedesktop.UDisks", "/org/freedesktop/UDisks", @@ -205,6 +214,10 @@ xfpm_disks_init (XfpmDisks *disks) "org.freedesktop.DeviceKit.Disks", NULL); } +else +{ + disks->priv->is_udisks = TRUE; +} if ( !disks->priv->proxy ) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits