diff options
author | Aneesh Dogra <lionaneesh@gmail.com> | 2012-11-27 17:01:43 (GMT) |
---|---|---|
committer | Aneesh Dogra <lionaneesh@gmail.com> | 2012-11-27 17:01:43 (GMT) |
commit | 0f2d7123f8f76fcb6d57bc764e61c728813a0e6e (patch) | |
tree | 3bb62b5cdf7a3cacf7c66d11012b20278f7ebdab /AbiWordActivity.py | |
parent | e681d00ed1e3b3bda36b286fb19503f4ef0725b6 (diff) |
Diffstat (limited to 'AbiWordActivity.py')
-rw-r--r-- | AbiWordActivity.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/AbiWordActivity.py b/AbiWordActivity.py index ccfec0e..892d3b5 100644 --- a/AbiWordActivity.py +++ b/AbiWordActivity.py @@ -57,6 +57,8 @@ logger = logging.getLogger('write-activity') class AbiWordActivity(activity.Activity): + # TODO: We need to add a function for setting/getting data to/from + # the configuration file def __init__(self, handle): activity.Activity.__init__(self, handle) @@ -64,6 +66,10 @@ class AbiWordActivity(activity.Activity): # abiword uses the current directory for all its file dialogs os.chdir(os.path.expanduser('~')) + # create a class variable for font here! + + # check if the /etc/font.conf extists, if yes + # create our main abiword canvas self.abiword_canvas = Abi.Widget() self._shared_activity = None @@ -162,6 +168,11 @@ class AbiWordActivity(activity.Activity): self.abiword_canvas.connect('size-allocate', self.size_allocate_cb) + # def read_write_configuration(self, file='font.conf') + # This function would look into 'file' for defined key, value pairs of + # font and font-size + # if the key-value pairs are not found it will add the default font, font-size + def size_allocate_cb(self, abi, alloc): logging.error('size allocate %s', alloc) GObject.idle_add(abi.queue_draw) @@ -203,6 +214,8 @@ class AbiWordActivity(activity.Activity): self.abiword_canvas.invoke_ex( 'com.abisource.abiword.loadbindings.fromURI', keybindings_file, 0, 0) + # Don't use the hardcoded font_name here, instead use the self.font_name + # which is synced with the configuration file. # set default font if self._new_instance: self.abiword_canvas.select_all() |