Show
Ignore:
Timestamp:
06/01/09 22:42:56 (3 years ago)
Author:
Leo Antunes <leo@…>
Children:
f61e5d9f981e59d438edb649a97992469056a913
Parents:
c954bfe63faa9d655b8f94c13a9b8e2fbaa6df96
git-committer:
Leo Antunes <leo@…> (06/01/09 22:42:56)
Message:

finally implemented the rest of the prefs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • awayonlock.c

    r0dcf20b rbbdcdb4  
    3131#include <version.h> 
    3232#include <notify.h> 
     33#include <savedstatuses.h> 
    3334 
    3435#include "i18n.h" 
     
    3738 
    3839static DBusGConnection *dbus_conn = NULL; 
     40 
     41void * 
     42awayonlock_get_handle(void) 
     43{ 
     44        static char* handle = "awayonlock"; 
     45        return handle; 
     46} 
     47 
    3948 
    4049static gboolean plugin_load(PurplePlugin *plugin) { 
     
    5564         
    5665 
     66        /* 
     67         * Gnome-screensaver specific stuff 
     68         */ 
    5769        dbus_proxy = dbus_g_proxy_new_for_name( dbus_conn, 
    5870                        "org.gnome.ScreenSaver", 
     
    7385                        G_TYPE_INVALID 
    7486                        ); 
    75          
     87 
    7688        dbus_g_proxy_connect_signal( dbus_proxy, 
    7789                        "SessionIdleChanged", 
     
    8092                        NULL 
    8193                        ); 
     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                                                ); 
    82107 
    83108        purple_debug(PURPLE_DEBUG_INFO, PACKAGE, N_("plugin_load finished\n")); 
     
    89114        purple_debug(PURPLE_DEBUG_INFO, PACKAGE, N_("plugin_unload called\n")); 
    90115        dbus_g_connection_unref(dbus_conn); 
     116        purple_signals_disconnect_by_handle(awayonlock_get_handle()); 
    91117        return TRUE; 
    92118}