Skip to content
Permalink
Browse files

Merge pull request #4 from adamwojs/feature/menu-headers

Allow to create disabled menu items
  • Loading branch information...
corenominal committed Sep 10, 2016
2 parents d5692ff + 6892311 commit 29b72dd5e6ea25459d87f858729d4a67152d95bc
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/rocket-menu
@@ -54,8 +54,13 @@ class qcm_indicator():
if connection['address'][:1] == '~':
connection['address'] = os.path.expanduser(connection['address'])

if connection['address'] == '':
menu_item = Gtk.MenuItem(connection['label'])
menu_item.set_sensitive(False)
menu.append(menu_item)

# Test for horizontal rule
if connection['label'][:3] == '---':
elif connection['label'][:3] == '---':
menu.append(Gtk.SeparatorMenuItem())

# Test for file
@@ -722,9 +727,6 @@ class qcm_connections_editor(Gtk.Window):
# self.treeview.set_cursor(path, col, True)

def address_edited(self, widget, path, text):
if text.strip() == '':
text = 'ssh://server.address'

self.liststore[path][1] = text
self.button_apply.set_sensitive(True)

0 comments on commit 29b72dd

Please sign in to comment.
You can’t perform that action at this time.