Subversion Repositories basico

Rev

Rev 112 | Rev 117 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 112 Rev 113
Line 243... Line 243...
243
        popover_dashboard = Gtk.Popover.new_from_model(button, menu)
243
        popover_dashboard = Gtk.Popover.new_from_model(button, menu)
244
        popover_dashboard.set_position(Gtk.PositionType.BOTTOM)
244
        popover_dashboard.set_position(Gtk.PositionType.BOTTOM)
245
        button.connect('clicked', lambda _: popover_dashboard.show_all())
245
        button.connect('clicked', lambda _: popover_dashboard.show_all())
246
246
247
247
248
    def setup_menu_settings(self):
-
 
249
        ### SETTINGS POPOVER
-
 
250
        menu = Gio.Menu()
-
 
251
        #~ self.gui.add_widget("menu", menu)
-
 
252
        menu.append_item(self.uif.create_item('Fullscreen', 'app.settings-fullscreen', 'gtk-fullscreen'))
-
 
253
        menu.append_item(self.uif.create_item('Rename current project', 'app.project-rename', 'preferences-desktop-personal'))
-
 
254
        menu.append_item(self.uif.create_item('Refresh current project', 'app.project-refresh', 'view-refresh'))
-
 
255
        menu.append_item(self.uif.create_item('Close current project', 'app.project-close', 'window-close'))
-
 
256
        menu.append_item(self.uif.create_item('Delete current project', 'app.project-delete', 'list-remove'))
-
 
257
        menu.append_item(self.uif.create_item('Export current project', 'app.project-delete', 'document-save-as'))
-
 
258
        window = self.gui.get_window()
-
 
259
        window.set_app_menu(menu)
-
 
260
        app = self.gui.get_app()
-
 
261
        app.add_action(self.uif.create_item("settings-fullscreen"))
-
 
-
 
248
    #~ def setup_menu_settings(self):
-
 
249
        #~ ### SETTINGS POPOVER
-
 
250
        #~ menu = Gio.Menu()
-
 
251
        #~ menu.append_item(self.uif.create_item('Fullscreen', 'app.settings-fullscreen', 'gtk-fullscreen'))
-
 
252
        #~ menu.append_item(self.uif.create_item('Rename current project', 'app.project-rename', 'preferences-desktop-personal'))
-
 
253
        #~ menu.append_item(self.uif.create_item('Refresh current project', 'app.project-refresh', 'view-refresh'))
-
 
254
        #~ menu.append_item(self.uif.create_item('Close current project', 'app.project-close', 'window-close'))
-
 
255
        #~ menu.append_item(self.uif.create_item('Delete current project', 'app.project-delete', 'list-remove'))
-
 
256
        #~ menu.append_item(self.uif.create_item('Export current project', 'app.project-delete', 'document-save-as'))
-
 
257
        #~ window = self.gui.get_window()
-
 
258
        #~ window.set_app_menu(menu)
-
 
259
        #~ app = self.gui.get_app()
-
 
260
        #~ app.add_action(self.uif.create_item("settings-fullscreen"))
262
261
263
        #~ popover_action_group = Gio.SimpleActionGroup()
-
 
264
        btnsettings = self.gui.get_widget("mnuBtnViews")
-
 
265
        popover_settings = Gtk.Popover.new_from_model(btnsettings, menu)
-
 
266
        popover_settings.set_position(Gtk.PositionType.BOTTOM)
-
 
267
        btnsettings.connect('clicked', lambda _: popover_settings.show_all())
-
 
-
 
262
        #~ btnsettings = self.gui.get_widget("mnuBtnViews")
-
 
263
        #~ popover_settings = Gtk.Popover.new_from_model(btnsettings, menu)
-
 
264
        #~ popover_settings.set_position(Gtk.PositionType.BOTTOM)
-
 
265
        #~ btnsettings.connect('clicked', lambda _: popover_settings.show_all())
268
266
269
267
270
    def setup_popover_settings(self, widget):
268
    def setup_popover_settings(self, widget):
271
        #Creating a popover
269
        #Creating a popover
272
        popover = Gtk.Popover.new(widget)
270
        popover = Gtk.Popover.new(widget)