Changeset e3cc7b23a6aba21796577ff44a9a3f9d855080cb
- Timestamp:
- 07/22/09 23:26:25 (3 years ago)
- Author:
- Leo Antunes <leo@…>
- Children:
- d1a41d2b9e8293b7310d616fd8ccd24ddf38d9be
- Parents:
- c5606aa8a15998dd28faee8a3141cb8ac83b8d24
- git-committer:
- Leo Antunes <leo@…> (07/22/09 23:26:25)
- Message:
-
KScreensaver support + close DBus on load error
- support KScreensaver (thanks Daniel Eckl for pointing out
that it indeed DOES use DBus)
- correct description to include current functionality
- avoid dangling DBus connection on error during load
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rc5606aa
|
re3cc7b2
|
|
| | 1 | Version 0.4 (2009-07-22): |
| | 2 | |
| | 3 | - support KScreensaver (thanks Daniel Eckl for pointing out |
| | 4 | that it indeed DOES use DBus) |
| | 5 | - correct description to include current functionality |
| | 6 | - avoid dangling DBus connection on error during load |
| | 7 | |
| 1 | 8 | Version 0.3 (2009-07-19): |
| 2 | 9 | |
-
|
reac542b
|
re3cc7b2
|
|
| 21 | 21 | #define PURPLE_PLUGINS |
| 22 | 22 | |
| 23 | | #define AWAYONLOCK_VERSION "0.3" |
| | 23 | #define AWAYONLOCK_VERSION "0.4" |
| 24 | 24 | #define AWAYONLOCK_PLUGIN_ID "core-costela-awayonlock" |
| 25 | 25 | |
| … |
… |
|
| 48 | 48 | |
| 49 | 49 | static gboolean plugin_load(PurplePlugin *plugin) { |
| | 50 | DBusGProxy *dbus_proxy_gnome = NULL; |
| 50 | 51 | DBusGProxy *dbus_proxy = NULL; |
| 51 | 52 | GError *error = NULL; |
| … |
… |
|
| 65 | 66 | |
| 66 | 67 | /* |
| 67 | | * Gnome-screensaver specific stuff |
| 68 | | */ |
| 69 | | dbus_proxy = dbus_g_proxy_new_for_name( dbus_conn, |
| | 68 | * Gnome-screensaver 2.26 specific stuff |
| | 69 | */ |
| | 70 | dbus_proxy_gnome = dbus_g_proxy_new_for_name( dbus_conn, |
| 70 | 71 | "org.gnome.ScreenSaver", |
| 71 | 72 | "/org/gnome/ScreenSaver", |
| … |
… |
|
| 73 | 74 | ); |
| 74 | 75 | |
| | 76 | if(dbus_proxy_gnome == NULL) { |
| | 77 | purple_debug(PURPLE_DEBUG_ERROR, PACKAGE, N_("failed to get DBus proxy\n")); |
| | 78 | purple_notify_error(plugin, "Away-on-lock", _("Failed to create a DBus Proxy."), NULL); |
| | 79 | dbus_g_connection_unref(dbus_conn); |
| | 80 | return FALSE; |
| | 81 | } |
| | 82 | |
| | 83 | dbus_g_proxy_add_signal( dbus_proxy_gnome, |
| | 84 | "ActiveChanged", |
| | 85 | G_TYPE_BOOLEAN, |
| | 86 | G_TYPE_INVALID |
| | 87 | ); |
| | 88 | |
| | 89 | dbus_g_proxy_connect_signal( dbus_proxy_gnome, |
| | 90 | "ActiveChanged", |
| | 91 | G_CALLBACK(awayonlock_idle_changed_callback), |
| | 92 | NULL, |
| | 93 | NULL |
| | 94 | ); |
| | 95 | /* |
| | 96 | * END Gnome-screensaver specific stuff |
| | 97 | */ |
| | 98 | |
| | 99 | /* |
| | 100 | * freedesktop stuff |
| | 101 | */ |
| | 102 | dbus_proxy = dbus_g_proxy_new_for_name( dbus_conn, |
| | 103 | "org.freedesktop.ScreenSaver", |
| | 104 | "/ScreenSaver", |
| | 105 | "org.freedesktop.ScreenSaver" |
| | 106 | ); |
| | 107 | |
| 75 | 108 | if(dbus_proxy == NULL) { |
| 76 | 109 | purple_debug(PURPLE_DEBUG_ERROR, PACKAGE, N_("failed to get DBus proxy\n")); |
| 77 | 110 | purple_notify_error(plugin, "Away-on-lock", _("Failed to create a DBus Proxy."), NULL); |
| 78 | | |
| | 111 | dbus_g_connection_unref(dbus_conn); |
| 79 | 112 | return FALSE; |
| 80 | 113 | } |
| … |
… |
|
| 93 | 126 | ); |
| 94 | 127 | /* |
| 95 | | * END Gnome-screensaver specific stuff |
| | 128 | * END freedesktop stuff |
| 96 | 129 | */ |
| 97 | 130 | |
| … |
… |
|
| 156 | 189 | |
| 157 | 190 | info.name = _("Away-on-lock"); |
| 158 | | info.summary = _("Sets you as away when your screensaver is activated"); |
| 159 | | info.description = _("This plugin sets your status to the default away status whenever your screensaver gets activated."); |
| | 191 | info.summary = _("Changes your status when your screensaver gets activated"); |
| | 192 | info.description = _("This plugin changes your status to a preselected saved status or the default away status whenever your screensaver gets activated. It doesn't interfere if you're already marked as auto-away and can also avoid changing your status if you've manually marked yourself as any non-available status."); |
| 160 | 193 | info.author = _("Leo Antunes <leo@costela.net>"); |
| 161 | 194 | |
-
|
reac542b
|
re3cc7b2
|
|
| 9 | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
| 10 | 10 | "Report-Msgid-Bugs-To: \n" |
| 11 | | "POT-Creation-Date: 2009-07-19 00:16+0200\n" |
| | 11 | "POT-Creation-Date: 2009-07-22 23:19+0200\n" |
| 12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| … |
… |
|
| 17 | 17 | "Content-Transfer-Encoding: 8bit\n" |
| 18 | 18 | |
| 19 | | #: awayonlock.c:61 |
| | 19 | #: awayonlock.c:62 |
| 20 | 20 | msgid "Failed to get a DBus connection." |
| 21 | 21 | msgstr "" |
| 22 | 22 | |
| 23 | | #: awayonlock.c:77 |
| | 23 | #: awayonlock.c:78 awayonlock.c:110 |
| 24 | 24 | msgid "Failed to create a DBus Proxy." |
| 25 | 25 | msgstr "" |
| 26 | 26 | |
| 27 | | #: awayonlock.c:157 |
| | 27 | #: awayonlock.c:190 |
| 28 | 28 | msgid "Away-on-lock" |
| 29 | 29 | msgstr "" |
| 30 | 30 | |
| 31 | | #: awayonlock.c:158 |
| 32 | | msgid "Sets you as away when your screensaver is activated" |
| | 31 | #: awayonlock.c:191 |
| | 32 | msgid "Changes your status when your screensaver gets activated" |
| 33 | 33 | msgstr "" |
| 34 | 34 | |
| 35 | | #: awayonlock.c:159 |
| | 35 | #: awayonlock.c:192 |
| 36 | 36 | msgid "" |
| 37 | | "This plugin sets your status to the default away status whenever your " |
| 38 | | "screensaver gets activated." |
| | 37 | "This plugin changes your status to a preselected saved status or the default " |
| | 38 | "away status whenever your screensaver gets activated. It doesn't interfere " |
| | 39 | "if you're already marked as auto-away and can also avoid changing your " |
| | 40 | "status if you've manually marked yourself as any non-available status." |
| 39 | 41 | msgstr "" |
| 40 | 42 | |
| 41 | | #: awayonlock.c:160 |
| | 43 | #: awayonlock.c:193 |
| 42 | 44 | msgid "Leo Antunes <leo@costela.net>" |
| 43 | 45 | msgstr "" |
-
|
reac542b
|
re3cc7b2
|
|
| 16 | 16 | "Project-Id-Version: PACKAGE VERSION\n" |
| 17 | 17 | "Report-Msgid-Bugs-To: \n" |
| 18 | | "POT-Creation-Date: 2009-07-19 00:16+0200\n" |
| | 18 | "POT-Creation-Date: 2009-07-22 23:19+0200\n" |
| 19 | 19 | "PO-Revision-Date: 2009-01-31 22:13+0100\n" |
| 20 | 20 | "Last-Translator: <leo@costela.net>\n" |
| … |
… |
|
| 26 | 26 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" |
| 27 | 27 | |
| 28 | | #: awayonlock.c:61 |
| | 28 | #: awayonlock.c:62 |
| 29 | 29 | msgid "Failed to get a DBus connection." |
| 30 | 30 | msgstr "Falha ao conseguir uma conexão DBus" |
| 31 | 31 | |
| 32 | | #: awayonlock.c:77 |
| | 32 | #: awayonlock.c:78 awayonlock.c:110 |
| 33 | 33 | msgid "Failed to create a DBus Proxy." |
| 34 | 34 | msgstr "Falha ao criar um Proxy DBus" |
| 35 | 35 | |
| 36 | | #: awayonlock.c:157 |
| | 36 | #: awayonlock.c:190 |
| 37 | 37 | msgid "Away-on-lock" |
| 38 | 38 | msgstr "" |
| 39 | 39 | |
| 40 | | #: awayonlock.c:158 |
| 41 | | msgid "Sets you as away when your screensaver is activated" |
| | 40 | #: awayonlock.c:191 |
| | 41 | #, fuzzy |
| | 42 | msgid "Changes your status when your screensaver gets activated" |
| 42 | 43 | msgstr "Define status como ausente quando o salva-tela é ativado" |
| 43 | 44 | |
| 44 | | #: awayonlock.c:159 |
| | 45 | #: awayonlock.c:192 |
| 45 | 46 | msgid "" |
| 46 | | "This plugin sets your status to the default away status whenever your " |
| 47 | | "screensaver gets activated." |
| | 47 | "This plugin changes your status to a preselected saved status or the default " |
| | 48 | "away status whenever your screensaver gets activated. It doesn't interfere " |
| | 49 | "if you're already marked as auto-away and can also avoid changing your " |
| | 50 | "status if you've manually marked yourself as any non-available status." |
| 48 | 51 | msgstr "" |
| 49 | | "Este plugin define o status atual como o status ausente padrão quando o " |
| 50 | | "salva-tela é ativado" |
| | 52 | "Este plugin altera seu status para um status ausente pre-selecionado ou para " |
| | 53 | "o status ausente padrão quando o salva-tela é ativado. Ele não interfere caso " |
| | 54 | "você já esteja marcado como auto-ausente e pode também evitar alterar seu " |
| | 55 | "status caso você tenha manualmente se marcado como qualquer status não-disponÃvel." |
| 51 | 56 | |
| 52 | | #: awayonlock.c:160 |
| | 57 | #: awayonlock.c:193 |
| 53 | 58 | msgid "Leo Antunes <leo@costela.net>" |
| 54 | 59 | msgstr "" |
| … |
… |
|
| 65 | 70 | msgid "Activate only if available" |
| 66 | 71 | msgstr "Ativar somente quando disponÃvel" |
| | 72 | |
| | 73 | #~ msgid "" |
| | 74 | #~ "This plugin sets your status to the default away status whenever your " |
| | 75 | #~ "screensaver gets activated." |
| | 76 | #~ msgstr "" |
| | 77 | #~ "Este plugin define o status atual como o status ausente padrão quando o " |
| | 78 | #~ "salva-tela é ativado" |