Changeset eac542b8dbbb0cd226442fbe8494256371810a8a for awayonlock.c
- Timestamp:
- 07/19/09 00:21:28 (3 years ago)
- Children:
- c5606aa8a15998dd28faee8a3141cb8ac83b8d24
- Parents:
- ebf9132bb918ff995e2b561867be329ec3e9a9ee
- git-committer:
- Leo Antunes <leo@…> (07/19/09 00:21:28)
- Files:
-
- 1 modified
-
awayonlock.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
awayonlock.c
rebf9132 reac542b 2 2 awayonlock - plugin to set away status on screensaver activation 3 3 Copyright (C) 2009 Leo Antunes <leo@costela.net> 4 4 5 5 This program is free software; you can redistribute it and/or 6 6 modify it under the terms of the GNU General Public License 7 7 as published by the Free Software Foundation; either version 2 8 8 of the License, or (at your option) any later version. 9 9 10 10 This program is distributed in the hope that it will be useful, 11 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 13 GNU General Public License for more details. 14 14 15 15 You should have received a copy of the GNU General Public License 16 16 along with this program; if not, write to the Free Software … … 21 21 #define PURPLE_PLUGINS 22 22 23 #define AWAYONLOCK_VERSION "0. 2.2"23 #define AWAYONLOCK_VERSION "0.3" 24 24 #define AWAYONLOCK_PLUGIN_ID "core-costela-awayonlock" 25 25 … … 54 54 55 55 purple_debug(PURPLE_DEBUG_INFO, PACKAGE, N_("plugin_load called\n")); 56 56 57 57 dbus_conn = dbus_g_bus_get(DBUS_BUS_SESSION, &error); 58 59 if(dbus_conn == NULL) { 58 59 if(dbus_conn == NULL) { 60 60 purple_debug(PURPLE_DEBUG_ERROR, PACKAGE, N_("failed to get DBus connection\n")); 61 61 purple_notify_error(plugin, "Away-on-lock", _("Failed to get a DBus connection."), g_strdup_printf("DBus error: %s\n",error->message)); 62 62 return FALSE; 63 63 } 64 64 65 65 66 66 /* … … 136 136 0, 137 137 N_("http://costela.net/projects/awayonlock"), 138 138 139 139 plugin_load, 140 140 plugin_unload, … … 154 154 { 155 155 bindtextdomain(PACKAGE, LOCALEDIR); 156 156 157 157 info.name = _("Away-on-lock"); 158 158 info.summary = _("Sets you as away when your screensaver is activated"); … … 160 160 info.author = _("Leo Antunes <leo@costela.net>"); 161 161 162 purple_prefs_add_none("/plugins/core/awayonlock"); 163 purple_prefs_add_string("/plugins/core/awayonlock/status", NULL); 162 purple_prefs_add_none(AWAYONLOCK_PREF_ROOT); 163 purple_prefs_add_string(AWAYONLOCK_PREF_STATUS, NULL); 164 purple_prefs_add_bool(AWAYONLOCK_PREF_AVAILABLE_ONLY, 0); 164 165 } 165 166