Changeset 0dcf20b290d256e042d559c2d8b8cdaf18ba6c13

Show
Ignore:
Timestamp:
03/13/09 00:10:52 (3 years ago)
Author:
Leo Antunes <leo@…>
Children:
c954bfe63faa9d655b8f94c13a9b8e2fbaa6df96
Parents:
56547456e406341caca65cfab1abe64869a0ffa0
git-committer:
Leo Antunes <leo@…> (03/13/09 00:10:52)
Message:

preferences screen

not yet implemented on callback.c

Files:
2 added
4 modified

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r5654745 r0dcf20b  
    88set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb -Wall" CACHE STRING "" FORCE) 
    99 
    10 add_library(awayonlock SHARED awayonlock.c callback.c) 
     10add_library(awayonlock SHARED awayonlock.c callback.c prefs.c) 
    1111install(TARGETS awayonlock LIBRARY DESTINATION lib/pidgin NAMELINK_SKIP) 
    1212 
  • ChangeLog

    r826d0d3 r0dcf20b  
    33        - solved problem when the auto-away feature got activated before the screensaver 
    44        - added pref to select which away status should be set by the screensaver 
    5         - plugin info finally translateable      
     5        - plugin info finally translatable 
    66 
    77Version 0.1 (2009-01-31): 
  • TODO

    rd4640cf r0dcf20b  
    1 - add preference: select specific away state instead of default 
     1- add callback to status management, to remove our pref if it's removed in purple 
  • awayonlock.c

    r826d0d3 r0dcf20b  
    3434#include "i18n.h" 
    3535#include "callback.h" 
     36#include "prefs.h" 
    3637 
    3738static DBusGConnection *dbus_conn = NULL; 
     
    4849         
    4950        if(dbus_conn == NULL) {  
     51                purple_debug(PURPLE_DEBUG_ERROR, PACKAGE, N_("failed to get DBus connection\n")); 
    5052                purple_notify_error(plugin, "Away-on-lock", _("Failed to get a DBus connection."), g_strdup_printf("DBus error: %s\n",error->message)); 
    5153                return FALSE; 
     
    6062 
    6163        if(dbus_proxy == NULL) { 
     64                purple_debug(PURPLE_DEBUG_ERROR, PACKAGE, N_("failed to get DBus proxy\n")); 
    6265                purple_notify_error(plugin, "Away-on-lock", _("Failed to create a DBus Proxy."), NULL); 
     66 
    6367                return FALSE; 
    6468        } 
     
    113117        NULL, 
    114118        NULL, 
    115         NULL, 
     119        &prefs, 
    116120        NULL, 
    117121        NULL, 
     
    129133        info.description = _("This plugin sets your status to the default away status whenever your screensaver gets activated."); 
    130134        info.author = _("Leo Antunes <leo@costela.net>"); 
     135 
     136        purple_prefs_add_none("/plugins/core/awayonlock"); 
     137        purple_prefs_add_string("/plugins/core/awayonlock/status", NULL); 
    131138} 
    132139