Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to keep the panel hidden. #1752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
47 changes: 41 additions & 6 deletions Settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1772,11 +1772,10 @@
</object>
</child>
<child>
<object class="GtkListBoxRow" id="listboxrow_intellihide_show_in_fullscreen">
<property name="width_request">100</property>
<object class="GtkListBoxRow" id="listboxrow_intellihide_show_in_windows">
<property name="visible">True</property>
<child>
<object class="GtkGrid" id="grid_intellihide_show_in_fullscreen">
<object class="GtkGrid" id="grid_intellihide_show_in_windows">
<property name="visible">True</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
Expand All @@ -1785,10 +1784,10 @@
<property name="row_spacing">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="intellihide_show_in_fullscreen_label">
<object class="GtkLabel" id="intellihide_show_in_windows_label">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Allow the panel to be revealed while in fullscreen mode</property>
<property name="label" translatable="yes">Allow the panel to be revealed when it is obstructed by windows</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
<layout>
Expand All @@ -1798,7 +1797,7 @@
</object>
</child>
<child>
<object class="GtkSwitch" id="intellihide_show_in_fullscreen_switch">
<object class="GtkSwitch" id="intellihide_show_in_windows_switch">
<property name="visible">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
Expand All @@ -1808,6 +1807,42 @@
</layout>
</object>
</child>
<child>
<object class="GtkGrid" id="intellihide_show_in_windows_options">
<property name="visible">True</property>
<property name="margin_start">12</property>
<property name="row_spacing">4</property>
<child>
<object class="GtkLabel" id="intellihide_show_in_fullscreen_label">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Allow the panel to be revealed while in fullscreen mode</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSwitch" id="intellihide_show_in_fullscreen_switch">
<property name="visible">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<layout>
<property name="row">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
<layout>
<property name="row">1</property>
<property name="column">0</property>
<property name="column-span">2</property>
</layout>
</object>
</child>
</object>
</child>
</object>
Expand Down
4 changes: 4 additions & 0 deletions intellihide.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ var Intellihide = class {

if (fromRevealMechanism) {
let mouseBtnIsPressed = global.get_pointer()[2] & Clutter.ModifierType.BUTTON1_MASK;

if (!Me.settings.get_boolean('intellihide-show-in-windows')) {
return false;
}

//the user is trying to reveal the panel
if (this._monitor.inFullscreen && !mouseBtnIsPressed) {
Expand Down
1 change: 1 addition & 0 deletions media/sources/D2P_import settings/Mountain_intellihide
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ intellihide-pressure-time=1000
app-ctrl-hotkey-10=['<Primary><Super>0']
status-icon-padding=-1
intellihide-show-in-fullscreen=false
intellihide-show-in-windows=true
app-hotkey-kp-1=['<Super>KP_1']
app-hotkey-2=['<Super>2']
app-hotkey-kp-2=['<Super>KP_2']
Expand Down
1 change: 1 addition & 0 deletions media/sources/D2P_import settings/Wolf_programmer
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ intellihide-pressure-time=1000
app-ctrl-hotkey-10=['<Primary><Super>0']
status-icon-padding=-1
intellihide-show-in-fullscreen=false
intellihide-show-in-windows=true
app-hotkey-kp-1=['<Super>KP_1']
app-hotkey-2=['<Super>2']
app-hotkey-kp-2=['<Super>KP_2']
Expand Down
9 changes: 9 additions & 0 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,14 @@ const Preferences = class {
'sensitive',
Gio.SettingsBindFlags.DEFAULT);

this._settings.bind('intellihide-show-in-windows',
this._builder.get_object('intellihide_show_in_windows_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('intellihide-show-in-windows',
this._builder.get_object('intellihide_show_in_windows_options'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('intellihide-show-in-fullscreen',
this._builder.get_object('intellihide_show_in_fullscreen_switch'),
'active',
Expand Down Expand Up @@ -1228,6 +1236,7 @@ const Preferences = class {
this._settings.set_value('intellihide-behaviour', this._settings.get_default_value('intellihide-behaviour'));
this._settings.set_value('intellihide-use-pressure', this._settings.get_default_value('intellihide-use-pressure'));
this._settings.set_value('intellihide-show-in-fullscreen', this._settings.get_default_value('intellihide-show-in-fullscreen'));
this._settings.set_value('intellihide-show-in-windows', this._settings.get_default_value('intellihide-show-in-windows'));
this._settings.set_value('intellihide-only-secondary', this._settings.get_default_value('intellihide-only-secondary'));

this._settings.set_value('intellihide-pressure-threshold', this._settings.get_default_value('intellihide-pressure-threshold'));
Expand Down
5 changes: 5 additions & 0 deletions schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@
<summary>Intellihide pressure</summary>
<description>Allow the panel to be revealed while an application is in fullscreen mode</description>
</key>
<key type="b" name="intellihide-show-in-windows">
<default>true</default>
<summary>Intellihide pressure</summary>
<description>Allow the panel to be revealed when it is obstructed by windows</description>
</key>
<key type="b" name="intellihide-only-secondary">
<default>false</default>
<summary>Intellihide only secondary</summary>
Expand Down