diff options
author | Daniel Francis <francis@sugarlabs.org> | 2012-06-30 00:41:52 (GMT) |
---|---|---|
committer | Daniel Francis <francis@sugarlabs.org> | 2012-06-30 00:41:52 (GMT) |
commit | f9275d3fb87a5662320737fccfbc909c8eb03334 (patch) | |
tree | 5214bc7fb431f8d9d38e156036ffd00c2c1b8e0b | |
parent | 9d3f08f0ac65a98ac13f744bfcfb4687e4ad58c8 (diff) |
Fixed bug: Paned position
-rw-r--r-- | cover.py | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -271,12 +271,11 @@ class CoverSlide(gtk.VPaned): # self.model.images_galery.image_request) self.images_notebook.append_page(top_image_editor) self.images_check_model.append([False, - "Display an image on\nthe top of the slides"]) + "Display an image on the top of the slides"]) self.images_check_model.append([False, - "Display a background image\n\ -in the slides you choose"]) + "Display a background image in the slides you choose"]) self.images_check_model.append([False, - "Display an image at\nthe cover slide"]) + "Display an image at the cover slide"]) images_check_view.show() style_box.show() self.main_vbox.pack_start(style_box, True, True, 0) @@ -284,6 +283,8 @@ in the slides you choose"]) self.main_vbox.pack_start(images_check_view, False, True, 0) self.images_notebook.show() self.pack2(self.images_notebook) + self._ready = False + self.connect('expose-event', self._expose_event_cb) """ images_editing_box = gtk.VBox() self.images_model = gtk.ListStore(str, bool, int) @@ -338,6 +339,14 @@ in the slides you choose"]) self.slide_title.set_text("Cover Slide") self.slide_title.show() + def _expose_event_cb(self, widget, event): + if not self._ready: + self._ready = True + min_position = self.get_property('min-position') + max_position = self.get_property('max-position') + self.set_position((max_position - min_position) / 2 +\ + min_position) + def activate_image(self, widget, path): self.images_check_model[path][0] = not self.images_check_model[path][0] |