Changeset e3cc7b23a6aba21796577ff44a9a3f9d855080cb for awayonlock.c
- Timestamp:
- 07/22/09 23:26:25 (3 years ago)
- Children:
- d1a41d2b9e8293b7310d616fd8ccd24ddf38d9be
- Parents:
- c5606aa8a15998dd28faee8a3141cb8ac83b8d24
- git-committer:
- Leo Antunes <leo@…> (07/22/09 23:26:25)
- Files:
-
- 1 modified
-
awayonlock.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
awayonlock.c
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 stuff68 */ 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 specificstuff128 * 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