From eb0d3756569fee1db5a94002cf400cefc9873cd9 Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Fri, 4 Sep 2009 11:24:23 +0000
Subject: Fix minor issues to cleanup sugar log #1267
---
src/jarabe/desktop/favoriteslayout.py | 3 +++
src/jarabe/journal/journalactivity.py | 6 +++---
src/jarabe/journal/listview.py | 6 +++++-
src/jarabe/model/shell.py | 3 ++-
src/jarabe/view/launcher.py | 2 +-
5 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/jarabe/desktop/favoriteslayout.py b/src/jarabe/desktop/favoriteslayout.py
index 3ff0ba8..85e1b59 100644
a
|
b
|
class RingLayout(FavoritesLayout): |
281 | 281 | min_w_, child_width = child.get_width_request() |
282 | 282 | min_h_, child_height = child.get_height_request(child_width) |
283 | 283 | |
| 284 | if child_width <= 0 or child_height <= 0: |
| 285 | return |
| 286 | |
284 | 287 | child.allocate(int(x), int(y), child_width, child_height, |
285 | 288 | origin_changed) |
286 | 289 | |
diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index a6e85d4..1d24d7f 100644
a
|
b
|
class JournalActivity(Window): |
199 | 199 | self.show_main_view() |
200 | 200 | |
201 | 201 | def show_main_view(self): |
202 | | if self.toolbox != self._main_toolbox: |
203 | | self.set_toolbox(self._main_toolbox) |
| 202 | if self.toolbar_box != self._main_toolbox: |
| 203 | self.set_toolbar_box(self._main_toolbox) |
204 | 204 | self._main_toolbox.show() |
205 | 205 | |
206 | 206 | if self.canvas != self._main_view: |
… |
… |
class JournalActivity(Window): |
215 | 215 | logging.error('Exception while displaying entry:\n' + \ |
216 | 216 | ''.join(traceback.format_exception(*sys.exc_info()))) |
217 | 217 | |
218 | | self.set_toolbox(self._detail_toolbox) |
| 218 | self.set_toolbar_box(self._detail_toolbox) |
219 | 219 | self._detail_toolbox.show() |
220 | 220 | |
221 | 221 | try: |
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index 607bb39..b156f75 100644
a
|
b
|
class BaseListView(gtk.Bin): |
426 | 426 | self._scrolled_window.show() |
427 | 427 | |
428 | 428 | def update_dates(self): |
429 | | logging.debug('ListView.update_dates') |
| 429 | if not self.tree_view.flags() & gtk.REALIZED: |
| 430 | return |
430 | 431 | visible_range = self.tree_view.get_visible_range() |
431 | 432 | if visible_range is None: |
432 | 433 | return |
| 434 | |
| 435 | logging.debug('ListView.update_dates') |
| 436 | |
433 | 437 | path, end_path = visible_range |
434 | 438 | while True: |
435 | 439 | x, y, width, height = self.tree_view.get_cell_area(path, |
diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index d967e53..7da81d5 100644
a
|
b
|
class ShellModel(gobject.GObject): |
463 | 463 | |
464 | 464 | if wm.get_sugar_window_type(window) != 'launcher': |
465 | 465 | home_activity.props.launching = False |
466 | | self.emit('launch-completed', home_activity) |
| 466 | if not home_activity.is_journal(): |
| 467 | self.emit('launch-completed', home_activity) |
467 | 468 | |
468 | 469 | startup_time = time.time() - home_activity.get_launch_time() |
469 | 470 | logging.debug('%s launched in %f seconds.', |
diff --git a/src/jarabe/view/launcher.py b/src/jarabe/view/launcher.py
index 643baee..d4b9967 100644
a
|
b
|
class _Animation(animator.Animation): |
120 | 120 | |
121 | 121 | def next_frame(self, current): |
122 | 122 | d = (self.end_size - self.start_size) * current |
123 | | self._icon.props.size = self.start_size + d |
| 123 | self._icon.props.size = int(self.start_size + d) |
124 | 124 | |
125 | 125 | _launchers = {} |
126 | 126 | |