~jconti/recent-notifications/trunk

« back to all changes in this revision

Viewing changes to unity/Main.py

  • Committer: Jason Conti
  • Date: 2011-04-16 23:29:36 UTC
  • Revision ID: jason.conti@gmail.com-20110416232936-wqgej387mzueozir
Updated the number of translatable strings and fixed the labels so they properly rewrap when the window is resized in the experimental unity version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    self._default_size = 400
41
41
 
42
 
    self.set_title("Recent Notifications")
 
42
    self.set_title(_("Recent Notifications"))
43
43
    self.set_default_size(self._default_size, self._default_size)
44
44
    self.connect("destroy", self.on_destroy)
45
45
    self.connect("focus-in-event", self.on_focus_in)
53
53
 
54
54
    self._actiongroup = Gtk.ActionGroup("MenuBar")
55
55
    self._actiongroup.add_actions([
56
 
      ("File", None, "_File", None, None, None),
57
 
      ("Clear", Gtk.STOCK_CLEAR, "_Clear Messages", None, None, self.on_clear),
 
56
      ("File", None, _("_File"), None, None, None),
 
57
      ("Clear", Gtk.STOCK_CLEAR, _("_Clear Messages"), None, None, self.on_clear),
58
58
      ("Quit", Gtk.STOCK_QUIT, None, None, None, self.on_destroy),
59
 
      ("Help", None, "_Help", None, None, None),
 
59
      ("Help", None, _("_Help"), None, None, None),
60
60
      ("About", Gtk.STOCK_ABOUT, None, None, None, self.on_show_about)
61
61
    ])
62
62
    self._uimanager.insert_action_group(self._actiongroup)
66
66
        <menubar name="MenuBar">
67
67
          <menu action="File">
68
68
            <menuitem action="Clear"/>
69
 
            <separator/>
70
69
            <menuitem action="Quit"/>
71
70
          </menu>
72
71
          <menu action="Help">
196
195
 
197
196
  def on_size_allocate(self, widget, size):
198
197
    """Resize event"""
199
 
    pass
 
198
    self._message_box.set_width(size.width)
200
199
 
201
200
  def on_show_about(self, *args):
202
201
    """Show the about dialog"""