Small changes toward handling plug-ins configuration.
This commit is contained in:
parent
5dbe58507e
commit
11e61ea2a2
4 changed files with 33 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||||
<!--Generated with glade3 3.4.5 on Sat Jun 7 19:16:21 2008 -->
|
<!--Generated with glade3 3.4.5 on Mon Jun 9 15:22:01 2008 -->
|
||||||
<glade-interface>
|
<glade-interface>
|
||||||
<widget class="GtkWindow" id="plugins_window">
|
<widget class="GtkWindow" id="plugins_window">
|
||||||
<property name="width_request">650</property>
|
<property name="width_request">650</property>
|
||||||
|
@ -322,6 +322,7 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHPaned" id="hpaned2">
|
<widget class="GtkHPaned" id="hpaned2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
||||||
|
@ -555,6 +556,9 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label2">
|
<widget class="GtkLabel" id="label2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="sensitive">False</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
<property name="label" translatable="yes">Available</property>
|
<property name="label" translatable="yes">Available</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
|
|
@ -43,7 +43,7 @@ class AcronymsExpanderPlugin(GajimPlugin):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(AcronymsExpanderPlugin, self).__init__()
|
super(AcronymsExpanderPlugin, self).__init__()
|
||||||
|
|
||||||
self.__class__.gui_extension_points = {
|
self.gui_extension_points = {
|
||||||
'chat_control_base' : (self.connect_with_chat_control_base,
|
'chat_control_base' : (self.connect_with_chat_control_base,
|
||||||
self.disconnect_from_chat_control_base)
|
self.disconnect_from_chat_control_base)
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ class LengthNotifierPlugin(GajimPlugin):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(LengthNotifierPlugin, self).__init__()
|
super(LengthNotifierPlugin, self).__init__()
|
||||||
|
|
||||||
self.__class__.gui_extension_points = {
|
self.gui_extension_points = {
|
||||||
'chat_control' : (self.connect_with_chat_control,
|
'chat_control' : (self.connect_with_chat_control,
|
||||||
self.disconnect_from_chat_control)
|
self.disconnect_from_chat_control)
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,4 +94,29 @@ class GajimPlugin(object):
|
||||||
|
|
||||||
@log_calls('GajimPlugin')
|
@log_calls('GajimPlugin')
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.config = Config()
|
||||||
|
'''
|
||||||
|
Plug-in configuration dictionary.
|
||||||
|
|
||||||
|
Automatically saved and loaded and plug-in (un)load.
|
||||||
|
|
||||||
|
:type: `plugins.plugin.Config`
|
||||||
|
'''
|
||||||
|
|
||||||
|
self._load_config()
|
||||||
|
|
||||||
|
@log_calls('GajimPlugin')
|
||||||
|
def _save_config(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@log_calls('GajimPlugin')
|
||||||
|
def _load_config(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@log_calls('GajimPlugin')
|
||||||
|
def __del__(self):
|
||||||
|
self._save_config()
|
||||||
|
|
||||||
|
|
||||||
|
class Config(dict):
|
||||||
|
pass
|
Loading…
Add table
Reference in a new issue