Commit 8c7d5e0c authored by Kai Willadsen's avatar Kai Willadsen

ui.statusbar: Add a new view settings popover to the status bar (#62)

This exposes several view options that were previously preference-only
in the status bar.
parent 33039124
<?xml version="1.0" encoding="UTF-8"?>
<menu id="statusbar-menu">
<attribute name="label">Display line numbers</attribute>
<attribute name="action">show-line-numbers</attribute>
<attribute name="label">Highlight current line</attribute>
<attribute name="action">highlight-current-line-local</attribute>
<attribute name="label">Text wrapping</attribute>
Please register or sign in to reply
<attribute name="action">wrap-mode-bool</attribute>
......@@ -146,6 +146,8 @@ class MeldStatusBar(Gtk.Statusbar):
self.construct_highlighting_selector(), False, True, 0)
self.construct_encoding_selector(), False, True, 0)
self.construct_display_popover(), False, True, 0)
def construct_line_display(self):
......@@ -264,3 +266,19 @@ class MeldStatusBar(Gtk.Statusbar):
return button
def construct_display_popover(self):
builder = Gtk.Builder.new_from_resource(
menu = builder.get_object('statusbar-menu')
pop = Gtk.Popover()
pop.bind_model(menu, 'view')
button = MeldStatusMenuButton()
  • Please disambiguate this string from the identical string in meld/resources/ui/preferences.ui with context.

  • Also in 744de362 I've added a translation comment like the other ones we have i.e., just a normal Python comment above the line. Do you happen to know whether there's a better way to add context comments for Python applications?

  • E.g. accerciser has a few strings with context (look for msgctxt in and I’m sure there are other examples, but reading the comment you’ve added, I no longer think it’s absolutely necessary, at least for my language.

  • Yeah, looks like accerciser are doing the same thing we are with adding a code comment. Thanks!

  • No, comments and context are two different things. You can add context to separate two or more identical strings (

    Edited by Piotr Drąg
Please register or sign in to reply
return button
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment