Changeset bbdcdb47aa4624e593c227cc18c6192deaf49938 for awayonlock.c
- Timestamp:
- 06/01/09 22:42:56 (3 years ago)
- Children:
- f61e5d9f981e59d438edb649a97992469056a913
- Parents:
- c954bfe63faa9d655b8f94c13a9b8e2fbaa6df96
- git-committer:
- Leo Antunes <leo@…> (06/01/09 22:42:56)
- Files:
-
- 1 modified
-
awayonlock.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
awayonlock.c
r0dcf20b rbbdcdb4 31 31 #include <version.h> 32 32 #include <notify.h> 33 #include <savedstatuses.h> 33 34 34 35 #include "i18n.h" … … 37 38 38 39 static DBusGConnection *dbus_conn = NULL; 40 41 void * 42 awayonlock_get_handle(void) 43 { 44 static char* handle = "awayonlock"; 45 return handle; 46 } 47 39 48 40 49 static gboolean plugin_load(PurplePlugin *plugin) { … … 55 64 56 65 66 /* 67 * Gnome-screensaver specific stuff 68 */ 57 69 dbus_proxy = dbus_g_proxy_new_for_name( dbus_conn, 58 70 "org.gnome.ScreenSaver", … … 73 85 G_TYPE_INVALID 74 86 ); 75 87 76 88 dbus_g_proxy_connect_signal( dbus_proxy, 77 89 "SessionIdleChanged", … … 80 92 NULL 81 93 ); 94 /* 95 * END Gnome-screensaver specific stuff 96 */ 97 98 99 /* 100 * avoid dangling references to savedstatuses in the config 101 */ 102 purple_signal_connect(purple_savedstatuses_get_handle(), "savedstatus-deleted", 103 awayonlock_get_handle(), 104 PURPLE_CALLBACK(prefs_status_deleted_cb), 105 NULL 106 ); 82 107 83 108 purple_debug(PURPLE_DEBUG_INFO, PACKAGE, N_("plugin_load finished\n")); … … 89 114 purple_debug(PURPLE_DEBUG_INFO, PACKAGE, N_("plugin_unload called\n")); 90 115 dbus_g_connection_unref(dbus_conn); 116 purple_signals_disconnect_by_handle(awayonlock_get_handle()); 91 117 return TRUE; 92 118 }