Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/AbiWordActivity.py
diff options
context:
space:
mode:
Diffstat (limited to 'AbiWordActivity.py')
-rw-r--r--AbiWordActivity.py13
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()