Beispiel #1
0
    def __init__(self, browser):
        super(PreferencesButton, self).__init__()

        self._menu = menu = Gtk.Menu()

        wide_mode = ConfigCheckMenuItem(_("_Wide Mode"), "browsers",
                                        "pane_wide_mode", True)
        wide_mode.connect("toggled", self.__wide_mode_changed, browser)
        menu.append(wide_mode)

        pref_item = MenuItem(_("_Preferences"), Icons.PREFERENCES_SYSTEM)

        def preferences_cb(menu_item):
            window = Preferences(browser)
            window.show()

        pref_item.connect("activate", preferences_cb)
        menu.append(pref_item)

        menu.show_all()

        button = MenuButton(SymbolicIconImage(Icons.EMBLEM_SYSTEM,
                                              Gtk.IconSize.MENU),
                            arrow=True)
        button.set_menu(menu)
        button.show()
        self.pack_start(button, True, True, 0)
Beispiel #2
0
    def __init__(self, browser):
        super(PreferencesButton, self).__init__()

        self._menu = menu = Gtk.Menu()

        wide_mode = ConfigCheckMenuItem(
            _("_Wide Mode"), "browsers", "pane_wide_mode", True)
        wide_mode.connect("toggled", self.__wide_mode_changed, browser)
        menu.append(wide_mode)

        pref_item = MenuItem(_("_Preferences"), Icons.PREFERENCES_SYSTEM)

        def preferences_cb(menu_item):
            window = Preferences(browser)
            window.show()
        pref_item.connect("activate", preferences_cb)
        menu.append(pref_item)

        menu.show_all()

        button = MenuButton(
                SymbolicIconImage(Icons.EMBLEM_SYSTEM, Gtk.IconSize.MENU),
                arrow=True)
        button.set_menu(menu)
        button.show()
        self.pack_start(button, True, True, 0)
Beispiel #3
0
    def __init__(self, browser):
        super(PreferencesButton, self).__init__()

        self._menu = menu = Gtk.Menu()

        pref_item = MenuItem(_("_Preferences"), Icons.PREFERENCES_SYSTEM)

        def preferences_cb(menu_item):
            window = Preferences(browser)
            window.show()
        pref_item.connect("activate", preferences_cb)
        menu.append(pref_item)

        menu.show_all()

        button = MenuButton(
                SymbolicIconImage(Icons.EMBLEM_SYSTEM, Gtk.IconSize.MENU),
                arrow=True)
        button.set_menu(menu)
        button.show()
        self.pack_start(button, True, True, 0)
Beispiel #4
0
    def __init__(self, browser):
        super(PreferencesButton, self).__init__()

        self._menu = menu = Gtk.Menu()

        pref_item = MenuItem(_("_Preferences"), Icons.PREFERENCES_SYSTEM)

        def preferences_cb(menu_item):
            window = Preferences(browser)
            window.show()

        pref_item.connect("activate", preferences_cb)
        menu.append(pref_item)

        menu.show_all()

        button = MenuButton(SymbolicIconImage(Icons.EMBLEM_SYSTEM,
                                              Gtk.IconSize.MENU),
                            arrow=True)
        button.set_menu(menu)
        button.show()
        self.pack_start(button, True, True, 0)