Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pages/submit.py
diff options
context:
space:
mode:
Diffstat (limited to 'pages/submit.py')
-rw-r--r--pages/submit.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/pages/submit.py b/pages/submit.py
index dfe7bd6..25fce61 100644
--- a/pages/submit.py
+++ b/pages/submit.py
@@ -21,8 +21,8 @@
import gi
import os
from gi.repository import Gtk
-import hippo
-import pango
+from gi.repository import Hippo
+from gi.repository import Pango
import logging
from gettext import gettext as _
@@ -44,38 +44,38 @@ class JokeEditor(Page):
padding=4,
border_color=theme.COLOR_RED.get_int(),
border=0,
- orientation=hippo.ORIENTATION_HORIZONTAL)
+ orientation=Hippo.Orientation.HORIZONTAL)
# left column
- self.left = hippo.CanvasBox(border=0,
+ self.left = Hippo.CanvasBox(border=0,
border_color=theme.COLOR_RED.get_int(),
- xalign=hippo.ALIGNMENT_START,
- orientation=hippo.ORIENTATION_VERTICAL,
+ xalign=Hippo.ALIGNMENT_START,
+ orientation=Hippo.Orientation.VERTICAL,
padding=theme.BORDER_WIDTH_CONTROL/2)
joke_image = self.make_imagebox(joke, 'image', 320, 240, True)
self.left.append(joke_image)
# right column
- self.right = hippo.CanvasBox(border=0,
+ self.right = Hippo.CanvasBox(border=0,
border_color=theme.COLOR_RED.get_int(),
padding=theme.SPACER_HORIZONTAL,
- orientation=hippo.ORIENTATION_VERTICAL,
+ orientation=Hippo.Orientation.VERTICAL,
padding_bottom=theme.BORDER_WIDTH_CONTROL/2,
spacing=theme.BORDER_WIDTH_CONTROL/2)
- self.right.append(hippo.CanvasText(text=_('Question'),
- xalign=hippo.ALIGNMENT_START,
+ self.right.append(Hippo.CanvasText(text=_('Question'),
+ xalign=Hippo.ALIGNMENT_START,
color=theme.COLOR_DARK_GREEN.get_int()))
self.right.append(self.make_textbox(joke, 'text'))
- self.right.append(hippo.CanvasBox(box_height=theme.SPACER_VERTICAL))
+ self.right.append(Hippo.CanvasBox(box_height=theme.SPACER_VERTICAL))
- self.right.append(hippo.CanvasText(text=_('Answer'),
- xalign=hippo.ALIGNMENT_START,
+ self.right.append(Hippo.CanvasText(text=_('Answer'),
+ xalign=Hippo.ALIGNMENT_START,
color=theme.COLOR_DARK_GREEN.get_int()))
self.right.append(self.make_textbox(joke, 'answer'))
self.append(self.left)
- self.append(self.right, hippo.PACK_EXPAND)
+ self.append(self.right, Hippo.PackFlags.EXPAND)
class Submit(Page):
@@ -93,21 +93,21 @@ class Submit(Page):
self.append(self.make_field(_('Submission For:'), 250, jokebook, 'title', 300, False))
self.append(self.make_field(_('Your Name:'), 250, joke, 'joker', 300, True))
- self.append(hippo.CanvasBox(box_height=theme.SPACER_VERTICAL)) # spacer
+ self.append(Hippo.CanvasBox(box_height=theme.SPACER_VERTICAL)) # spacer
# joke editor
jokebox = JokeEditor(joke)
- nav = hippo.CanvasBox(
+ nav = Hippo.CanvasBox(
padding_right=8,
padding_top=8,
spacing=18,
- orientation=hippo.ORIENTATION_HORIZONTAL)
+ orientation=Hippo.Orientation.HORIZONTAL)
button = Gtk.Button(_('Submit'))
button.connect('clicked', self.__do_clicked_submit, jokebook, joke)
- nav.append(hippo.CanvasWidget(widget=theme.theme_widget(button), padding_right=10, padding_top=20))
+ nav.append(Hippo.CanvasWidget(widget=theme.theme_widget(button), padding_right=10, padding_top=20))
button = Gtk.Button(_('Back'))
button.connect('clicked', self.__do_clicked_back, jokebook, last_joke)
- nav.append(hippo.CanvasWidget(widget=theme.theme_widget(button), padding_top=20))
+ nav.append(Hippo.CanvasWidget(widget=theme.theme_widget(button), padding_top=20))
jokebox.right.append(nav)
self.append(jokebox)