Exemple #1
0
    def do_startup(self):
        Gtk.Application.do_startup(self)

        util.load_style_sheet('@PACKAGE_DBUS_PATH@/application.css')

        util.init_actions(self, [{'name': 'quit', 'activate': self._on_quit}])
        self._init_app_menu()
Exemple #2
0
    def do_startup(self):
        Gtk.Application.do_startup(self)

        util.load_style_sheet('/org/madbob/Assetxplorer/application.css')

        util.init_actions(self,
                          [{ 'name': 'quit',
                             'activate': self._on_quit }])
        self._init_app_menu()
    def do_startup(self):
        Gtk.Application.do_startup(self)

        util.load_style_sheet('@PACKAGE_DBUS_PATH@/application.css')

        util.init_actions(self,
                          [{ 'name': 'quit',
                             'activate': self._on_quit }])
        self._init_app_menu()
    def __init__(self, title=None, default_width=640, default_height=480, **kw):
        if not title:
            title = GLib.get_application_name()
        super().__init__(title=title,
                         default_width=default_width, default_height=default_height,
                         **kw)

        util.init_actions(self,
                          [{ 'name': 'about',
                             'activate': self._about }])

        builder = Gtk.Builder()
        builder.add_from_resource('@PACKAGE_DBUS_PATH@/main.ui')

        self.set_titlebar(builder.get_object('main-header'))

        grid = builder.get_object('main-grid')
        self.add(grid)
Exemple #5
0
    def __init__(self,
                 title=None,
                 default_width=640,
                 default_height=480,
                 **kw):
        if not title:
            title = GLib.get_application_name()
        super().__init__(title=title,
                         default_width=default_width,
                         default_height=default_height,
                         **kw)

        util.init_actions(self, [{'name': 'about', 'activate': self._about}])

        builder = Gtk.Builder()
        builder.add_from_resource('@PACKAGE_DBUS_PATH@/main.ui')

        self.set_titlebar(builder.get_object('main-header'))

        grid = builder.get_object('main-grid')
        self.add(grid)
Exemple #6
0
    def __init__(self, title=None, default_width=1000, default_height=800, **kw):
        if not title:
            title = GLib.get_application_name()

        super().__init__(title=title, default_width=default_width, default_height=default_height, **kw)

        util.init_actions(self, [{ 'name': 'about', 'activate': self._about }])

        self.builder = Gtk.Builder()
        self.builder.add_from_resource('/org/madbob/Assetxplorer/main.ui')

        self.set_titlebar(self.builder.get_object('main-header'))
        self.new_button = self.builder.get_object('new-button')
        self.new_button.connect('clicked', self._on_new_folder)
        self.back_button = self.builder.get_object('back-button')
        self.back_button.connect('clicked', self._on_back)

        self.stack = self.builder.get_object('main-stack')
        self.add(self.stack)
        self.stack.show_all()

        self.viewer = self.builder.get_object('contents')

        self.folderslist = self.builder.get_object('list')
        self.folderslist.get_style_context().add_class("assetxplorer-folders")
        self.folderslist.connect('row-activated', self._view_folder)

        self.conf = util.get_settings('org.madbob.Assetxplorer')
        folders = self.conf.get_value('folders')
        if folders:
            self.stack.set_visible_child(self.folderslist)
            for f in folders:
                self._create_button(f)
        else:
            empty = self.builder.get_object('empty')
            self.stack.set_visible_child(empty)