Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2013-03-31 22:57:31 (GMT)
committer Walter Bender <walter.bender@gmail.com>2013-03-31 22:57:31 (GMT)
commit1221cf666d4123c2f564518a888805d38189b2ca (patch)
treea37c7e788d63e7ecd3f0d0dec78f1f6352326657
parent83a013d03aab518e6db83fcda5b26e0a407f201c (diff)
fix some sizing issues
-rw-r--r--edit.py3
-rw-r--r--infoslicer/widgets/Gallery_View.py20
-rw-r--r--library.py20
3 files changed, 20 insertions, 23 deletions
diff --git a/edit.py b/edit.py
index f3c8fe6..83a66df 100644
--- a/edit.py
+++ b/edit.py
@@ -61,11 +61,10 @@ class View(Gtk.Notebook):
if book.custom.article:
TABS[index].set_working_article(book.custom.article)
+
class ToolbarBuilder():
def __init__(self, edit, toolbar):
self.edit = edit
- logging.debug('init edit toolbar')
- logging.debug(self.edit)
self.txt_toggle = ToggleToolButton('ascii')
self.img_toggle = ToggleToolButton('image')
diff --git a/infoslicer/widgets/Gallery_View.py b/infoslicer/widgets/Gallery_View.py
index b46800c..7cd3ce8 100644
--- a/infoslicer/widgets/Gallery_View.py
+++ b/infoslicer/widgets/Gallery_View.py
@@ -24,18 +24,16 @@ class Gallery_View( Gtk.HBox ):
displays the images associated with that article, in a scrollable display.
- Drag-and-drop methods have been added to set up the images as a drag
- source.
- The data returned by drag-data-get will be a list containing
- an Image_Data object and a Sentence_Data object.
- These correspond to the image
- and caption respectively.
+ Drag-and-drop methods have been added to set up the images as a
+ drag source. The data returned by drag-data-get will be a list
+ containing an Image_Data object and a Sentence_Data object. These
+ correspond to the image and caption respectively.
"""
def __init__(self):
self.image_list = []
GObject.GObject.__init__(self)
-
+ self.set_size_request(int(Gdk.Screen.width() / 2), -1)
self.current_index = -1
left_button = Gtk.Button(label="\n\n << \n\n")
@@ -54,17 +52,19 @@ class Gallery_View( Gtk.HBox ):
Gdk.DragAction.COPY)
self.imagebox.drag_source_add_image_targets()
self.imagebox.connect("drag-begin", self.drag_begin_event, None)
- logging.debug('##################### Galler_View.connect')
+ logging.debug('##################### Gallery_View.connect')
self.imagebox.connect("drag-data-get", self.drag_data_get_event, None)
self.caption = Gtk.Label(label="")
+ self.caption.set_size_request(int(Gdk.Screen.width() / 3), -1)
self.caption.set_line_wrap(True)
+ self.caption.set_max_width_chars(40)
self.image_drag_container = Gtk.VBox()
self.image_drag_container.pack_start(self.imagenumberlabel, expand=False,
fill=False, padding=0)
- self.image_drag_container.pack_start(self.imagebox, False, True, 0)
- self.image_drag_container.pack_start(self.caption, False, True, 0)
+ self.image_drag_container.pack_start(self.imagebox, False, False, 0)
+ self.image_drag_container.pack_start(self.caption, False, False, 0)
image_container = Gtk.VBox()
image_container.pack_start(Gtk.Label(" "), True, True, 0)
diff --git a/library.py b/library.py
index 920c819..bd6c08e 100644
--- a/library.py
+++ b/library.py
@@ -37,6 +37,15 @@ from infoslicer.widgets.Reading_View import Reading_View
logger = logging.getLogger('infoslicer')
+
+WIKI = { _('English Wikipedia') : 'en.wikipedia.org',
+ _('Simple English Wikipedia') : 'simple.wikipedia.org',
+ _('French Wikipedia') : 'fr.wikipedia.org',
+ _('German Wikipedia') : 'de.wikipedia.org',
+ _('Polish Wikipedia') : 'pl.wikipedia.org',
+ _('Spanish Wikipedia') : 'es.wikipedia.org'}
+
+
class View(Gtk.EventBox):
def sync(self):
self.wiki.sync()
@@ -130,14 +139,11 @@ class View(Gtk.EventBox):
custom.props.show_tabs = False
custom.append_page(custom_stub, None)
custom.append_page(custom_widget, None)
- # custom.set_size_request(Gdk.Screen.width()/4*3,
- # Gdk.Screen.height()/2 - 55)
custom.set_size_request(int(Gdk.Screen.width() * 3 / 4.),
int((Gdk.Screen.height() - \
style.GRID_CELL_SIZE) / 2))
# workspace
-
articles_box = Gtk.HBox()
articles_box.pack_start(self.wiki, True, True, 0)
articles_box.pack_start(Gtk.VSeparator(), False, False, 0)
@@ -156,7 +162,6 @@ class View(Gtk.EventBox):
self.add(workspace)
# init components
-
book.wiki.connect('article-selected', self._article_selected_cb,
wiki_widget, [wiki, custom])
book.wiki.connect('article-deleted', self._article_deleted_cb,
@@ -238,10 +243,3 @@ class ToolbarBuilder():
def _publish_clicked_cb(self, widget):
xol.publish(self.activity)
-
-WIKI = { _('English Wikipedia') : 'en.wikipedia.org',
- _('Simple English Wikipedia') : 'simple.wikipedia.org',
- _('French Wikipedia') : 'fr.wikipedia.org',
- _('German Wikipedia') : 'de.wikipedia.org',
- _('Polish Wikipedia') : 'pl.wikipedia.org',
- _('Spanish Wikipedia') : 'es.wikipedia.org'}