Example #1
0
 def HandleDialogText (self, accel):
     name = self.ReorderKeyString (accel)
     if len (accel) != len (name):
         accel = protect_pango_markup (accel)
         ErrorDialog (self.Widget.get_toplevel (),
                      _("\"%s\" is not a valid shortcut") % accel)
         return
     self.BindingEdited (accel)
Example #2
0
 def HandleDialogText(self, accel):
     name = self.ReorderKeyString(accel)
     if len(accel) != len(name):
         accel = protect_pango_markup(accel)
         ErrorDialog(self.Widget.get_toplevel(),
                     _("\"%s\" is not a valid shortcut") % accel)
         return
     self.BindingEdited(accel)
Example #3
0
 def __init__(self, value=""):
     gtk.Alignment.__init__(self, 0.5, 0.5, 0.0, 0.0)
     
     box = gtk.HBox()
     self.Warning = gtk.Label()
     self.Markup = _("<span size=\"large\"><b>No matches found.</b> </span><span>\n\n Your filter \"<b>%s</b>\" does not match any items.</span>")
     value = protect_pango_markup(value)
     self.Warning.set_markup(self.Markup % value)
     image = Image("face-surprise", ImageThemed, 48)
         
     box.pack_start(image, False, False, 0)
     box.pack_start(self.Warning, True, True, 15)
     self.add(box)
Example #4
0
 def HandleDialogText(self, mask):
     edges = mask.split("|")
     valid = True
     for edge in edges:
         if edge not in Edges:
             valid = False
             break
     if not valid:
         mask = protect_pango_markup(mask)
         ErrorDialog(self.Widget.get_toplevel(),
                     _("\"%s\" is not a valid edge mask") % mask)
         return
     self.EdgeEdited("|".join(edges))
Example #5
0
 def HandleDialogText (self, mask):
     edges = mask.split ("|")
     valid = True
     for edge in edges:
         if edge not in Edges:
             valid = False
             break
     if not valid:
         mask = protect_pango_markup (mask)
         ErrorDialog (self.Widget.get_toplevel (),
                      _("\"%s\" is not a valid edge mask") % mask)
         return
     self.EdgeEdited ("|".join (edges))
Example #6
0
 def __init__(self, value=""):
     GObject.GObject.__init__(self, 0.5, 0.5, 0.0, 0.0)
     
     box = Gtk.HBox()
     self.Warning = Gtk.Label()
     self.Markup = _("<span size=\"large\"><b>No matches found.</b> </span><span>\n\n Your filter \"<b>%s</b>\" does not match any items.</span>")
     value = protect_pango_markup(value)
     self.Warning.set_markup(self.Markup % value)
     image = Image("face-surprise", ImageThemed, 48)
         
     box.pack_start(image, False, False, 0)
     box.pack_start(self.Warning, True, True, 15)
     self.add(box)
Example #7
0
    def MakeLabel(self):

        if not self.Setting:
            return

        label = Gtk.Label()
        desc = protect_pango_markup(self.Setting.ShortDesc)
        style = "%s"
        if self.Setting.Integrated:
            style = "<i>%s</i>"
        label.set_markup(style % desc)
        label.props.xalign = 0
        label.set_size_request(160, -1)
        label.props.wrap_mode = Gtk.WrapMode.WORD
        label.set_line_wrap(True)
        self.Label = label
Example #8
0
    def MakeLabel(self):

        if not self.Setting:
            return

        label = Gtk.Label()
        desc = protect_pango_markup (self.Setting.ShortDesc)
        style = "%s"
        if self.Setting.Integrated:
            style = "<i>%s</i>"
        label.set_markup(style % desc)
        label.props.xalign = 0
        label.set_size_request(160, -1)
        label.props.wrap_mode = Gtk.WrapMode.WORD
        label.set_line_wrap(True)
        self.Label = label
Example #9
0
def protect_markup_dict(dict_):
    return dict((k, protect_pango_markup(v)) for (k, v) in dict_.iteritems())
Example #10
0
 def update(self, value):
     value = protect_pango_markup(value)
     self.Warning.set_markup(self.Markup % value)
Example #11
0
def protect_markup_dict (dict_):
    return dict((k, protect_pango_markup (v)) for (k, v) in dict_.items())
Example #12
0
 def update(self, value):
     value = protect_pango_markup(value)
     self.Warning.set_markup(self.Markup % value)
Example #13
0
 def ShowErrorDialog(button):
     button = protect_pango_markup(button)
     ErrorDialog(self.Widget.get_toplevel(),
                 _("\"%s\" is not a valid button") % button)
Example #14
0
 def ShowErrorDialog (button):
     button = protect_pango_markup (button)
     ErrorDialog (self.Widget.get_toplevel (),
                  _("\"%s\" is not a valid button") % button)