Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AbiWordActivity.py16
-rw-r--r--NEWS1
-rw-r--r--toolbar.py12
3 files changed, 11 insertions, 18 deletions
diff --git a/AbiWordActivity.py b/AbiWordActivity.py
index d207f12..764032b 100644
--- a/AbiWordActivity.py
+++ b/AbiWordActivity.py
@@ -98,7 +98,7 @@ class AbiWordActivity (Activity):
# always make sure at least 1 document is loaded (bad bad widget design)
if not self._file_opened:
- print "Loading empty doc"
+ logger.debug("Loading empty doc")
self.abiword_canvas.load_file('', '');
# activity sharing
@@ -114,7 +114,7 @@ class AbiWordActivity (Activity):
if self._shared_activity:
# we are joining the activity
- print "We are joining an activity"
+ logger.debug("We are joining an activity")
self.connect('joined', self._joined_cb)
self._shared_activity.connect('buddy-joined', self._buddy_joined_cb)
self._shared_activity.connect('buddy-left', self._buddy_left_cb)
@@ -123,7 +123,7 @@ class AbiWordActivity (Activity):
self._joined_cb()
else:
# we are creating the activity
- print "We are creating an activity"
+ logger.debug("We are creating an activity")
owner = pservice.get_owner()
@@ -221,12 +221,12 @@ class AbiWordActivity (Activity):
initiator_path = None;
contacts = self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].GetDBusNames(id)
- print 'dbus contact mapping',self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].GetDBusNames(id)
+ #print 'dbus contact mapping',self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].GetDBusNames(id)
for i, struct in enumerate(contacts):
- print 'mapping i',i
+ #print 'mapping i',i
handle, path = struct
if handle == initiator:
- print 'found initiator dbus path:',path
+ logger.debug('found initiator dbus path: %s', path)
initiator_path = path
break;
@@ -236,7 +236,7 @@ class AbiWordActivity (Activity):
# pass this tube to abicollab
address = self.tubes_chan[telepathy.CHANNEL_TYPE_TUBES].GetDBusServerAddress(id)
if self.joined:
- print 'Passing tube address to abicollab (join)', address
+ logger.debug('Passing tube address to abicollab (join)', address)
self.abiword_canvas.invoke_cmd('com.abisource.abiword.abicollab.olpc.joinTube', address, 0, 0)
if initiator_path is not None:
logger.debug('Adding the initiator to the session: %s', initiator_path)
@@ -266,7 +266,7 @@ class AbiWordActivity (Activity):
logger.debug('removed handle: %s, with dbus name: %s', handle, bus_name)
def _buddy_joined_cb (self, activity, buddy):
- print 'buddy joined with object path: %s',buddy.object_path()
+ logger.debug('buddy joined with object path: %s', buddy.object_path())
# self.abiword_canvas.invoke_cmd('com.abisource.abiword.abicollab.olpc.buddyJoined', buddy.object_path(), 0, 0)
def _buddy_left_cb (self, activity, buddy):
diff --git a/NEWS b/NEWS
index 3de1204..91282c0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+* replace print's with proper logger calls (J.M. Maurer)
* Implement a color button, which respects the cursors context (J.M. Maurer)
27
diff --git a/toolbar.py b/toolbar.py
index 4102429..16d2a6f 100644
--- a/toolbar.py
+++ b/toolbar.py
@@ -143,21 +143,18 @@ class TextToolbar(gtk.Toolbar):
self._abiword_canvas.toggle_bold()
def _isBold_cb(self, abi, b):
- print 'isBold',b
self.setToggleButtonState(self._bold,b,self._bold_id)
def _italic_cb(self, button):
self._abiword_canvas.toggle_italic()
def _isItalic_cb(self, abi, b):
- print 'isItalic',b
self.setToggleButtonState(self._italic, b, self._italic_id)
def _underline_cb(self, button):
self._abiword_canvas.toggle_underline()
def _isUnderline_cb(self, abi, b):
- print 'isUnderline',b
self.setToggleButtonState(self._underline, b, self._underline_id)
def _color_cb(self, abi, r, g, b):
@@ -169,12 +166,12 @@ class TextToolbar(gtk.Toolbar):
def _font_changed_cb(self, combobox):
if self._font_combo.get_active() != -1:
- print 'Setting font name:',self._fonts[self._font_combo.get_active()]
+ logger.debug('Setting font name: %s', self._fonts[self._font_combo.get_active()])
self._abiword_canvas.set_font_name(self._fonts[self._font_combo.get_active()])
def _font_size_changed_cb(self, combobox):
if self._font_size_combo.get_active() != -1:
- print 'Setting font size:',self._font_sizes[self._font_size_combo.get_active()]
+ logger.debug('Setting font size: %d',self._font_sizes[self._font_size_combo.get_active()])
self._abiword_canvas.set_font_size(self._font_sizes[self._font_size_combo.get_active()])
def _alignment_changed_cb(self, combobox):
@@ -207,7 +204,6 @@ class TextToolbar(gtk.Toolbar):
self._update_alignment_icon(self._ACTION_ALIGNMENT_RIGHT)
def _text_selected_cb(self, abi, b):
- print 'text selected',b
if b:
self._toolbox.set_current_toolbar(TOOLBAR_TEXT)
self._abiword_canvas.grab_focus() # hack: bad toolbox, bad!
@@ -230,7 +226,6 @@ class ImageToolbar(gtk.Toolbar):
self._abiword_canvas.invoke_cmd('fileInsertGraphic', '', 0, 0)
def _image_selected_cb(self, abi, b):
- print 'imageSelected',b
if b:
self._toolbox.set_current_toolbar(TOOLBAR_IMAGE)
self._abiword_canvas.grab_focus() # hack: bad toolbox, bad!
@@ -384,17 +379,14 @@ class ViewToolbar(gtk.Toolbar):
self._abiword_canvas.set_zoom_percentage(self._zoom_percentage)
def _page_spin_cb(self, button):
- print "page spin"
self._page_num = self._page_spin.get_value_as_int()
# TODO
def _page_count_cb(self, canvas, count):
- print "page count:",count
current_page = canvas.get_current_page_num()
self._page_spin_adj.set_all(current_page, 1, count, 1, 1, 0)
def _current_page_cb(self, canvas, num):
- print "current page:",num
self._page_spin.handler_block(self._page_spin_id)
try:
self._page_spin.set_value(num)