🔧 chore(remove): clean code

Signed-off-by: Abhiraj Roy <157954129+iconized@users.noreply.github.com>
This commit is contained in:
Abhiraj Roy
2024-06-03 03:44:26 +05:30
parent f0809e8ff3
commit 46b81fae7e
19 changed files with 0 additions and 5540 deletions

View File

@@ -1,45 +0,0 @@
import gi
gi.require_version("Gtk", "4.0")
from gi.repository import Gtk
# Gtk.Builder xml for the application menu
APP_MENU = """
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id='app-menu'>
<section>
<item>
<attribute name='label' translatable='yes'>_About</attribute>
<attribute name='action'>win.about</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Settings</attribute>
<attribute name='action'>win.settings</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Refresh</attribute>
<attribute name='action'>win.refresh</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>_Quit</attribute>
<attribute name='action'>win.quit</attribute>
</item>
</section>
</menu>
</interface>
"""
class MenuButton(Gtk.MenuButton):
"""
Wrapper class for at Gtk.Menubutton with a menu defined
in a Gtk.Builder xml string
"""
def __init__(self, icon_name="open-menu-symbolic"):
super(MenuButton, self).__init__()
builder = Gtk.Builder.new_from_string(APP_MENU, -1)
menu = builder.get_object("app-menu")
self.set_menu_model(menu)
self.set_icon_name(icon_name)