Skip to content

Commit

Permalink
menu: remove lock orientation option
Browse files Browse the repository at this point in the history
Fix: #37
  • Loading branch information
Aryan20 committed Sep 18, 2022
1 parent c4d232f commit 40107bb
Show file tree
Hide file tree
Showing 17 changed files with 309 additions and 411 deletions.
17 changes: 0 additions & 17 deletions PrefsLib/adw.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,22 +229,6 @@ var LogoMenuOptionsWidget = GObject.registerClass(class Logo_Menu_OptionsWidget

lockScreenOptionRow.add_suffix(showLCOptionsSwitch);

// Toggle Lock Orientation option and build it's option in prefs
let lockOrientationOptionRow = new Adw.ActionRow({
title:_("Show Lock Orientation option")
});

let showLOOptionsSwitch= new Gtk.Switch({
valign: Gtk.Align.CENTER,
});

showLOOptionsSwitch.set_active(this._settings.get_boolean('show-lockorientation'));
showLOOptionsSwitch.connect('notify::active', (widget) => {
this._settings.set_boolean('show-lockorientation', widget.get_active());
});

lockOrientationOptionRow.add_suffix(showLOOptionsSwitch);

// Toggle Software centre option and build it's option in prefs
let SoftwareCentreOptionRow = new Adw.ActionRow({
title:_("Hide Software Centre option")
Expand All @@ -268,7 +252,6 @@ var LogoMenuOptionsWidget = GObject.registerClass(class Logo_Menu_OptionsWidget
prefGroup2.add(showPowerOptionsRow);
prefGroup2.add(forceQuitOptionrow);
prefGroup2.add(lockScreenOptionRow);
prefGroup2.add(lockOrientationOptionRow);
prefGroup2.add(SoftwareCentreOptionRow);

this.add(prefGroup1);
Expand Down
38 changes: 0 additions & 38 deletions PrefsLib/gtk.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,44 +364,6 @@ var LogoMenuPreferencesWidget = GObject.registerClass(class Logo_Menu_Preference
this.append(lockScreenOptionFrame);
}

// Toggle Lock Orientation option and build it's option in prefs
let lockOrientationOptionFrame = new Gtk.Frame();
let lockOrientationOptionBox = new Gtk.Box({
margin_top: 5,
margin_bottom: 5,
margin_start: 5,
margin_end: 5,
});

let enableLOOptionText = new Gtk.Label({
label: _("Show Lock Orientation option"),
use_markup: true,
xalign: 0,
hexpand: true
})

let showLOOptionsSwitch= new Gtk.Switch({
halign: Gtk.Align.END,
});

showLOOptionsSwitch.set_active(this._settings.get_boolean('show-lockorientation'));
showLOOptionsSwitch.connect('notify::active', (widget) => {
this._settings.set_boolean('show-lockorientation', widget.get_active());
});

if (shellVersion < 40){
lockOrientationOptionBox.add(enableLOOptionText);
lockOrientationOptionBox.add(showLOOptionsSwitch);
lockOrientationOptionFrame.add(lockOrientationOptionBox);
this.add(lockOrientationOptionFrame);
}
else{
lockOrientationOptionBox.append(enableLOOptionText);
lockOrientationOptionBox.append(showLOOptionsSwitch);
lockOrientationOptionFrame.set_child(lockOrientationOptionBox);
this.append(lockOrientationOptionFrame);
}

// Toggle Software centre option and build it's option in prefs
let SoftwareCentreOptionFrame = new Gtk.Frame();
let SoftwareCentreOptionBox = new Gtk.Box({
Expand Down
14 changes: 0 additions & 14 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ var MenuButton = GObject.registerClass(class LogoMenu_MenuButton extends PanelMe
_init() {
super._init(0.0, "MenuButton");
this._settings = ExtensionUtils.getSettings(Me.metadata['settings-schema']);
this._system = Main.panel.statusArea.aggregateMenu._system;

// Icon
this.icon = new St.Icon({
Expand All @@ -93,7 +92,6 @@ var MenuButton = GObject.registerClass(class LogoMenu_MenuButton extends PanelMe
this._settings.connect('changed::show-power-options', () => this.toggleOptions())
this._settings.connect('changed::hide-forcequit', () => this.toggleOptions())
this._settings.connect('changed::show-lockscreen', () => this.toggleOptions())
this._settings.connect('changed::show-lockorientation', () => this.toggleOptions())
this.toggleOptions();

//bind middle click option to toggle overview
Expand All @@ -104,7 +102,6 @@ var MenuButton = GObject.registerClass(class LogoMenu_MenuButton extends PanelMe
let poweroption_state = this._settings.get_boolean('show-power-options')
let forcequit_state = this._settings.get_boolean('hide-forcequit')
let lockscreen_state = this._settings.get_boolean('show-lockscreen')
let lockorientation_state = this._settings.get_boolean('show-lockorientation')
let softwarecenter_state = this._settings.get_boolean('hide-softwarecentre')
this.menu.removeAll()
this.item1 = new PopupMenu.PopupMenuItem(_('About My System'))
Expand Down Expand Up @@ -183,17 +180,6 @@ var MenuButton = GObject.registerClass(class LogoMenu_MenuButton extends PanelMe

this.item17.connect('activate', () => _lockScreen())
}

if (lockorientation_state) {
this.item19 = new PopupMenu.PopupSeparatorMenuItem()
this.item20 = new PopupMenu.PopupMenuItem(_('Lock Orientation'))

this.menu.addMenuItem(this.item19)
this.menu.addMenuItem(this.item20)

this.item20.connect("activate", () => this._system._systemActions.activateLockOrientation())
}

}

terminal() {
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
],
"url": "https://github.com/Aryan20/Logomenu",
"uuid": "logomenu@aryan_k",
"version": 14
"version": 15
}
58 changes: 28 additions & 30 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Logo Menu 12\n"
"Project-Id-Version: Logo Menu 15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-02-24 18:30+0530\n"
"PO-Revision-Date: 2022-05-14 15:54+0530\n"
"POT-Creation-Date: 2022-09-18 12:03+0530\n"
"PO-Revision-Date: 2022-09-18 12:06+0530\n"
"Last-Translator: Heinz J. Malcharzyk <trurl.klapauzius@t-online.de>\n"
"Language-Team: German <trurl.klapauzius@t-online.de>\n"
"Language: de\n"
Expand All @@ -19,58 +19,54 @@ msgstr ""
"X-Generator: Poedit 3.0.1\n"
"X-Poedit-SourceCharset: UTF-8\n"

#: extension.js:110
#: extension.js:107
msgid "About My System"
msgstr "Über diesen Computer"

#: extension.js:113
#: extension.js:110
msgid "Activities"
msgstr "Aktivitäten"

#: extension.js:114
#: extension.js:111
msgid "App Grid"
msgstr "Programme Übersicht"

#: extension.js:116 PrefsLib/adw.js:148 PrefsLib/gtk.js:186
#: extension.js:113 PrefsLib/adw.js:148 PrefsLib/gtk.js:186
msgid "Terminal"
msgstr "Terminal"

#: extension.js:117
#: extension.js:114
msgid "Extensions"
msgstr "Erweiterungen"

#: extension.js:134
#: extension.js:131
msgid "Software Center..."
msgstr "GNOME Software ..."

#: extension.js:145
#: extension.js:142
msgid "Force Quit App"
msgstr "Beenden erzwingen"

#: extension.js:152
#: extension.js:149
msgid "Sleep"
msgstr "Bereitschaft"

#: extension.js:153
#: extension.js:150
msgid "Restart..."
msgstr "Neustart..."

#: extension.js:154
#: extension.js:151
msgid "Shut Down..."
msgstr "Ausschalten..."

#: extension.js:157 extension.js:179
#: extension.js:154 extension.js:176
msgid "Lock Screen"
msgstr "Sperren"

#: extension.js:158
#: extension.js:155
msgid "Log Out..."
msgstr "Abmelden ..."

#: extension.js:189
msgid "Lock Orientation"
msgstr "Sperrbildschirm-Ausrichtung"

#: PrefsLib/adw.js:24
msgid "Icon Settings"
msgstr "Icon Einstellungen"
Expand Down Expand Up @@ -120,38 +116,34 @@ msgid "Show Lock Screen option"
msgstr "Option zum Sperren zeigen"

#: PrefsLib/adw.js:234 PrefsLib/gtk.js:377
msgid "Show Lock Orientation option"
msgstr "Option für die Ausrichtung des Sperrbildschirms zeigen"

#: PrefsLib/adw.js:250 PrefsLib/gtk.js:415
msgid "Hide Software Centre option"
msgstr "GNOME-Software-Option verbergen"

#: PrefsLib/adw.js:283
#: PrefsLib/adw.js:266
msgid "About"
msgstr "Über dieses Programm"

#: PrefsLib/adw.js:299
#: PrefsLib/adw.js:282
msgid "Logo Menu"
msgstr "Logo Menu"

#: PrefsLib/adw.js:306
#: PrefsLib/adw.js:289
msgid "Quick access menu for GNOME"
msgstr "Schnellzugriffsmenü für GNOME"

#: PrefsLib/adw.js:321
#: PrefsLib/adw.js:304
msgid "Logo Menu Version"
msgstr "Logo Menu Version"

#: PrefsLib/adw.js:334
#: PrefsLib/adw.js:317
msgid "GNOME Version"
msgstr "GNOME Version"

#: PrefsLib/adw.js:343
#: PrefsLib/adw.js:326
msgid "Github"
msgstr "Github"

#: PrefsLib/adw.js:355
#: PrefsLib/adw.js:338
msgid ""
"<span size=\"small\">This program comes with absolutely no warranty.\n"
"See the <a href=\"https://gnu.org/licenses/old-licenses/gpl-2.0.html\">GNU "
Expand All @@ -161,6 +153,12 @@ msgstr ""
"Siehe <a href=\"https://gnu.org/licenses/old-licenses/gpl-2.0.html\">GNU "
"General Public License, version 2 oder neuer</a> für Details.</span>"

#~ msgid "Lock Orientation"
#~ msgstr "Sperrbildschirm-Ausrichtung"

#~ msgid "Show Lock Orientation option"
#~ msgstr "Option für die Ausrichtung des Sperrbildschirms zeigen"

#~ msgid "System Settings ..."
#~ msgstr "Systemeinstellungen ..."

Expand Down
Loading

0 comments on commit 40107bb

Please sign in to comment.