Small sync commit.
This commit is contained in:
parent
aaf5b30129
commit
b647885d86
2 changed files with 20 additions and 10 deletions
|
@ -196,18 +196,15 @@ class GajimPluginConfigDialog(gtk.Dialog):
|
|||
|
||||
@log_calls('GajimPluginConfigDialog')
|
||||
def __init__(self, plugin, **kwargs):
|
||||
# TRANSLATORS: The window title for the generic configuration dialog of plugins
|
||||
gtk.Dialog.__init__(self, '%s : %s'%(_('Configuration'), plugin.name), **kwargs)
|
||||
gtk.Dialog.__init__(self, '%s %s'%(plugin.name, _('Configuration')), **kwargs)
|
||||
self.plugin = plugin
|
||||
self.add_button('gtk-close', gtk.RESPONSE_CLOSE)
|
||||
|
||||
self.main = self.child
|
||||
self.main.set_spacing(3)
|
||||
self.child.set_spacing(3)
|
||||
|
||||
# TRANSLATORS: Short text stating which plugin a configuration dialog is for
|
||||
label = gtk.Label(_('<b>%s Configuration</b>') % (plugin.name))
|
||||
label.set_markup(label.get_label())
|
||||
self.main.pack_start(label, False, False)
|
||||
#label = gtk.Label(_('<b>%s Configuration</b>') % (plugin.name))
|
||||
#label.set_markup(label.get_label())
|
||||
#self.child.pack_start(label, False, False)
|
||||
|
||||
@log_calls('GajimPluginConfigDialog')
|
||||
def run(self, parent=None):
|
||||
|
|
|
@ -26,9 +26,12 @@ Base class for implementing plugin.
|
|||
|
||||
import os
|
||||
|
||||
from plugins.helpers import log_calls
|
||||
from common import gajim
|
||||
|
||||
from plugins.helpers import log_calls, log
|
||||
from plugins.gui import GajimPluginConfigDialog
|
||||
|
||||
|
||||
class GajimPlugin(object):
|
||||
'''
|
||||
Base class for implementing Gajim plugins.
|
||||
|
@ -97,7 +100,7 @@ class GajimPlugin(object):
|
|||
|
||||
@log_calls('GajimPlugin')
|
||||
def __init__(self):
|
||||
self.config = GajimPluginConfig()
|
||||
self.config = GajimPluginConfig(self)
|
||||
'''
|
||||
Plug-in configuration dictionary.
|
||||
|
||||
|
@ -136,8 +139,17 @@ class GajimPlugin(object):
|
|||
@log_calls('GajimPlugin')
|
||||
def deactivate(self):
|
||||
pass
|
||||
|
||||
import shelve
|
||||
|
||||
class GajimPluginConfig(dict):
|
||||
@log_calls('GajimPluginConfig')
|
||||
def __init__(self, plugin):
|
||||
self.plugin = plugin
|
||||
self.FILE_PATH = gajim.HOME_DIR
|
||||
log.debug('FILE_PATH = %s'%(self.FILE_PATH))
|
||||
#self.data = shelve.open(self.FILE_PATH)
|
||||
|
||||
@log_calls('GajimPluginConfig')
|
||||
def save(self):
|
||||
pass
|
||||
|
@ -145,3 +157,4 @@ class GajimPluginConfig(dict):
|
|||
@log_calls('GajimPluginConfig')
|
||||
def load(self):
|
||||
pass
|
||||
|
Loading…
Add table
Reference in a new issue