Changeset 9792

Show
Ignore:
Timestamp:
06/12/08 20:26:08 (4 months ago)
Author:
vardo
Message:

Small changes toward handling plug-ins configuration.

Location:
branches/plugin-system
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/plugin-system/data/glade/plugins_window.glade

    r9762 r9792  
    11<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
    22<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> 
    3 <!--Generated with glade3 3.4.5 on Sat Jun  7 19:16:21 2008 --> 
     3<!--Generated with glade3 3.4.5 on Mon Jun  9 15:22:01 2008 --> 
    44<glade-interface> 
    55  <widget class="GtkWindow" id="plugins_window"> 
     
    323323              <widget class="GtkHPaned" id="hpaned2"> 
    324324                <property name="visible">True</property> 
     325                <property name="sensitive">False</property> 
    325326                <property name="can_focus">True</property> 
    326327                <child> 
     
    556557            <child> 
    557558              <widget class="GtkLabel" id="label2"> 
     559                <property name="visible">True</property> 
     560                <property name="sensitive">False</property> 
     561                <property name="can_focus">True</property> 
    558562                <property name="label" translatable="yes">Available</property> 
    559563              </widget> 
  • branches/plugin-system/plugins/acronyms_expander.py

    r9777 r9792  
    4444                super(AcronymsExpanderPlugin, self).__init__() 
    4545 
    46                 self.__class__.gui_extension_points = { 
     46                self.gui_extension_points = { 
    4747                        'chat_control_base' : (self.connect_with_chat_control_base, 
    4848                                                                   self.disconnect_from_chat_control_base) 
  • branches/plugin-system/plugins/length_notifier.py

    r9762 r9792  
    4444                super(LengthNotifierPlugin, self).__init__() 
    4545                 
    46                 self.__class__.gui_extension_points = { 
     46                self.gui_extension_points = { 
    4747                        'chat_control' : (self.connect_with_chat_control, 
    4848                                                          self.disconnect_from_chat_control) 
  • branches/plugin-system/src/plugins/plugin.py

    r9762 r9792  
    9595        @log_calls('GajimPlugin') 
    9696        def __init__(self): 
     97                self.config = Config() 
     98                ''' 
     99                Plug-in configuration dictionary. 
     100                 
     101                Automatically saved and loaded and plug-in (un)load. 
     102                 
     103                :type: `plugins.plugin.Config` 
     104                ''' 
     105                 
     106                self._load_config() 
     107         
     108        @log_calls('GajimPlugin') 
     109        def _save_config(self): 
    97110                pass 
     111         
     112        @log_calls('GajimPlugin')        
     113        def _load_config(self): 
     114                pass 
     115         
     116        @log_calls('GajimPlugin') 
     117        def __del__(self): 
     118                self._save_config() 
     119                 
     120 
     121class Config(dict): 
     122        pass