Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .pybuild/cpython3_3.11/.pydistutils.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[clean]
all=1
[build]
build_lib=/home/etapadmin/Masaüstü/eta-menu/.pybuild/cpython3_3.11/build
[install]
force=1
install_layout=deb
install_scripts=$base/bin
install_lib=/usr/lib/python3.11/dist-packages
prefix=/usr
9 changes: 9 additions & 0 deletions data/eta-menu.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=Eta Menu
Comment=Eta Menu Ayarları
Exec=cinnamon-settings applets eta-menu@karahan
Icon=eta-menu
Categories=Settings;

123 changes: 123 additions & 0 deletions data/eta-menu@karahan/applet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
const Applet = imports.ui.applet;
const Settings = imports.ui.settings;
const Main = imports.ui.main;
const GLib = imports.gi.GLib;

const St = imports.gi.St;
const Gio = imports.gi.Gio;


class EtaMenuApplet extends Applet.TextIconApplet {
constructor(metadata, orientation, panelHeight, instanceId) {
super(orientation, panelHeight, instanceId);

this.settings = new Settings.AppletSettings(this, metadata.uuid, instanceId);

this.settings.bind("menu-command", "menuCommand");
this.settings.bind("use-icon", "useIcon", this._updateAppearance.bind(this));
this.settings.bind("use-label", "useLabel", this._updateAppearance.bind(this));
this.settings.bind("icon-name", "iconName", this._updateAppearance.bind(this));
this.settings.bind("label-text", "labelText", this._updateAppearance.bind(this));
this.settings.bind("overlay-key", "overlayKey", this._updateKeybinding);
this.settings.bind("icon-size", "menuIconSize", this._updateAppearance.bind(this));


this.set_applet_tooltip("Eta Menu");

this._updateAppearance();
this._updateKeybinding();

}

_updateKeybinding() {
global.logError("tuşa basıldı boş!");
if (this._hotkeyId)
Main.keybindingManager.removeHotKey(this._hotkeyId);

this._hotkeyId = Main.keybindingManager.addHotKey(
"eta-menu-overlay-" + this.instance_id,
this.overlayKey,
() => {
this.on_applet_clicked();
}
);
}

_updateAppearance() {
// Label fallback
let text = (this.useLabel && this.labelText && this.labelText.length > 0)
? this.labelText
: (this.useLabel ? "Menu" : "");

// 1️⃣ Sadece metin
if (!this.useIcon && this.useLabel) {
this._applet_icon_box.hide();
this.set_applet_label(text);
}
// 2️⃣ Sadece ikon
else if (this.useIcon && !this.useLabel) {
this.set_applet_label("");
this._applet_icon_box.show();
let iconToUse = (this.iconName && this.iconName.includes("-symbolic"))
? this.iconName
: "eta-menu-symbolic";

this.set_applet_icon_symbolic_name(iconToUse);


// Boyutu uygula
if (this._applet_icon_box.get_children().length > 0) {
this._applet_icon_box.get_children()[0].set_icon_size(this.menuIconSize);
}
}
// 3️⃣ İkon + metin
else if (this.useIcon && this.useLabel) {
this._applet_icon_box.show();
this.set_applet_label(text);

let iconToUse = (this.iconName && this.iconName.includes("-symbolic"))
? this.iconName
: "eta-menu-symbolic";

this.set_applet_icon_symbolic_name(iconToUse);

// Boyutu uygula
if (this._applet_icon_box.get_children().length > 0) {
this._applet_icon_box.get_children()[0].set_icon_size(this.menuIconSize);
}
}
// 4️⃣ Ne ikon ne metin seçili → fallback ikon
else {
this._applet_icon_box.show();
this.set_applet_icon_symbolic_name("eta-menu-symbolic");
this.set_applet_label("");

if (this._applet_icon_box.get_children().length > 0) {
this._applet_icon_box.get_children()[0].set_icon_size(this.menuIconSize);
}
let fullIcon = new St.Icon({
gicon: Gio.icon_new_for_string(this.path + "/icons/eta-menu.svg"),
icon_size: this.menuIconSize
});
this._applet_icon_box.add_child(fullIcon);

}

// Tooltip
this.set_applet_tooltip(text);
}


on_applet_clicked() {
if (!this.menuCommand) {
global.logError("menuCommand boş!");
return;
}
GLib.spawn_command_line_async(this.menuCommand);
}
}

function main(metadata, orientation, panelHeight, instanceId) {
return new EtaMenuApplet(metadata, orientation, panelHeight, instanceId);
}

8 changes: 8 additions & 0 deletions data/eta-menu@karahan/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"uuid": "eta-menu@karahan",
"name": "Eta Menu",
"description": "Eta Menu (Cinnamon tarzı)",
"version": 1,
"max-instances": 1
}

49 changes: 49 additions & 0 deletions data/eta-menu@karahan/settings-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"menu-command": {
"type": "entry",
"default": "/usr/bin/eta-menu",
"description": "Çalıştırılacak komut"
},
"use-icon": {
"type": "checkbox",
"default": true,
"description": "Simge göster"
},

"icon-name": {
"type": "iconfilechooser",
"default": "start-here",
"description": "Simge",
"dependency": "use-icon"
},
"icon-size": {
"type": "spinbutton",
"default": 32,
"min": 16,
"max": 96,
"step": 1,
"units": "px",
"description": "Simge boyutu (px)",
"dependency": "use-icon"
},

"use-label": {
"type": "checkbox",
"default": true,
"description": "Metin göster"
},

"label-text": {
"type": "entry",
"default": "Menu",
"description": "Metin",
"dependency": "use-label"
},
"overlay-key" : {
"type" : "keybinding",
"description" : "Keyboard shortcut to open and close the menu",
"default" : "Super_L::Super_R"
}

}

2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
eta-menu (1.2.0) unstable; urgency=medium
eta-menu (1.2.1) unstable; urgency=medium

* Add PowerOff Dialog for power_off button
* Update po/files
Expand Down
2 changes: 2 additions & 0 deletions debian/files
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eta-menu_1.2.1_all.deb x11 optional
eta-menu_1.2.1_amd64.buildinfo x11 optional
1 change: 0 additions & 1 deletion debian/source/format

This file was deleted.

Binary file added eta-menu_1.2.1_all.deb
Binary file not shown.
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ def create_mo_files():
("/usr/share/icons/hicolor/scalable/apps/",
["data/eta-menu.svg",
"data/eta-menu-panel-symbolic.svg"]),

("/usr/share/cinnamon/applets/eta-menu@karahan/",
["data/eta-menu@karahan/metadata.json"]),

("/usr/share/cinnamon/applets/eta-menu@karahan/",
["data/eta-menu@karahan/settings-schema.json"]),

("/usr/share/cinnamon/applets/eta-menu@karahan/",
["data/eta-menu@karahan/applet.js"]),

("/usr/share/applications/",
["data/eta-menu.desktop"]),

("/etc/eta/eta-menu/",
["data/favorites.json"]),
("/etc/xdg/autostart/",
Expand Down
1 change: 1 addition & 0 deletions src/__version__
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.2.1