mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Add new panel positioning options
This commit is contained in:
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
UUID = dash-to-panel@jderose9.github.com
|
UUID = dash-to-panel@jderose9.github.com
|
||||||
BASE_MODULES = extension.js stylesheet.css metadata.json COPYING README.md
|
BASE_MODULES = extension.js stylesheet.css metadata.json COPYING README.md
|
||||||
EXTRA_MODULES = appIcons.js convenience.js panel.js panelManager.js proximity.js intellihide.js progress.js panelStyle.js overview.js taskbar.js transparency.js windowPreview.js prefs.js update.js utils.js Settings.ui
|
EXTRA_MODULES = appIcons.js convenience.js panel.js panelManager.js proximity.js intellihide.js progress.js panelPositions.js panelStyle.js overview.js taskbar.js transparency.js windowPreview.js prefs.js update.js utils.js Settings.ui
|
||||||
EXTRA_IMAGES = highlight_stacked_bg.svg highlight_stacked_bg_2.svg highlight_stacked_bg_3.svg
|
EXTRA_IMAGES = highlight_stacked_bg.svg highlight_stacked_bg_2.svg highlight_stacked_bg_3.svg
|
||||||
|
|
||||||
TOLOCALIZE = prefs.js appIcons.js update.js
|
TOLOCALIZE = prefs.js appIcons.js update.js
|
||||||
|
|||||||
468
Settings.ui
468
Settings.ui
@@ -3782,6 +3782,54 @@
|
|||||||
<property name="position">2</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow" id="listboxrow17">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="shrink_dash3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">12</property>
|
||||||
|
<property name="margin_right">12</property>
|
||||||
|
<property name="margin_top">12</property>
|
||||||
|
<property name="margin_bottom">12</property>
|
||||||
|
<property name="column_spacing">32</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="shrink_dash_label3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="label" translatable="yes">Animate <i>Show Applications</i>.</property>
|
||||||
|
<property name="use_markup">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSwitch" id="application_button_animation_switch">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkAdjustment" id="show_showdesktop_delay_adjustment">
|
<object class="GtkAdjustment" id="show_showdesktop_delay_adjustment">
|
||||||
<property name="upper">5000</property>
|
<property name="upper">5000</property>
|
||||||
@@ -4394,94 +4442,61 @@
|
|||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="shadow_type">in</property>
|
<property name="shadow_type">in</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox" id="taskbar_display_listbox">
|
<object class="GtkBox" id="taskbar_display_box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="selection_mode">none</property>
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow" id="taskbar_position_listboxrow">
|
<object class="GtkGrid" id="taskbar_position_grid">
|
||||||
<property name="width_request">100</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_left">12</property>
|
||||||
|
<property name="margin_right">12</property>
|
||||||
|
<property name="margin_top">12</property>
|
||||||
|
<property name="margin_bottom">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid" id="taskbar_position_grid">
|
<object class="GtkLabel" id="taskbar_position_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="margin_left">12</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="margin_right">12</property>
|
<property name="label" translatable="yes">Order and position of panel elements on monitor</property>
|
||||||
<property name="margin_top">12</property>
|
<property name="xalign">0</property>
|
||||||
<property name="margin_bottom">12</property>
|
|
||||||
<property name="row_spacing">32</property>
|
|
||||||
<property name="column_spacing">32</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="taskbar_position_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="label" translatable="yes">Taskbar position</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="taskbar_position_combo">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBoxText" id="taskbar_position_monitor_combo">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow" id="location_clock_listboxrow">
|
<object class="GtkListBox" id="taskbar_display_listbox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<property name="margin_bottom">6</property>
|
||||||
<object class="GtkGrid" id="location_clock_grid">
|
<property name="selection_mode">none</property>
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="margin_left">12</property>
|
|
||||||
<property name="margin_right">12</property>
|
|
||||||
<property name="margin_top">12</property>
|
|
||||||
<property name="margin_bottom">12</property>
|
|
||||||
<property name="row_spacing">32</property>
|
|
||||||
<property name="column_spacing">32</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="location_clock_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="label" translatable="yes">Clock location</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBoxText" id="location_clock_combo">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -4588,79 +4603,6 @@
|
|||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="multimon_multi_show_status_menu_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="multimon_multi_show_clock_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSwitch" id="multimon_multi_show_status_menu_switch">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="halign">end</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSwitch" id="multimon_multi_show_clock_switch">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="halign">end</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="stockgs_top_panel_description">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="no_show_all">True</property>
|
|
||||||
<property name="margin_top">6</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="label" translatable="yes">For the following 2 options, "additional" refers to panels that are displayed in addition to the gnome-shell top panel.</property>
|
|
||||||
<property name="wrap">True</property>
|
|
||||||
<property name="max_width_chars">40</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<placeholder/>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -5847,238 +5789,6 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkListBoxRow" id="listboxrow17">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid" id="shrink_dash3">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="margin_left">12</property>
|
|
||||||
<property name="margin_right">12</property>
|
|
||||||
<property name="margin_top">12</property>
|
|
||||||
<property name="margin_bottom">12</property>
|
|
||||||
<property name="column_spacing">32</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="shrink_dash_label3">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="label" translatable="yes">Show <i>Applications</i> icon</property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkCheckButton" id="application_button_animation_button">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">False</property>
|
|
||||||
<property name="margin_left">12</property>
|
|
||||||
<property name="margin_top">3</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="label3">
|
|
||||||
<property name="name">4</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="margin_left">4</property>
|
|
||||||
<property name="label" translatable="yes">Animate <i>Show Applications</i>.</property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="show_application_button_box">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="show_application_options_button">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="xalign">0.46000000834465027</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage" id="show_application_options_options">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="icon_name">emblem-system-symbolic</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<style>
|
|
||||||
<class name="circular"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSwitch" id="show_applications_button_switch">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="halign">end</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkListBoxRow" id="show_activities_button_row">
|
|
||||||
<property name="width_request">100</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid" id="show_activities_button_grid">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="margin_left">12</property>
|
|
||||||
<property name="margin_right">12</property>
|
|
||||||
<property name="margin_top">12</property>
|
|
||||||
<property name="margin_bottom">12</property>
|
|
||||||
<property name="column_spacing">32</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSwitch" id="show_activities_button_switch">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="halign">end</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="show_activities_button_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="label" translatable="yes">Show <i>Activities</i> button</property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkListBoxRow" id="show_showdesktop_row">
|
|
||||||
<property name="width_request">100</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkGrid" id="show_showdesktop_button_grid">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="margin_left">12</property>
|
|
||||||
<property name="margin_right">12</property>
|
|
||||||
<property name="margin_top">12</property>
|
|
||||||
<property name="margin_bottom">12</property>
|
|
||||||
<property name="column_spacing">32</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="show_showdesktop_button_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="hexpand">True</property>
|
|
||||||
<property name="label" translatable="yes">Show <i>Desktop</i> button</property>
|
|
||||||
<property name="use_markup">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkBox" id="show_showdesktop_box">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="spacing">6</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkButton" id="show_showdesktop_options_button">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="receives_default">True</property>
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="xalign">0.46000000834465027</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage" id="image_window_previews_options2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="icon_name">emblem-system-symbolic</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<style>
|
|
||||||
<class name="circular"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSwitch" id="show_showdesktop_button_switch">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="halign">end</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow" id="show_appmenu_row">
|
<object class="GtkListBoxRow" id="show_appmenu_row">
|
||||||
<property name="width_request">100</property>
|
<property name="width_request">100</property>
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ show-activities-button=false
|
|||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
group-apps-use-launchers=false
|
group-apps-use-launchers=false
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
location-clock='BUTTONSRIGHT'
|
|
||||||
panel-position='BOTTOM'
|
panel-position='BOTTOM'
|
||||||
hot-keys=true
|
hot-keys=true
|
||||||
window-preview-height=50
|
window-preview-height=50
|
||||||
@@ -71,7 +70,6 @@ show-show-apps-button=true
|
|||||||
dot-style-unfocused='DOTS'
|
dot-style-unfocused='DOTS'
|
||||||
shift-click-action='MINIMIZE'
|
shift-click-action='MINIMIZE'
|
||||||
trans-gradient-bottom-color='#2195c5'
|
trans-gradient-bottom-color='#2195c5'
|
||||||
taskbar-position='LEFTPANEL_FIXEDCENTER'
|
|
||||||
click-action='MINIMIZE'
|
click-action='MINIMIZE'
|
||||||
animate-show-apps=true
|
animate-show-apps=true
|
||||||
group-apps-label-font-size=14
|
group-apps-label-font-size=14
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ show-activities-button=false
|
|||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
group-apps-use-launchers=false
|
group-apps-use-launchers=false
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
location-clock='STATUSLEFT'
|
|
||||||
panel-position='BOTTOM'
|
panel-position='BOTTOM'
|
||||||
hot-keys=true
|
hot-keys=true
|
||||||
window-preview-height=50
|
window-preview-height=50
|
||||||
@@ -71,7 +70,6 @@ show-show-apps-button=true
|
|||||||
dot-style-unfocused='CILIORA'
|
dot-style-unfocused='CILIORA'
|
||||||
shift-click-action='MINIMIZE'
|
shift-click-action='MINIMIZE'
|
||||||
trans-gradient-bottom-color='#765550'
|
trans-gradient-bottom-color='#765550'
|
||||||
taskbar-position='CENTEREDMONITOR'
|
|
||||||
click-action='RAISE'
|
click-action='RAISE'
|
||||||
animate-show-apps=true
|
animate-show-apps=true
|
||||||
group-apps-label-font-size=14
|
group-apps-label-font-size=14
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ show-activities-button=false
|
|||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
group-apps-use-launchers=false
|
group-apps-use-launchers=false
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
location-clock='STATUSLEFT'
|
|
||||||
panel-position='TOP'
|
panel-position='TOP'
|
||||||
hot-keys=true
|
hot-keys=true
|
||||||
window-preview-height=100
|
window-preview-height=100
|
||||||
@@ -71,7 +70,6 @@ show-show-apps-button=true
|
|||||||
dot-style-unfocused='CILIORA'
|
dot-style-unfocused='CILIORA'
|
||||||
shift-click-action='MINIMIZE'
|
shift-click-action='MINIMIZE'
|
||||||
trans-gradient-bottom-color='#4a5b8f'
|
trans-gradient-bottom-color='#4a5b8f'
|
||||||
taskbar-position='LEFTPANEL'
|
|
||||||
click-action='RAISE'
|
click-action='RAISE'
|
||||||
animate-show-apps=true
|
animate-show-apps=true
|
||||||
group-apps-label-font-size=14
|
group-apps-label-font-size=14
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ show-activities-button=false
|
|||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
group-apps-use-launchers=false
|
group-apps-use-launchers=false
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
location-clock='STATUSRIGHT'
|
|
||||||
panel-position='TOP'
|
panel-position='TOP'
|
||||||
hot-keys=true
|
hot-keys=true
|
||||||
window-preview-height=80
|
window-preview-height=80
|
||||||
@@ -71,7 +70,6 @@ show-show-apps-button=true
|
|||||||
dot-style-unfocused='DOTS'
|
dot-style-unfocused='DOTS'
|
||||||
shift-click-action='MINIMIZE'
|
shift-click-action='MINIMIZE'
|
||||||
trans-gradient-bottom-color='#2195c5'
|
trans-gradient-bottom-color='#2195c5'
|
||||||
taskbar-position='CENTEREDMONITOR'
|
|
||||||
click-action='RAISE'
|
click-action='RAISE'
|
||||||
animate-show-apps=true
|
animate-show-apps=true
|
||||||
group-apps-label-font-size=14
|
group-apps-label-font-size=14
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ app-hotkey-6=['<Super>6']
|
|||||||
app-hotkey-7=['<Super>7']
|
app-hotkey-7=['<Super>7']
|
||||||
app-hotkey-8=['<Super>8']
|
app-hotkey-8=['<Super>8']
|
||||||
app-hotkey-9=['<Super>9']
|
app-hotkey-9=['<Super>9']
|
||||||
location-clock='STATUSLEFT'
|
|
||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
intellihide-pressure-time=1000
|
intellihide-pressure-time=1000
|
||||||
app-ctrl-hotkey-10=['<Primary><Super>0']
|
app-ctrl-hotkey-10=['<Primary><Super>0']
|
||||||
@@ -103,7 +102,6 @@ show-apps-icon-file=''
|
|||||||
primary-monitor=0
|
primary-monitor=0
|
||||||
window-preview-width=240
|
window-preview-width=240
|
||||||
trans-gradient-top-opacity=0.0
|
trans-gradient-top-opacity=0.0
|
||||||
show-clock-all-monitors=true
|
|
||||||
intellihide-close-delay=400
|
intellihide-close-delay=400
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
app-hotkey-10=['<Super>0']
|
app-hotkey-10=['<Super>0']
|
||||||
@@ -164,7 +162,6 @@ leftbox-size=0
|
|||||||
group-apps-label-font-weight='inherit'
|
group-apps-label-font-weight='inherit'
|
||||||
appicon-padding=2
|
appicon-padding=2
|
||||||
trans-dynamic-opacity=true
|
trans-dynamic-opacity=true
|
||||||
taskbar-position='LEFTPANEL'
|
|
||||||
intellihide-animation-time=200
|
intellihide-animation-time=200
|
||||||
hot-keys=false
|
hot-keys=false
|
||||||
app-hotkey-kp-10=['<Super>KP_0']
|
app-hotkey-kp-10=['<Super>KP_0']
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ show-activities-button=false
|
|||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
group-apps-use-launchers=false
|
group-apps-use-launchers=false
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
location-clock='BUTTONSRIGHT'
|
|
||||||
panel-position='TOP'
|
panel-position='TOP'
|
||||||
hot-keys=true
|
hot-keys=true
|
||||||
window-preview-height=50
|
window-preview-height=50
|
||||||
@@ -71,7 +70,6 @@ show-show-apps-button=true
|
|||||||
dot-style-unfocused='SEGMENTED'
|
dot-style-unfocused='SEGMENTED'
|
||||||
shift-click-action='MINIMIZE'
|
shift-click-action='MINIMIZE'
|
||||||
trans-gradient-bottom-color='#e5e3e4'
|
trans-gradient-bottom-color='#e5e3e4'
|
||||||
taskbar-position='LEFTPANEL_FIXEDCENTER'
|
|
||||||
click-action='MINIMIZE'
|
click-action='MINIMIZE'
|
||||||
animate-show-apps=true
|
animate-show-apps=true
|
||||||
group-apps-label-font-size=14
|
group-apps-label-font-size=14
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ show-activities-button=false
|
|||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
group-apps-use-launchers=false
|
group-apps-use-launchers=false
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
location-clock='STATUSLEFT'
|
|
||||||
panel-position='BOTTOM'
|
panel-position='BOTTOM'
|
||||||
hot-keys=true
|
hot-keys=true
|
||||||
window-preview-height=100
|
window-preview-height=100
|
||||||
@@ -71,7 +70,6 @@ show-show-apps-button=true
|
|||||||
dot-style-unfocused='DASHES'
|
dot-style-unfocused='DASHES'
|
||||||
shift-click-action='MINIMIZE'
|
shift-click-action='MINIMIZE'
|
||||||
trans-gradient-bottom-color='#3b5346'
|
trans-gradient-bottom-color='#3b5346'
|
||||||
taskbar-position='LEFTPANEL_FLOATCENTER'
|
|
||||||
click-action='RAISE'
|
click-action='RAISE'
|
||||||
animate-show-apps=true
|
animate-show-apps=true
|
||||||
group-apps-label-font-size=14
|
group-apps-label-font-size=14
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ app-hotkey-6=['<Super>6']
|
|||||||
app-hotkey-7=['<Super>7']
|
app-hotkey-7=['<Super>7']
|
||||||
app-hotkey-8=['<Super>8']
|
app-hotkey-8=['<Super>8']
|
||||||
app-hotkey-9=['<Super>9']
|
app-hotkey-9=['<Super>9']
|
||||||
location-clock='STATUSLEFT'
|
|
||||||
intellihide-use-pressure=false
|
intellihide-use-pressure=false
|
||||||
intellihide-pressure-time=1000
|
intellihide-pressure-time=1000
|
||||||
app-ctrl-hotkey-10=['<Primary><Super>0']
|
app-ctrl-hotkey-10=['<Primary><Super>0']
|
||||||
@@ -103,7 +102,6 @@ show-apps-icon-file=''
|
|||||||
primary-monitor=0
|
primary-monitor=0
|
||||||
window-preview-width=240
|
window-preview-width=240
|
||||||
trans-gradient-top-opacity=0.0
|
trans-gradient-top-opacity=0.0
|
||||||
show-clock-all-monitors=true
|
|
||||||
intellihide-close-delay=400
|
intellihide-close-delay=400
|
||||||
focus-highlight=true
|
focus-highlight=true
|
||||||
app-hotkey-10=['<Super>0']
|
app-hotkey-10=['<Super>0']
|
||||||
@@ -163,7 +161,6 @@ leftbox-size=0
|
|||||||
group-apps-label-font-weight='inherit'
|
group-apps-label-font-weight='inherit'
|
||||||
appicon-padding=2
|
appicon-padding=2
|
||||||
trans-dynamic-opacity=true
|
trans-dynamic-opacity=true
|
||||||
taskbar-position='LEFTPANEL'
|
|
||||||
intellihide-animation-time=200
|
intellihide-animation-time=200
|
||||||
hot-keys=false
|
hot-keys=false
|
||||||
app-hotkey-kp-10=['<Super>KP_0']
|
app-hotkey-kp-10=['<Super>KP_0']
|
||||||
|
|||||||
429
panel.js
429
panel.js
@@ -35,6 +35,7 @@ const Gi = imports._gi;
|
|||||||
const AppIcons = Me.imports.appIcons;
|
const AppIcons = Me.imports.appIcons;
|
||||||
const Utils = Me.imports.utils;
|
const Utils = Me.imports.utils;
|
||||||
const Taskbar = Me.imports.taskbar;
|
const Taskbar = Me.imports.taskbar;
|
||||||
|
const Pos = Me.imports.panelPositions;
|
||||||
const PanelStyle = Me.imports.panelStyle;
|
const PanelStyle = Me.imports.panelStyle;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@@ -167,9 +168,9 @@ var dtpPanel = Utils.defineClass({
|
|||||||
|
|
||||||
this.menuManager = this.panel.menuManager = new PopupMenu.PopupMenuManager(this.panel);
|
this.menuManager = this.panel.menuManager = new PopupMenu.PopupMenuManager(this.panel);
|
||||||
|
|
||||||
//adding the clock to the centerbox will correctly position it according to dtp settings (event actor-added)
|
this._setPanelMenu('aggregateMenu', dtpSecondaryAggregateMenu, this.panel.actor);
|
||||||
this._setPanelMenu('show-status-menu-all-monitors', 'aggregateMenu', dtpSecondaryAggregateMenu, this._rightBox, true);
|
this._setPanelMenu('dateMenu', DateMenu.DateMenuButton, this.panel.actor);
|
||||||
this._setPanelMenu('show-clock-all-monitors', 'dateMenu', DateMenu.DateMenuButton, this._centerBox, true);
|
this._setPanelMenu('activities', Panel.ActivitiesButton, this.panel.actor);
|
||||||
|
|
||||||
if (this.statusArea.aggregateMenu) {
|
if (this.statusArea.aggregateMenu) {
|
||||||
setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), position);
|
setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), position);
|
||||||
@@ -186,24 +187,39 @@ var dtpPanel = Utils.defineClass({
|
|||||||
setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), position);
|
setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), position);
|
||||||
|
|
||||||
panelBoxes.forEach(p => this[p] = Main.panel[p]);
|
panelBoxes.forEach(p => this[p] = Main.panel[p]);
|
||||||
|
|
||||||
|
this._leftBox.remove_child(this.statusArea.activities.container);
|
||||||
|
this.panel.actor.add_child(this.statusArea.activities.container);
|
||||||
|
|
||||||
|
this._rightBox.remove_child(this.statusArea.aggregateMenu.container);
|
||||||
|
this.panel.actor.add_child(this.statusArea.aggregateMenu.container);
|
||||||
|
|
||||||
|
this._centerBox.remove_child(this.statusArea.dateMenu.container);
|
||||||
|
this.panel.actor.add_child(this.statusArea.dateMenu.container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create a wrapper around the real showAppsIcon in order to add a popupMenu. Most of
|
||||||
|
// its behavior is handled by the taskbar, but its positioning is done at the panel level
|
||||||
|
this.showAppsIconWrapper = new AppIcons.ShowAppsIconWrapper();
|
||||||
|
this.showAppsIconWrapper._dtpPanel = this;
|
||||||
|
this.panel.actor.add_child(this.showAppsIconWrapper.realShowAppsIcon);
|
||||||
|
|
||||||
this.panel.actor._delegate = this;
|
this.panel.actor._delegate = this;
|
||||||
|
|
||||||
if (position == St.Side.TOP) {
|
if (position == St.Side.TOP) {
|
||||||
this.panel._leftCorner = this.panel._leftCorner || new Panel.PanelCorner(St.Side.LEFT);
|
this.panel._leftCorner = this.panel._leftCorner || new Panel.PanelCorner(St.Side.LEFT);
|
||||||
this.panel._rightCorner = this.panel._rightCorner || new Panel.PanelCorner(St.Side.RIGHT);
|
this.panel._rightCorner = this.panel._rightCorner || new Panel.PanelCorner(St.Side.RIGHT);
|
||||||
|
|
||||||
if (isStandalone) {
|
|
||||||
this.panel.add_child(this.panel._leftCorner.actor);
|
|
||||||
this.panel.add_child(this.panel._rightCorner.actor);
|
|
||||||
this.panel._rightCorner.setStyleParent(this._rightBox);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.wrapActor(this.panel._leftCorner || 0);
|
Utils.wrapActor(this.panel._leftCorner || 0);
|
||||||
Utils.wrapActor(this.panel._rightCorner || 0);
|
Utils.wrapActor(this.panel._rightCorner || 0);
|
||||||
|
|
||||||
|
if (isStandalone && position == St.Side.TOP) {
|
||||||
|
this.panel.actor.add_child(this.panel._leftCorner.actor);
|
||||||
|
this.panel.actor.add_child(this.panel._rightCorner.actor);
|
||||||
|
this.panel._rightCorner.setStyleParent(this.panel.actor);
|
||||||
|
}
|
||||||
|
|
||||||
this.add_child(this.panel.actor);
|
this.add_child(this.panel.actor);
|
||||||
|
|
||||||
if (Main.panel._onButtonPress || Main.panel._tryDragWindow) {
|
if (Main.panel._onButtonPress || Main.panel._tryDragWindow) {
|
||||||
@@ -226,15 +242,8 @@ var dtpPanel = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
enable : function() {
|
enable : function() {
|
||||||
let taskbarPosition = Me.settings.get_string('taskbar-position');
|
|
||||||
let position = getPosition();
|
let position = getPosition();
|
||||||
|
|
||||||
if (taskbarPosition == 'CENTEREDCONTENT' || taskbarPosition == 'CENTEREDMONITOR') {
|
|
||||||
this.container = this._centerBox;
|
|
||||||
} else {
|
|
||||||
this.container = this._leftBox;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.statusArea.aggregateMenu) {
|
if (this.statusArea.aggregateMenu) {
|
||||||
Utils.getIndicators(this.statusArea.aggregateMenu._volume)._dtpIgnoreScroll = 1;
|
Utils.getIndicators(this.statusArea.aggregateMenu._volume)._dtpIgnoreScroll = 1;
|
||||||
}
|
}
|
||||||
@@ -322,13 +331,13 @@ var dtpPanel = Utils.defineClass({
|
|||||||
|
|
||||||
this.taskbar = new Taskbar.taskbar(this);
|
this.taskbar = new Taskbar.taskbar(this);
|
||||||
|
|
||||||
this.container.insert_child_above(this.taskbar.actor, null);
|
this.panel.actor.add_child(this.taskbar.actor);
|
||||||
|
|
||||||
this._setActivitiesButtonVisible(Me.settings.get_boolean('show-activities-button'));
|
|
||||||
this._setAppmenuVisible(Me.settings.get_boolean('show-appmenu'));
|
this._setAppmenuVisible(Me.settings.get_boolean('show-appmenu'));
|
||||||
this._setClockLocation(Me.settings.get_string('location-clock'));
|
this._setShowDesktopButton(true);
|
||||||
this._displayShowDesktopButton(Me.settings.get_boolean('show-showdesktop-button'));
|
|
||||||
|
|
||||||
|
this._setAllocationMap();
|
||||||
|
|
||||||
this._setRightCornerStyle();
|
this._setRightCornerStyle();
|
||||||
|
|
||||||
this.panel.actor.add_style_class_name('dashtopanelMainPanel ' + getOrientation());
|
this.panel.actor.add_style_class_name('dashtopanelMainPanel ' + getOrientation());
|
||||||
@@ -340,9 +349,6 @@ var dtpPanel = Utils.defineClass({
|
|||||||
|
|
||||||
this._setPanelGhostSize();
|
this._setPanelGhostSize();
|
||||||
|
|
||||||
if(this.taskbar._showAppsIconWrapper)
|
|
||||||
this.taskbar._showAppsIconWrapper._dtpPanel = this;
|
|
||||||
|
|
||||||
this._timeoutsHandler.add([T2, Me.settings.get_int('intellihide-enable-start-delay'), () => this.intellihide = new Intellihide.Intellihide(this)]);
|
this._timeoutsHandler.add([T2, Me.settings.get_int('intellihide-enable-start-delay'), () => this.intellihide = new Intellihide.Intellihide(this)]);
|
||||||
|
|
||||||
this._signalsHandler.add(
|
this._signalsHandler.add(
|
||||||
@@ -356,7 +362,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
// sync hover after a popupmenu is closed
|
// sync hover after a popupmenu is closed
|
||||||
this.taskbar,
|
this.taskbar,
|
||||||
'menu-closed',
|
'menu-closed',
|
||||||
Lang.bind(this, function(){this.container.sync_hover();})
|
Lang.bind(this, function(){this.panel.actor.sync_hover();})
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
Main.overview,
|
Main.overview,
|
||||||
@@ -429,7 +435,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
|
|
||||||
this._timeoutsHandler.destroy();
|
this._timeoutsHandler.destroy();
|
||||||
this._signalsHandler.destroy();
|
this._signalsHandler.destroy();
|
||||||
this.container.remove_child(this.taskbar.actor);
|
this.panel.remove_child(this.taskbar.actor);
|
||||||
this._setAppmenuVisible(false);
|
this._setAppmenuVisible(false);
|
||||||
|
|
||||||
if (this.intellihide) {
|
if (this.intellihide) {
|
||||||
@@ -441,6 +447,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
this.progressManager.destroy();
|
this.progressManager.destroy();
|
||||||
|
|
||||||
this.taskbar.destroy();
|
this.taskbar.destroy();
|
||||||
|
this.showAppsIconWrapper.destroy();
|
||||||
|
|
||||||
this.menuManager._changeMenu = this.menuManager._oldChangeMenu;
|
this.menuManager._changeMenu = this.menuManager._oldChangeMenu;
|
||||||
|
|
||||||
@@ -463,10 +470,16 @@ var dtpPanel = Utils.defineClass({
|
|||||||
|
|
||||||
['vertical', 'horizontal', 'dashtopanelMainPanel'].forEach(c => this.panel.actor.remove_style_class_name(c));
|
['vertical', 'horizontal', 'dashtopanelMainPanel'].forEach(c => this.panel.actor.remove_style_class_name(c));
|
||||||
|
|
||||||
if(!Main.sessionMode.isLocked) {
|
if (!Main.sessionMode.isLocked) {
|
||||||
this._setActivitiesButtonVisible(true);
|
this.panel.remove_child(this.statusArea.activities.container);
|
||||||
this._setClockLocation("BUTTONSLEFT");
|
this._leftBox.insert_child_at_index(this.statusArea.activities.container, 0);
|
||||||
|
|
||||||
|
this.panel.remove_child(this.statusArea.dateMenu.container);
|
||||||
|
this._centerBox.insert_child_at_index(this.statusArea.dateMenu.container, 0);
|
||||||
|
|
||||||
|
this.panel.remove_child(this.statusArea.aggregateMenu.container);
|
||||||
|
this._rightBox.add_child(this.statusArea.aggregateMenu.container);
|
||||||
|
|
||||||
if (this.statusArea.appMenu) {
|
if (this.statusArea.appMenu) {
|
||||||
setMenuArrow(this.statusArea.appMenu._arrow, St.Side.TOP);
|
setMenuArrow(this.statusArea.appMenu._arrow, St.Side.TOP);
|
||||||
this._leftBox.add_child(this.statusArea.appMenu.container);
|
this._leftBox.add_child(this.statusArea.appMenu.container);
|
||||||
@@ -477,7 +490,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._displayShowDesktopButton(false);
|
this._setShowDesktopButton(false);
|
||||||
|
|
||||||
this._toggleCornerStyle(this.panel._leftCorner, true);
|
this._toggleCornerStyle(this.panel._leftCorner, true);
|
||||||
this._toggleCornerStyle(this.panel._rightCorner, true);
|
this._toggleCornerStyle(this.panel._rightCorner, true);
|
||||||
@@ -500,6 +513,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
} else {
|
} else {
|
||||||
this._removePanelMenu('dateMenu');
|
this._removePanelMenu('dateMenu');
|
||||||
this._removePanelMenu('aggregateMenu');
|
this._removePanelMenu('aggregateMenu');
|
||||||
|
this._removePanelMenu('activities');
|
||||||
|
|
||||||
if (this.panel._rightCorner && this.panel._rightCorner._buttonStyleChangedSignalId) {
|
if (this.panel._rightCorner && this.panel._rightCorner._buttonStyleChangedSignalId) {
|
||||||
this.panel._rightCorner._button.disconnect(this.panel._rightCorner._buttonStyleChangedSignalId);
|
this.panel._rightCorner._button.disconnect(this.panel._rightCorner._buttonStyleChangedSignalId);
|
||||||
@@ -521,6 +535,23 @@ var dtpPanel = Utils.defineClass({
|
|||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateElementPositions: function() {
|
||||||
|
this._getElementPositions().forEach(pos => {
|
||||||
|
let actor = this.allocationMap[pos.element].actor;
|
||||||
|
|
||||||
|
if (actor) {
|
||||||
|
actor.visible = pos.visible;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.panel.actor.hide();
|
||||||
|
this.panel.actor.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
_getElementPositions: function() {
|
||||||
|
return this.panelManager.panelsElementPositions[this.monitor.index] || Pos.defaults;
|
||||||
|
},
|
||||||
|
|
||||||
_bindSettingsChanges: function() {
|
_bindSettingsChanges: function() {
|
||||||
let isVertical = checkIfVertical();
|
let isVertical = checkIfVertical();
|
||||||
|
|
||||||
@@ -541,26 +572,11 @@ var dtpPanel = Utils.defineClass({
|
|||||||
],
|
],
|
||||||
() => this.taskbar.resetAppIcons()
|
() => this.taskbar.resetAppIcons()
|
||||||
],
|
],
|
||||||
[
|
|
||||||
Me.settings,
|
|
||||||
'changed::show-activities-button',
|
|
||||||
() => this._setActivitiesButtonVisible(Me.settings.get_boolean('show-activities-button'))
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
Me.settings,
|
Me.settings,
|
||||||
'changed::show-appmenu',
|
'changed::show-appmenu',
|
||||||
() => this._setAppmenuVisible(Me.settings.get_boolean('show-appmenu'))
|
() => this._setAppmenuVisible(Me.settings.get_boolean('show-appmenu'))
|
||||||
],
|
],
|
||||||
[
|
|
||||||
Me.settings,
|
|
||||||
'changed::location-clock',
|
|
||||||
() => this._setClockLocation(Me.settings.get_string('location-clock'))
|
|
||||||
],
|
|
||||||
[
|
|
||||||
Me.settings,
|
|
||||||
'changed::show-showdesktop-button',
|
|
||||||
() => this._displayShowDesktopButton(Me.settings.get_boolean('show-showdesktop-button'))
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
Me.settings,
|
Me.settings,
|
||||||
'changed::showdesktop-button-width',
|
'changed::showdesktop-button-width',
|
||||||
@@ -594,14 +610,8 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_setPanelMenu: function(settingName, propName, constr, container, isInit) {
|
_setPanelMenu: function(propName, constr, container) {
|
||||||
if (isInit) {
|
if (!this.statusArea[propName]) {
|
||||||
this._signalsHandler.add([Me.settings, 'changed::' + settingName, () => this._setPanelMenu(settingName, propName, constr, container)]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Me.settings.get_boolean(settingName)) {
|
|
||||||
this._removePanelMenu(propName);
|
|
||||||
} else if (!this.statusArea[propName]) {
|
|
||||||
this.statusArea[propName] = this._getPanelMenu(propName, constr);
|
this.statusArea[propName] = this._getPanelMenu(propName, constr);
|
||||||
this.menuManager.addMenu(this.statusArea[propName].menu);
|
this.menuManager.addMenu(this.statusArea[propName].menu);
|
||||||
container.insert_child_at_index(this.statusArea[propName].container, 0);
|
container.insert_child_at_index(this.statusArea[propName].container, 0);
|
||||||
@@ -679,7 +689,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
this.geom = this.getGeometry();
|
this.geom = this.getGeometry();
|
||||||
this._setPanelGhostSize();
|
this._setPanelGhostSize();
|
||||||
this._setPanelPosition();
|
this._setPanelPosition();
|
||||||
this.taskbar.resetAppIcons();
|
this.taskbar.resetAppIcons(true);
|
||||||
this.dynamicTransparency.updateExternalStyle();
|
this.dynamicTransparency.updateExternalStyle();
|
||||||
|
|
||||||
if (this.intellihide && this.intellihide.enabled) {
|
if (this.intellihide && this.intellihide.enabled) {
|
||||||
@@ -687,6 +697,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (checkIfVertical()) {
|
if (checkIfVertical()) {
|
||||||
|
this.showAppsButton.set_width(this.geom.w);
|
||||||
this._refreshVerticalAlloc();
|
this._refreshVerticalAlloc();
|
||||||
this._setSearchEntryOffset(this.geom.w);
|
this._setSearchEntryOffset(this.geom.w);
|
||||||
}
|
}
|
||||||
@@ -750,91 +761,188 @@ var dtpPanel = Utils.defineClass({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_setAllocationMap: function() {
|
||||||
|
this.allocationMap = {};
|
||||||
|
let setMap = (name, actor, isBox) => this.allocationMap[name] = {
|
||||||
|
actor: actor,
|
||||||
|
isBox: isBox || 0,
|
||||||
|
box: new Clutter.ActorBox()
|
||||||
|
};
|
||||||
|
|
||||||
|
setMap(Pos.SHOW_APPS_BTN, this.showAppsIconWrapper.realShowAppsIcon);
|
||||||
|
setMap(Pos.ACTIVITIES_BTN, this.statusArea.activities ? this.statusArea.activities.container : 0);
|
||||||
|
setMap(Pos.LEFT_BOX, this._leftBox, 1);
|
||||||
|
setMap(Pos.TASKBAR, this.taskbar.actor);
|
||||||
|
setMap(Pos.CENTER_BOX, this._centerBox, 1);
|
||||||
|
setMap(Pos.DATE_MENU, this.statusArea.dateMenu.container);
|
||||||
|
setMap(Pos.SYSTEM_MENU, this.statusArea.aggregateMenu.container);
|
||||||
|
setMap(Pos.RIGHT_BOX, this._rightBox, 1);
|
||||||
|
setMap(Pos.DESKTOP_BTN, this._showDesktopButton);
|
||||||
|
},
|
||||||
|
|
||||||
_mainPanelAllocate: function(actor, box, flags) {
|
_mainPanelAllocate: function(actor, box, flags) {
|
||||||
this.panel.actor.set_allocation(box, flags);
|
this.panel.actor.set_allocation(box, flags);
|
||||||
},
|
},
|
||||||
|
|
||||||
vfunc_allocate: function(box, flags) {
|
vfunc_allocate: function(box, flags) {
|
||||||
this.set_allocation(box, flags);
|
this.set_allocation(box, flags);
|
||||||
|
|
||||||
let panelAllocVarSize = box[varCoord.c2] - box[varCoord.c1];
|
|
||||||
let panelAllocFixedSize = box[fixedCoord.c2] - box[fixedCoord.c1];
|
|
||||||
let [, leftNaturalSize] = this._leftBox[sizeFunc](-1);
|
|
||||||
let [, centerNaturalSize] = this._centerBox[sizeFunc](-1);
|
|
||||||
let [, rightNaturalSize] = this._rightBox[sizeFunc](-1);
|
|
||||||
let taskbarPosition = Me.settings.get_string('taskbar-position');
|
|
||||||
|
|
||||||
// The _rightBox is always allocated the same, regardless of taskbar position setting
|
|
||||||
let rightAllocSize = rightNaturalSize;
|
|
||||||
|
|
||||||
// Now figure out how large the _leftBox and _centerBox should be.
|
|
||||||
// The box with the taskbar is always the one that is forced to be smaller as the other boxes grow
|
|
||||||
let leftAllocSize, centerStartPosition, centerEndPosition;
|
|
||||||
let childBoxLeft = new Clutter.ActorBox();
|
|
||||||
let childBoxCenter = new Clutter.ActorBox();
|
|
||||||
let childBoxRight = new Clutter.ActorBox();
|
|
||||||
|
|
||||||
if (taskbarPosition == 'CENTEREDMONITOR') {
|
|
||||||
leftAllocSize = leftNaturalSize;
|
|
||||||
|
|
||||||
centerStartPosition = Math.max(leftNaturalSize, Math.floor((panelAllocVarSize - centerNaturalSize)/2));
|
|
||||||
centerEndPosition = Math.min(panelAllocVarSize-rightNaturalSize, Math.ceil((panelAllocVarSize+centerNaturalSize))/2);
|
|
||||||
} else if (taskbarPosition == 'CENTEREDCONTENT') {
|
|
||||||
leftAllocSize = leftNaturalSize;
|
|
||||||
|
|
||||||
centerStartPosition = Math.max(leftNaturalSize, Math.floor((panelAllocVarSize - centerNaturalSize + leftNaturalSize - rightNaturalSize) / 2));
|
|
||||||
centerEndPosition = Math.min(panelAllocVarSize-rightNaturalSize, Math.ceil((panelAllocVarSize + centerNaturalSize + leftNaturalSize - rightNaturalSize) / 2));
|
|
||||||
} else if (taskbarPosition == 'LEFTPANEL_FIXEDCENTER') {
|
|
||||||
leftAllocSize = Math.floor((panelAllocVarSize - centerNaturalSize) / 2);
|
|
||||||
centerStartPosition = leftAllocSize;
|
|
||||||
centerEndPosition = centerStartPosition + centerNaturalSize;
|
|
||||||
} else if (taskbarPosition == 'LEFTPANEL_FLOATCENTER') {
|
|
||||||
let leftAllocSizeMax = panelAllocVarSize - rightNaturalSize - centerNaturalSize;
|
|
||||||
leftAllocSize = Math.min(leftAllocSizeMax, leftNaturalSize);
|
|
||||||
|
|
||||||
let freeSpace = panelAllocVarSize - leftAllocSize - rightAllocSize - centerNaturalSize;
|
|
||||||
|
|
||||||
centerStartPosition = leftAllocSize + Math.floor(freeSpace / 2);
|
|
||||||
centerEndPosition = centerStartPosition + centerNaturalSize;
|
|
||||||
} else { // LEFTPANEL
|
|
||||||
leftAllocSize = panelAllocVarSize - rightNaturalSize - centerNaturalSize;
|
|
||||||
centerStartPosition = leftAllocSize;
|
|
||||||
centerEndPosition = centerStartPosition + centerNaturalSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
childBoxLeft[fixedCoord.c1] = childBoxCenter[fixedCoord.c1] = childBoxRight[fixedCoord.c1] = 0;
|
|
||||||
childBoxLeft[fixedCoord.c2] = childBoxCenter[fixedCoord.c2] = childBoxRight[fixedCoord.c2] = panelAllocFixedSize;
|
|
||||||
|
|
||||||
// if it is a RTL language, the boxes are switched around, and we need to invert the coordinates
|
|
||||||
if (this.get_text_direction() == Clutter.TextDirection.RTL) {
|
|
||||||
childBoxLeft[varCoord.c1] = panelAllocVarSize - leftAllocSize;
|
|
||||||
childBoxLeft[varCoord.c2] = panelAllocVarSize;
|
|
||||||
|
|
||||||
childBoxCenter[varCoord.c1] = panelAllocVarSize - centerEndPosition;
|
|
||||||
childBoxCenter[varCoord.c2] = panelAllocVarSize - centerStartPosition;
|
|
||||||
|
|
||||||
childBoxRight[varCoord.c1] = 0;
|
|
||||||
childBoxRight[varCoord.c2] = rightAllocSize;
|
|
||||||
} else {
|
|
||||||
childBoxLeft[varCoord.c1] = 0;
|
|
||||||
childBoxLeft[varCoord.c2] = leftAllocSize;
|
|
||||||
|
|
||||||
childBoxCenter[varCoord.c1] = centerStartPosition;
|
|
||||||
childBoxCenter[varCoord.c2] = centerEndPosition;
|
|
||||||
|
|
||||||
childBoxRight[varCoord.c1] = panelAllocVarSize - rightAllocSize;
|
|
||||||
childBoxRight[varCoord.c2] = panelAllocVarSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.panel.actor.allocate(new Clutter.ActorBox({ x1: 0, y1: 0, x2: this.geom.w, y2: this.geom.h }), flags);
|
this.panel.actor.allocate(new Clutter.ActorBox({ x1: 0, y1: 0, x2: this.geom.w, y2: this.geom.h }), flags);
|
||||||
this._leftBox.allocate(childBoxLeft, flags, 1);
|
|
||||||
this._centerBox.allocate(childBoxCenter, flags, 1);
|
let panelAllocVarSize = box[varCoord.c2] - box[varCoord.c1];
|
||||||
this._rightBox.allocate(childBoxRight, flags, 1);
|
let elements = [];
|
||||||
|
let centerMonitorElements = [];
|
||||||
|
let fixed = 0;
|
||||||
|
let checkIfCentered = element => element.position == Pos.CENTERED || element.position == Pos.CENTERED_MONITOR;
|
||||||
|
let allocateCenter = (centeredElements, trLimit, brLimit) => {
|
||||||
|
if (centeredElements.length) {
|
||||||
|
centeredElements.filter(c => c.hasDynamicSize).forEach(c => adjustDynamicSize(c));
|
||||||
|
|
||||||
|
let centeredWidth = centeredElements.reduce((size, c) => size + c.natSize, 0);
|
||||||
|
let tlOffset = Math.max(0, Math.round((brLimit - trLimit - centeredWidth) * .5));
|
||||||
|
|
||||||
|
centeredElements.forEach(c => {
|
||||||
|
allocate(c, trLimit + tlOffset);
|
||||||
|
trLimit += c.natSize;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let allocate = (element, c1) => {
|
||||||
|
element.box[varCoord.c1] = Math.max(0, Math.min(panelAllocVarSize, c1));
|
||||||
|
element.box[varCoord.c2] = Math.max(element.natSize, Math.min(panelAllocVarSize, element.box[varCoord.c1] + element.natSize));
|
||||||
|
|
||||||
|
if (element.hasDynamicSize) {
|
||||||
|
adjustDynamicSize(element, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
element.fixed = 1;
|
||||||
|
++fixed;
|
||||||
|
|
||||||
|
let params = [element.box, flags];
|
||||||
|
|
||||||
|
if (element.isBox) {
|
||||||
|
params.push(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
element.actor.allocate.apply(element.actor, params);
|
||||||
|
};
|
||||||
|
let adjustDynamicSize = (element, adjustPos) => {
|
||||||
|
let isCentered = checkIfCentered(element);
|
||||||
|
let getSiblingsInfo = (direction, defaultLimit = 0, unfixedSize = 0, centeredSize = 0, limit = 0) => {
|
||||||
|
let j = element.index + direction;
|
||||||
|
let refElement = elements[j];
|
||||||
|
|
||||||
|
while (refElement && (!refElement.fixed || (isCentered && refElement.position == element.position))) {
|
||||||
|
if (isCentered && refElement.position == element.position) {
|
||||||
|
centeredSize += refElement.natSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
unfixedSize += refElement.natSize;
|
||||||
|
refElement = elements[(j += direction)];
|
||||||
|
}
|
||||||
|
|
||||||
|
limit = refElement ? refElement.box[varCoord[direction > 0 ? 'c1' : 'c2']] : defaultLimit;
|
||||||
|
|
||||||
|
return [unfixedSize, centeredSize, limit];
|
||||||
|
};
|
||||||
|
let [unfixedSizeTl, centeredSizeTl, prevLimit] = getSiblingsInfo(-1);
|
||||||
|
let [unfixedSizeBr, centeredSizeBr, nextLimit] = getSiblingsInfo(1, panelAllocVarSize);
|
||||||
|
let availableSize = nextLimit - prevLimit - unfixedSizeTl - unfixedSizeBr -
|
||||||
|
(isCentered ? Math.abs((unfixedSizeTl - centeredSizeTl) - (unfixedSizeBr - centeredSizeBr)) : 0);
|
||||||
|
|
||||||
|
if (availableSize < element.natSize) {
|
||||||
|
element.natSize = availableSize;
|
||||||
|
|
||||||
|
if (adjustPos) {
|
||||||
|
element.box[varCoord.c1] = Math.max(prevLimit + unfixedSizeTl, element.box[varCoord.c1]);
|
||||||
|
element.box[varCoord.c2] = Math.min(nextLimit - unfixedSizeBr, element.box[varCoord.c2]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
element.hasDynamicSize = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
this._getElementPositions().forEach(pos => {
|
||||||
|
let element = this.allocationMap[pos.element];
|
||||||
|
|
||||||
|
if (element.actor && pos.visible) {
|
||||||
|
element.natSize = element.actor[sizeFunc](-1)[1];
|
||||||
|
|
||||||
|
if (element.natSize <= 0) return;
|
||||||
|
|
||||||
|
element.box[fixedCoord.c1] = box[fixedCoord.c1];
|
||||||
|
element.box[fixedCoord.c2] = box[fixedCoord.c2];
|
||||||
|
element.hasDynamicSize = pos.element == Pos.TASKBAR;
|
||||||
|
element.index = elements.length;
|
||||||
|
element.position = pos.position;
|
||||||
|
element.fixed = 0;
|
||||||
|
|
||||||
|
if (pos.position == Pos.CENTERED_MONITOR &&
|
||||||
|
(!centerMonitorElements.length || elements[element.index - 1].position == Pos.CENTERED_MONITOR)) {
|
||||||
|
centerMonitorElements.push(element);
|
||||||
|
}
|
||||||
|
|
||||||
|
elements.push(element);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
allocateCenter(centerMonitorElements, 0, box[varCoord.c2]);
|
||||||
|
|
||||||
|
let iterations = 0; //failsafe
|
||||||
|
while (fixed < elements.length && ++iterations < 10) {
|
||||||
|
for (let i = 0, l = elements.length; i < l; ++i) {
|
||||||
|
if (elements[i].fixed) continue;
|
||||||
|
|
||||||
|
let element = elements[i];
|
||||||
|
let prevElement = elements[i - 1];
|
||||||
|
let nextElement = elements[i + 1];
|
||||||
|
|
||||||
|
if (element.position == Pos.STACKED_TL && prevElement && prevElement.position == Pos.STACKED_BR) {
|
||||||
|
element.position = Pos.STACKED_BR;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (element.position == Pos.STACKED_TL && (!prevElement || prevElement.fixed)) {
|
||||||
|
allocate(element, prevElement ? prevElement.box[varCoord.c2] : 0);
|
||||||
|
} else if (element.position == Pos.STACKED_BR && (!nextElement || nextElement.fixed)) {
|
||||||
|
let nextLimit = nextElement ? nextElement.box[varCoord.c1] : panelAllocVarSize;
|
||||||
|
|
||||||
|
allocate(element, nextLimit - element.natSize);
|
||||||
|
} else if (checkIfCentered(element)) { //fallback for non contiguous CENTERED_MONITOR
|
||||||
|
let centeredElements = [element];
|
||||||
|
let j = i;
|
||||||
|
|
||||||
|
while (prevElement && prevElement.position == Pos.STACKED_BR) {
|
||||||
|
prevElement = elements[--j];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prevElement && !prevElement.fixed) continue;
|
||||||
|
|
||||||
|
while (nextElement && checkIfCentered(nextElement)) {
|
||||||
|
centeredElements.push(nextElement);
|
||||||
|
nextElement = elements[++i + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
j = i;
|
||||||
|
while (nextElement && nextElement.position == Pos.STACKED_TL) {
|
||||||
|
nextElement = elements[++j];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nextElement || (nextElement.fixed)) {
|
||||||
|
allocateCenter(
|
||||||
|
centeredElements,
|
||||||
|
prevElement ? prevElement.box[varCoord.c2] : 0,
|
||||||
|
nextElement ? nextElement.box[varCoord.c1] : panelAllocVarSize
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.geom.position == St.Side.TOP) {
|
if (this.geom.position == St.Side.TOP) {
|
||||||
let childBoxLeftCorner = new Clutter.ActorBox();
|
let childBoxLeftCorner = new Clutter.ActorBox();
|
||||||
let childBoxRightCorner = new Clutter.ActorBox();
|
let childBoxRightCorner = new Clutter.ActorBox();
|
||||||
let currentCornerSize = this.cornerSize;
|
let currentCornerSize = this.cornerSize;
|
||||||
|
let panelAllocFixedSize = box[fixedCoord.c2] - box[fixedCoord.c1];
|
||||||
|
|
||||||
[ , this.cornerSize] = this.panel._leftCorner.actor[sizeFunc](-1);
|
[ , this.cornerSize] = this.panel._leftCorner.actor[sizeFunc](-1);
|
||||||
childBoxLeftCorner[varCoord.c1] = 0;
|
childBoxLeftCorner[varCoord.c1] = 0;
|
||||||
@@ -892,9 +1000,9 @@ var dtpPanel = Utils.defineClass({
|
|||||||
//right click on an empty part of the panel, temporarily borrow and display the showapps context menu
|
//right click on an empty part of the panel, temporarily borrow and display the showapps context menu
|
||||||
Main.layoutManager.setDummyCursorGeometry(stageX, stageY, 0, 0);
|
Main.layoutManager.setDummyCursorGeometry(stageX, stageY, 0, 0);
|
||||||
|
|
||||||
this.taskbar._showAppsIconWrapper.createMenu();
|
this.showAppsIconWrapper.createMenu();
|
||||||
this.taskbar._showAppsIconWrapper._menu.sourceActor = Main.layoutManager.dummyCursor;
|
this.showAppsIconWrapper._menu.sourceActor = Main.layoutManager.dummyCursor;
|
||||||
this.taskbar._showAppsIconWrapper.popupMenu();
|
this.showAppsIconWrapper.popupMenu();
|
||||||
|
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
} else if (Main.modalCount > 0 || event.get_source() != actor ||
|
} else if (Main.modalCount > 0 || event.get_source() != actor ||
|
||||||
@@ -939,9 +1047,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onBoxActorAdded: function(box) {
|
_onBoxActorAdded: function(box) {
|
||||||
if (!this._setClockLocation(Me.settings.get_string('location-clock'))) {
|
this._setRightCornerStyle();
|
||||||
this._setRightCornerStyle();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (checkIfVertical()) {
|
if (checkIfVertical()) {
|
||||||
this._setVertical(box, true);
|
this._setVertical(box, true);
|
||||||
@@ -1001,12 +1107,6 @@ var dtpPanel = Utils.defineClass({
|
|||||||
this._unmappedButtons.splice(this._unmappedButtons.indexOf(actor), 1);
|
this._unmappedButtons.splice(this._unmappedButtons.indexOf(actor), 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
_setActivitiesButtonVisible: function(isVisible) {
|
|
||||||
if(this.statusArea.activities)
|
|
||||||
isVisible ? this.statusArea.activities.container.show() :
|
|
||||||
this.statusArea.activities.container.hide();
|
|
||||||
},
|
|
||||||
|
|
||||||
_setAppmenuVisible: function(isVisible) {
|
_setAppmenuVisible: function(isVisible) {
|
||||||
let parent;
|
let parent;
|
||||||
let appMenu = this.statusArea.appMenu;
|
let appMenu = this.statusArea.appMenu;
|
||||||
@@ -1019,12 +1119,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isVisible && appMenu) {
|
if (isVisible && appMenu) {
|
||||||
let taskbarPosition = Me.settings.get_string('taskbar-position');
|
this._leftBox.insert_child_above(appMenu.container, null);
|
||||||
if (taskbarPosition == 'CENTEREDCONTENT' || taskbarPosition == 'CENTEREDMONITOR') {
|
|
||||||
this._leftBox.insert_child_above(appMenu.container, null);
|
|
||||||
} else {
|
|
||||||
this._centerBox.insert_child_at_index(appMenu.container, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1070,47 +1165,12 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_setClockLocation: function(loc) {
|
|
||||||
if(!this.statusArea.dateMenu)
|
|
||||||
return;
|
|
||||||
|
|
||||||
let dateMenuContainer = this.statusArea.dateMenu.container;
|
|
||||||
let parent = dateMenuContainer.get_parent();
|
|
||||||
let destination;
|
|
||||||
let refSibling = null;
|
|
||||||
|
|
||||||
if (!parent) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (loc.indexOf('BUTTONS') == 0) {
|
|
||||||
destination = this._centerBox;
|
|
||||||
} else if (loc.indexOf('STATUS') == 0) {
|
|
||||||
refSibling = this.statusArea.aggregateMenu ? this.statusArea.aggregateMenu.container : null;
|
|
||||||
destination = this._rightBox;
|
|
||||||
} else { //TASKBAR
|
|
||||||
refSibling = this.taskbar.actor;
|
|
||||||
destination = refSibling.get_parent();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent != destination) {
|
|
||||||
parent.remove_actor(dateMenuContainer);
|
|
||||||
destination.add_actor(dateMenuContainer);
|
|
||||||
}
|
|
||||||
|
|
||||||
destination['set_child_' + (loc.indexOf('RIGHT') > 0 ? 'above' : 'below') + '_sibling'](dateMenuContainer, refSibling);
|
|
||||||
destination.queue_relayout();
|
|
||||||
this._setRightCornerStyle();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
},
|
|
||||||
|
|
||||||
_setRightCornerStyle: function() {
|
_setRightCornerStyle: function() {
|
||||||
if (this.panel._rightCorner) {
|
if (this.panel._rightCorner) {
|
||||||
this._toggleCornerStyle(
|
this._toggleCornerStyle(
|
||||||
this.panel._rightCorner,
|
this.panel._rightCorner,
|
||||||
(this.statusArea.aggregateMenu &&
|
(this.statusArea.aggregateMenu &&
|
||||||
this._rightBox.get_last_child() == this.statusArea.aggregateMenu.container)
|
this.panel.actor.get_last_child() == this.statusArea.aggregateMenu.container)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1121,8 +1181,8 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_displayShowDesktopButton: function (isVisible) {
|
_setShowDesktopButton: function (add) {
|
||||||
if(isVisible) {
|
if (add) {
|
||||||
if(this._showDesktopButton)
|
if(this._showDesktopButton)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1159,15 +1219,14 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this._rightBox.insert_child_at_index(this._showDesktopButton, this._rightBox.get_children().length);
|
this.panel.actor.add_child(this._showDesktopButton);
|
||||||
} else {
|
} else {
|
||||||
if(!this._showDesktopButton)
|
if(!this._showDesktopButton)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._rightBox.remove_child(this._showDesktopButton);
|
this.panel.actor.remove_child(this._showDesktopButton);
|
||||||
this._showDesktopButton.destroy();
|
this._showDesktopButton.destroy();
|
||||||
this._showDesktopButton = null;
|
this._showDesktopButton = null;
|
||||||
this._setRightCornerStyle();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
||||||
const Overview = Me.imports.overview;
|
const Overview = Me.imports.overview;
|
||||||
const Panel = Me.imports.panel;
|
const Panel = Me.imports.panel;
|
||||||
|
const Pos = Me.imports.panelPositions;
|
||||||
const Proximity = Me.imports.proximity;
|
const Proximity = Me.imports.proximity;
|
||||||
const Taskbar = Me.imports.taskbar;
|
const Taskbar = Me.imports.taskbar;
|
||||||
const Utils = Me.imports.utils;
|
const Utils = Me.imports.utils;
|
||||||
@@ -37,6 +38,7 @@ const Utils = Me.imports.utils;
|
|||||||
const Config = imports.misc.config;
|
const Config = imports.misc.config;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Gi = imports._gi;
|
const Gi = imports._gi;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
@@ -58,6 +60,17 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.overview = new Overview.dtpOverview();
|
this.overview = new Overview.dtpOverview();
|
||||||
|
this.panelsElementPositions = {};
|
||||||
|
|
||||||
|
//Mutter meta_monitor_manager_get_primary_monitor (global.display.get_primary_monitor()) doesn't return the same
|
||||||
|
//monitor as GDK gdk_screen_get_primary_monitor (imports.gi.Gdk.Screen.get_default().get_primary_monitor()).
|
||||||
|
//Since the Mutter function is what's used in gnome-shell and we can't access it from the settings dialog, store
|
||||||
|
//the monitors information in a setting so we can use the same monitor indexes as the ones in gnome-shell
|
||||||
|
let primaryIndex = Main.layoutManager.primaryIndex;
|
||||||
|
let monitors = [primaryIndex];
|
||||||
|
|
||||||
|
Main.layoutManager.monitors.filter(m => m.index != primaryIndex).forEach(m => monitors.push(m.index));
|
||||||
|
Me.settings.set_value('available-monitors', new GLib.Variant('ai', monitors));
|
||||||
|
|
||||||
Main.overview.viewSelector.appDisplay._views.forEach(v => {
|
Main.overview.viewSelector.appDisplay._views.forEach(v => {
|
||||||
Utils.wrapActor(v.view);
|
Utils.wrapActor(v.view);
|
||||||
@@ -67,8 +80,6 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
|
|
||||||
enable: function(reset) {
|
enable: function(reset) {
|
||||||
let dtpPrimaryIndex = Me.settings.get_int('primary-monitor');
|
let dtpPrimaryIndex = Me.settings.get_int('primary-monitor');
|
||||||
if(dtpPrimaryIndex < 0 || dtpPrimaryIndex >= Main.layoutManager.monitors.length)
|
|
||||||
dtpPrimaryIndex = Main.layoutManager.primaryIndex;
|
|
||||||
|
|
||||||
this.dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex];
|
this.dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex];
|
||||||
this.proximityManager = new Proximity.ProximityManager();
|
this.proximityManager = new Proximity.ProximityManager();
|
||||||
@@ -115,6 +126,7 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._updatePanelElementPositions();
|
||||||
this.setFocusedMonitor(this.dtpPrimaryMonitor);
|
this.setFocusedMonitor(this.dtpPrimaryMonitor);
|
||||||
|
|
||||||
if (Panel.checkIfVertical()) {
|
if (Panel.checkIfVertical()) {
|
||||||
@@ -229,12 +241,16 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
'changed::primary-monitor',
|
'changed::primary-monitor',
|
||||||
'changed::multi-monitors',
|
'changed::multi-monitors',
|
||||||
'changed::isolate-monitors',
|
'changed::isolate-monitors',
|
||||||
'changed::taskbar-position',
|
|
||||||
'changed::panel-position',
|
'changed::panel-position',
|
||||||
'changed::stockgs-keep-top-panel'
|
'changed::stockgs-keep-top-panel'
|
||||||
],
|
],
|
||||||
() => this._reset()
|
() => this._reset()
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
Me.settings,
|
||||||
|
'changed::panel-element-positions',
|
||||||
|
() => this._updatePanelElementPositions()
|
||||||
|
],
|
||||||
[
|
[
|
||||||
Me.settings,
|
Me.settings,
|
||||||
'changed::intellihide-key-toggle-text',
|
'changed::intellihide-key-toggle-text',
|
||||||
@@ -407,6 +423,11 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
this.enable(true);
|
this.enable(true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_updatePanelElementPositions: function() {
|
||||||
|
this.panelsElementPositions = Pos.getSettingsPositions(Me.settings);
|
||||||
|
this.allPanels.forEach(p => p.updateElementPositions());
|
||||||
|
},
|
||||||
|
|
||||||
_adjustPanelMenuButton: function(button, monitor, arrowSide) {
|
_adjustPanelMenuButton: function(button, monitor, arrowSide) {
|
||||||
if (button) {
|
if (button) {
|
||||||
Utils.wrapActor(button);
|
Utils.wrapActor(button);
|
||||||
|
|||||||
60
panelPositions.js
Normal file
60
panelPositions.js
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the Dash-To-Panel extension for Gnome 3
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var SHOW_APPS_BTN = 'showAppsButton';
|
||||||
|
var ACTIVITIES_BTN = 'activitiesButton';
|
||||||
|
var TASKBAR = 'taskbar';
|
||||||
|
var DATE_MENU = 'dateMenu';
|
||||||
|
var SYSTEM_MENU = 'systemMenu';
|
||||||
|
var LEFT_BOX = 'leftBox';
|
||||||
|
var CENTER_BOX = 'centerBox';
|
||||||
|
var RIGHT_BOX = 'rightBox';
|
||||||
|
var DESKTOP_BTN = 'desktopButton';
|
||||||
|
|
||||||
|
var STACKED_TL = 'stackedTL';
|
||||||
|
var STACKED_BR = 'stackedBR';
|
||||||
|
var CENTERED = 'centered';
|
||||||
|
var CENTERED_MONITOR = 'centerMonitor';
|
||||||
|
|
||||||
|
var defaults = [
|
||||||
|
{ element: SHOW_APPS_BTN, visible: true, position: STACKED_TL },
|
||||||
|
{ element: ACTIVITIES_BTN, visible: false, position: STACKED_TL },
|
||||||
|
{ element: LEFT_BOX, visible: false, position: STACKED_TL },
|
||||||
|
{ element: TASKBAR, visible: true, position: STACKED_TL },
|
||||||
|
{ element: CENTER_BOX, visible: true, position: STACKED_BR },
|
||||||
|
{ element: RIGHT_BOX, visible: true, position: STACKED_BR },
|
||||||
|
{ element: DATE_MENU, visible: true, position: STACKED_BR },
|
||||||
|
{ element: SYSTEM_MENU, visible: true, position: STACKED_BR },
|
||||||
|
{ element: DESKTOP_BTN, visible: true, position: STACKED_BR },
|
||||||
|
];
|
||||||
|
|
||||||
|
var optionDialogFunctions = {};
|
||||||
|
|
||||||
|
optionDialogFunctions[SHOW_APPS_BTN] = '_showShowAppsButtonOptions';
|
||||||
|
optionDialogFunctions[DESKTOP_BTN] = '_showDesktopButtonOptions';
|
||||||
|
|
||||||
|
function getSettingsPositions(settings) {
|
||||||
|
var positions = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
positions = JSON.parse(settings.get_string('panel-element-positions'));
|
||||||
|
} catch(e) {
|
||||||
|
log('Error parsing positions: ' + e.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return positions;
|
||||||
|
}
|
||||||
@@ -193,25 +193,7 @@ var dtpPanelStyle = Utils.defineClass({
|
|||||||
this._overrideStyle(this.panel._leftBox, leftboxContentSizeStyleLine, 0);
|
this._overrideStyle(this.panel._leftBox, leftboxContentSizeStyleLine, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._applyStylesRecursively();
|
||||||
/*recurse actors */
|
|
||||||
if(this._rightBoxOperations.length) {
|
|
||||||
let children = this.panel._rightBox.get_children();
|
|
||||||
for(let i in children)
|
|
||||||
this._recursiveApply(children[i], this._rightBoxOperations);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this._centerBoxOperations.length) {
|
|
||||||
let children = this.panel._centerBox.get_children();
|
|
||||||
for(let i in children)
|
|
||||||
this._recursiveApply(children[i], this._centerBoxOperations);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(this._leftBoxOperations.length) {
|
|
||||||
let children = this.panel._leftBox.get_children();
|
|
||||||
for(let i in children)
|
|
||||||
this._recursiveApply(children[i], this._leftBoxOperations);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* connect signal */
|
/* connect signal */
|
||||||
this._rightBoxActorAddedID = this.panel._rightBox.connect('actor-added',
|
this._rightBoxActorAddedID = this.panel._rightBox.connect('actor-added',
|
||||||
@@ -248,24 +230,32 @@ var dtpPanelStyle = Utils.defineClass({
|
|||||||
this.panel._leftBox.disconnect(this._leftBoxActorAddedID);
|
this.panel._leftBox.disconnect(this._leftBoxActorAddedID);
|
||||||
|
|
||||||
this._restoreOriginalStyle(this.panel._rightBox);
|
this._restoreOriginalStyle(this.panel._rightBox);
|
||||||
if(this._rightBoxOperations.length) {
|
|
||||||
let children = this.panel._rightBox.get_children();
|
|
||||||
for(let i in children)
|
|
||||||
this._recursiveApply(children[i], this._rightBoxOperations, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
this._restoreOriginalStyle(this.panel._centerBox);
|
this._restoreOriginalStyle(this.panel._centerBox);
|
||||||
if(this._centerBoxOperations.length) {
|
this._restoreOriginalStyle(this.panel._leftBox);
|
||||||
let children = this.panel._centerBox.get_children();
|
|
||||||
|
this._applyStylesRecursively(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
_applyStylesRecursively: function(restore) {
|
||||||
|
/*recurse actors */
|
||||||
|
if(this._rightBoxOperations.length) {
|
||||||
|
// add the system menu as we move it from the rightbox to the panel to position it independently
|
||||||
|
let children = this.panel._rightBox.get_children().concat([this.panel.statusArea.aggregateMenu.container]);
|
||||||
for(let i in children)
|
for(let i in children)
|
||||||
this._recursiveApply(children[i], this._centerBoxOperations, true);
|
this._recursiveApply(children[i], this._rightBoxOperations, restore);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this._centerBoxOperations.length) {
|
||||||
|
// add the date menu as we move it from the centerbox to the panel to position it independently
|
||||||
|
let children = this.panel._centerBox.get_children().concat([this.panel.statusArea.dateMenu.container]);
|
||||||
|
for(let i in children)
|
||||||
|
this._recursiveApply(children[i], this._centerBoxOperations, restore);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._restoreOriginalStyle(this.panel._leftBox);
|
|
||||||
if(this._leftBoxOperations.length) {
|
if(this._leftBoxOperations.length) {
|
||||||
let children = this.panel._leftBox.get_children();
|
let children = this.panel._leftBox.get_children();
|
||||||
for(let i in children)
|
for(let i in children)
|
||||||
this._recursiveApply(children[i], this._leftBoxOperations, true);
|
this._recursiveApply(children[i], this._leftBoxOperations, restore);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
440
prefs.js
440
prefs.js
@@ -35,6 +35,7 @@ const Gettext = imports.gettext.domain(Me.metadata['gettext-domain']);
|
|||||||
const _ = Gettext.gettext;
|
const _ = Gettext.gettext;
|
||||||
const N_ = function(e) { return e };
|
const N_ = function(e) { return e };
|
||||||
const Update = Me.imports.update;
|
const Update = Me.imports.update;
|
||||||
|
const Pos = Me.imports.panelPositions;
|
||||||
|
|
||||||
const SCALE_UPDATE_TIMEOUT = 500;
|
const SCALE_UPDATE_TIMEOUT = 500;
|
||||||
const DEFAULT_PANEL_SIZES = [ 128, 96, 64, 48, 32, 24, 16 ];
|
const DEFAULT_PANEL_SIZES = [ 128, 96, 64, 48, 32, 24, 16 ];
|
||||||
@@ -200,34 +201,220 @@ const Settings = new Lang.Class({
|
|||||||
_updateVerticalRelatedOptions: function() {
|
_updateVerticalRelatedOptions: function() {
|
||||||
let position = this._settings.get_string('panel-position');
|
let position = this._settings.get_string('panel-position');
|
||||||
let isVertical = position == 'LEFT' || position == 'RIGHT';
|
let isVertical = position == 'LEFT' || position == 'RIGHT';
|
||||||
let taskbarLocationCombo = this._builder.get_object('taskbar_position_combo');
|
|
||||||
let clockLocationCombo = this._builder.get_object('location_clock_combo');
|
|
||||||
let showDesktopWidthLabel = this._builder.get_object('show_showdesktop_width_label');
|
let showDesktopWidthLabel = this._builder.get_object('show_showdesktop_width_label');
|
||||||
|
|
||||||
taskbarLocationCombo.remove_all();
|
|
||||||
clockLocationCombo.remove_all();
|
|
||||||
|
|
||||||
[
|
|
||||||
['LEFTPANEL', isVertical ? _('Top, with plugin icons collapsed to bottom') : _('Left, with plugin icons collapsed to right')],
|
|
||||||
['LEFTPANEL_FIXEDCENTER', isVertical ? _('Top, with fixed center plugin icons') : _('Left, with fixed center plugin icons')],
|
|
||||||
['LEFTPANEL_FLOATCENTER', isVertical ? _('Top, with floating center plugin icons') : _('Left, with floating center plugin icons')],
|
|
||||||
['CENTEREDMONITOR', _('Center, fixed in middle of monitor')],
|
|
||||||
['CENTEREDCONTENT', isVertical ? _('Center, floating between top and bottom elements') : _('Center, floating between left and right elements')]
|
|
||||||
].forEach(tl => taskbarLocationCombo.append.apply(taskbarLocationCombo, tl));
|
|
||||||
|
|
||||||
[
|
|
||||||
['BUTTONSLEFT', isVertical ? _('Top of plugin icons') : _('Left of plugin icons')],
|
|
||||||
['BUTTONSRIGHT', isVertical ? _('Bottom of plugin icons') : _('Right of plugin icons')],
|
|
||||||
['STATUSLEFT', isVertical ? _('Top of system indicators') : _('Left of system indicators')],
|
|
||||||
['STATUSRIGHT', isVertical ? _('Bottom of system indicators') : _('Right of system indicators')],
|
|
||||||
['TASKBARLEFT', isVertical ? _('Top of taskbar') : _('Left of taskbar')],
|
|
||||||
['TASKBARRIGHT', isVertical ? _('Bottom of taskbar') : _('Right of taskbar')]
|
|
||||||
].forEach(cl => clockLocationCombo.append.apply(clockLocationCombo, cl));
|
|
||||||
|
|
||||||
taskbarLocationCombo.set_active_id(this._settings.get_string('taskbar-position'));
|
|
||||||
clockLocationCombo.set_active_id(this._settings.get_string('location-clock'));
|
|
||||||
|
|
||||||
showDesktopWidthLabel.set_text(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)'));
|
showDesktopWidthLabel.set_text(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)'));
|
||||||
|
|
||||||
|
this._displayTaskbarElementPositionsForMonitor(this.monitors[this._builder.get_object('taskbar_position_monitor_combo').get_active()]);
|
||||||
|
},
|
||||||
|
|
||||||
|
_displayTaskbarElementPositionsForMonitor: function(monitorIndex) {
|
||||||
|
let taskbarListBox = this._builder.get_object('taskbar_display_listbox');
|
||||||
|
|
||||||
|
taskbarListBox.get_children().forEach(c => c.destroy());
|
||||||
|
|
||||||
|
let labels = {};
|
||||||
|
let position = this._settings.get_string('panel-position');
|
||||||
|
let isVertical = position == 'LEFT' || position == 'RIGHT';
|
||||||
|
let positionSettings = Pos.getSettingsPositions(this._settings);
|
||||||
|
let panelInfo = positionSettings[monitorIndex] || Pos.defaults;
|
||||||
|
let updateSettings = () => {
|
||||||
|
let newPanelInfo = [];
|
||||||
|
|
||||||
|
taskbarListBox.get_children().forEach(c => {
|
||||||
|
newPanelInfo.push({
|
||||||
|
element: c.id,
|
||||||
|
visible: c.visibleToggleBtn.get_active(),
|
||||||
|
position: c.positionCombo.get_active_id()
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
positionSettings[monitorIndex] = newPanelInfo;
|
||||||
|
this._settings.set_string('panel-element-positions', JSON.stringify(positionSettings));
|
||||||
|
};
|
||||||
|
|
||||||
|
labels[Pos.SHOW_APPS_BTN] = _('Show Applications button');
|
||||||
|
labels[Pos.ACTIVITIES_BTN] = _('Activities button');
|
||||||
|
labels[Pos.TASKBAR] = _('Taskbar');
|
||||||
|
labels[Pos.DATE_MENU] = _('Date menu');
|
||||||
|
labels[Pos.SYSTEM_MENU] = _('System menu');
|
||||||
|
labels[Pos.LEFT_BOX] = _('Left box');
|
||||||
|
labels[Pos.CENTER_BOX] = _('Center box');
|
||||||
|
labels[Pos.RIGHT_BOX] = _('Right box');
|
||||||
|
labels[Pos.DESKTOP_BTN] = _('Desktop button');
|
||||||
|
|
||||||
|
panelInfo.forEach(el => {
|
||||||
|
let row = new Gtk.ListBoxRow();
|
||||||
|
let grid = new Gtk.Grid({ margin: 2, margin_left: 12, margin_right: 12, column_spacing: 8 });
|
||||||
|
let upDownGrid = new Gtk.Grid({ column_spacing: 2 });
|
||||||
|
let upBtn = new Gtk.Button({ tooltip_text: _('Move up') });
|
||||||
|
let upImg = new Gtk.Image({ icon_name: 'go-up-symbolic', pixel_size: 12 });
|
||||||
|
let downBtn = new Gtk.Button({ tooltip_text: _('Move down') });
|
||||||
|
let downImg = new Gtk.Image({ icon_name: 'go-down-symbolic', pixel_size: 12 });
|
||||||
|
let visibleToggleBtn = new Gtk.ToggleButton({ label: _('Visible'), active: el.visible });
|
||||||
|
let positionCombo = new Gtk.ComboBoxText({ tooltip_text: _('Select element position') });
|
||||||
|
let upDownClickHandler = limit => {
|
||||||
|
let index = row.get_index();
|
||||||
|
|
||||||
|
if (index != limit) {
|
||||||
|
taskbarListBox.remove(row);
|
||||||
|
taskbarListBox.insert(row, index + (!limit ? -1 : 1));
|
||||||
|
updateSettings();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
positionCombo.append(Pos.STACKED_TL, isVertical ? _('Stacked top') : _('Stacked left'));
|
||||||
|
positionCombo.append(Pos.STACKED_BR, isVertical ? _('Stacked bottom') :_('Stacked right'));
|
||||||
|
positionCombo.append(Pos.CENTERED, _('Centered'));
|
||||||
|
positionCombo.append(Pos.CENTERED_MONITOR, _('Monitor Center'));
|
||||||
|
positionCombo.set_active_id(el.position);
|
||||||
|
|
||||||
|
upBtn.connect('clicked', () => upDownClickHandler(0));
|
||||||
|
downBtn.connect('clicked', () => upDownClickHandler(panelInfo.length - 1));
|
||||||
|
visibleToggleBtn.connect('toggled', () => updateSettings());
|
||||||
|
positionCombo.connect('changed', () => updateSettings());
|
||||||
|
|
||||||
|
upBtn.add(upImg);
|
||||||
|
downBtn.add(downImg);
|
||||||
|
|
||||||
|
upDownGrid.add(upBtn);
|
||||||
|
upDownGrid.add(downBtn);
|
||||||
|
|
||||||
|
grid.add(upDownGrid);
|
||||||
|
grid.add(new Gtk.Label({ label: labels[el.element], xalign: 0, hexpand: true }));
|
||||||
|
|
||||||
|
if (Pos.optionDialogFunctions[el.element]) {
|
||||||
|
let cogImg = new Gtk.Image({ icon_name: 'emblem-system-symbolic' });
|
||||||
|
let optionsBtn = new Gtk.Button({ tooltip_text: _('More options') });
|
||||||
|
|
||||||
|
optionsBtn.get_style_context().add_class('circular');
|
||||||
|
optionsBtn.add(cogImg);
|
||||||
|
grid.add(optionsBtn);
|
||||||
|
|
||||||
|
optionsBtn.connect('clicked', () => this[Pos.optionDialogFunctions[el.element]]());
|
||||||
|
}
|
||||||
|
|
||||||
|
grid.add(visibleToggleBtn);
|
||||||
|
grid.add(positionCombo);
|
||||||
|
|
||||||
|
row.id = el.element;
|
||||||
|
row.visibleToggleBtn = visibleToggleBtn;
|
||||||
|
row.positionCombo = positionCombo;
|
||||||
|
|
||||||
|
row.add(grid);
|
||||||
|
taskbarListBox.add(row);
|
||||||
|
});
|
||||||
|
|
||||||
|
taskbarListBox.show_all();
|
||||||
|
},
|
||||||
|
|
||||||
|
_showShowAppsButtonOptions: function() {
|
||||||
|
let dialog = new Gtk.Dialog({ title: _('Show Applications options'),
|
||||||
|
transient_for: this.widget.get_toplevel(),
|
||||||
|
use_header_bar: true,
|
||||||
|
modal: true });
|
||||||
|
|
||||||
|
// GTK+ leaves positive values for application-defined response ids.
|
||||||
|
// Use +1 for the reset action
|
||||||
|
dialog.add_button(_('Reset to defaults'), 1);
|
||||||
|
|
||||||
|
let box = this._builder.get_object('show_applications_options');
|
||||||
|
dialog.get_content_area().add(box);
|
||||||
|
|
||||||
|
let fileChooser = this._builder.get_object('show_applications_icon_file_filebutton');
|
||||||
|
let fileImage = this._builder.get_object('show_applications_current_icon_image');
|
||||||
|
let fileFilter = new Gtk.FileFilter();
|
||||||
|
let handleIconChange = function(newIconPath) {
|
||||||
|
if (newIconPath && GLib.file_test(newIconPath, GLib.FileTest.EXISTS)) {
|
||||||
|
let file = Gio.File.new_for_path(newIconPath)
|
||||||
|
let pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(file.read(null), 32, 32, true, null);
|
||||||
|
|
||||||
|
fileImage.set_from_pixbuf(pixbuf);
|
||||||
|
fileChooser.set_filename(newIconPath);
|
||||||
|
} else {
|
||||||
|
newIconPath = '';
|
||||||
|
fileImage.set_from_icon_name('view-app-grid-symbolic', 32);
|
||||||
|
fileChooser.unselect_all();
|
||||||
|
fileChooser.set_current_folder(GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES));
|
||||||
|
}
|
||||||
|
|
||||||
|
this._settings.set_string('show-apps-icon-file', newIconPath || '');
|
||||||
|
};
|
||||||
|
|
||||||
|
fileFilter.add_pixbuf_formats();
|
||||||
|
fileChooser.filter = fileFilter;
|
||||||
|
|
||||||
|
fileChooser.connect('file-set', widget => handleIconChange.call(this, widget.get_filename()));
|
||||||
|
handleIconChange.call(this, this._settings.get_string('show-apps-icon-file'));
|
||||||
|
|
||||||
|
dialog.connect('response', Lang.bind(this, function(dialog, id) {
|
||||||
|
if (id == 1) {
|
||||||
|
// restore default settings
|
||||||
|
this._settings.set_value('show-apps-icon-side-padding', this._settings.get_default_value('show-apps-icon-side-padding'));
|
||||||
|
this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding'));
|
||||||
|
this._settings.set_value('show-apps-override-escape', this._settings.get_default_value('show-apps-override-escape'));
|
||||||
|
handleIconChange.call(this, null);
|
||||||
|
} else {
|
||||||
|
// remove the settings box so it doesn't get destroyed;
|
||||||
|
dialog.get_content_area().remove(box);
|
||||||
|
dialog.destroy();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}));
|
||||||
|
|
||||||
|
dialog.show_all();
|
||||||
|
},
|
||||||
|
|
||||||
|
_showDesktopButtonOptions: function() {
|
||||||
|
let dialog = new Gtk.Dialog({ title: _('Show Desktop options'),
|
||||||
|
transient_for: this.widget.get_toplevel(),
|
||||||
|
use_header_bar: true,
|
||||||
|
modal: true });
|
||||||
|
|
||||||
|
// GTK+ leaves positive values for application-defined response ids.
|
||||||
|
// Use +1 for the reset action
|
||||||
|
dialog.add_button(_('Reset to defaults'), 1);
|
||||||
|
|
||||||
|
let box = this._builder.get_object('box_show_showdesktop_options');
|
||||||
|
dialog.get_content_area().add(box);
|
||||||
|
|
||||||
|
this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width'));
|
||||||
|
this._builder.get_object('show_showdesktop_width_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
|
this._settings.set_int('showdesktop-button-width', widget.get_value());
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay'));
|
||||||
|
this._builder.get_object('show_showdesktop_delay_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
|
this._settings.set_int('show-showdesktop-delay', widget.get_value());
|
||||||
|
}));
|
||||||
|
|
||||||
|
this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time'));
|
||||||
|
this._builder.get_object('show_showdesktop_time_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
|
this._settings.set_int('show-showdesktop-time', widget.get_value());
|
||||||
|
}));
|
||||||
|
|
||||||
|
dialog.connect('response', Lang.bind(this, function(dialog, id) {
|
||||||
|
if (id == 1) {
|
||||||
|
// restore default settings
|
||||||
|
this._settings.set_value('showdesktop-button-width', this._settings.get_default_value('showdesktop-button-width'));
|
||||||
|
this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width'));
|
||||||
|
|
||||||
|
this._settings.set_value('show-showdesktop-hover', this._settings.get_default_value('show-showdesktop-hover'));
|
||||||
|
|
||||||
|
this._settings.set_value('show-showdesktop-delay', this._settings.get_default_value('show-showdesktop-delay'));
|
||||||
|
this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay'));
|
||||||
|
|
||||||
|
this._settings.set_value('show-showdesktop-time', this._settings.get_default_value('show-showdesktop-time'));
|
||||||
|
this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time'));
|
||||||
|
} else {
|
||||||
|
// remove the settings box so it doesn't get destroyed;
|
||||||
|
dialog.get_content_area().remove(box);
|
||||||
|
dialog.destroy();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}));
|
||||||
|
|
||||||
|
dialog.show_all();
|
||||||
},
|
},
|
||||||
|
|
||||||
_setPositionRadios: function() {
|
_setPositionRadios: function() {
|
||||||
@@ -256,24 +443,11 @@ const Settings = new Lang.Class({
|
|||||||
// Position option
|
// Position option
|
||||||
this._setPositionRadios();
|
this._setPositionRadios();
|
||||||
|
|
||||||
|
this.monitors = this._settings.get_value('available-monitors').deep_unpack();
|
||||||
|
|
||||||
this._settings.connect('changed::panel-position', () => this._updateVerticalRelatedOptions());
|
this._settings.connect('changed::panel-position', () => this._updateVerticalRelatedOptions());
|
||||||
this._updateVerticalRelatedOptions();
|
this._updateVerticalRelatedOptions();
|
||||||
|
|
||||||
this._builder.get_object('location_clock_combo').connect('changed', Lang.bind (this, function(widget) {
|
|
||||||
let activeId = widget.get_active_id();
|
|
||||||
|
|
||||||
if (activeId) {
|
|
||||||
this._settings.set_string('location-clock', activeId);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
this._builder.get_object('taskbar_position_combo').connect('changed', Lang.bind (this, function(widget) {
|
|
||||||
let activeId = widget.get_active_id();
|
|
||||||
|
|
||||||
if (activeId) {
|
|
||||||
this._settings.set_string('taskbar-position', activeId);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
// size options
|
// size options
|
||||||
let panel_size_scale = this._builder.get_object('panel_size_scale');
|
let panel_size_scale = this._builder.get_object('panel_size_scale');
|
||||||
panel_size_scale.set_range(DEFAULT_PANEL_SIZES[DEFAULT_PANEL_SIZES.length-1], DEFAULT_PANEL_SIZES[0]);
|
panel_size_scale.set_range(DEFAULT_PANEL_SIZES[DEFAULT_PANEL_SIZES.length-1], DEFAULT_PANEL_SIZES[0]);
|
||||||
@@ -513,36 +687,35 @@ const Settings = new Lang.Class({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
//multi-monitor
|
//multi-monitor
|
||||||
let monitors = [-1];
|
|
||||||
|
for (let i = 0; i < this.monitors.length; ++i) {
|
||||||
|
//the primary index is the first one in the "available-monitors" setting
|
||||||
|
let label = !i ? _('Primary monitor') : _('Monitor ') + (i + 1);
|
||||||
|
|
||||||
this._builder.get_object('multimon_primary_combo').append_text(_('Default (Primary monitor)'));
|
this._builder.get_object('multimon_primary_combo').append_text(label);
|
||||||
|
this._builder.get_object('taskbar_position_monitor_combo').append_text(label);
|
||||||
for (let i = 0, monitorNum = Gdk.Screen.get_default().get_n_monitors(); i < monitorNum; ++i) {
|
|
||||||
this._builder.get_object('multimon_primary_combo').append_text(_('Monitor ') + (i+1));
|
|
||||||
monitors.push(i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._builder.get_object('multimon_primary_combo').set_active(monitors.indexOf(this._settings.get_int('primary-monitor')));
|
this._builder.get_object('multimon_primary_combo').set_active(this.monitors.indexOf(this._settings.get_int('primary-monitor')));
|
||||||
|
this._builder.get_object('taskbar_position_monitor_combo').set_active(this.monitors.indexOf(this._settings.get_int('primary-monitor')));
|
||||||
|
|
||||||
this._builder.get_object('multimon_primary_combo').connect('changed', Lang.bind (this, function(widget) {
|
this._builder.get_object('multimon_primary_combo').connect('changed', Lang.bind (this, function(widget) {
|
||||||
this._settings.set_int('primary-monitor', monitors[widget.get_active()]);
|
this._settings.set_int('primary-monitor', this.monitors[widget.get_active()]);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this._builder.get_object('taskbar_position_monitor_combo').connect('changed', Lang.bind (this, function(widget) {
|
||||||
|
this._displayTaskbarElementPositionsForMonitor(this.monitors[widget.get_active()]);
|
||||||
|
}));
|
||||||
|
|
||||||
|
//taskbar element positions
|
||||||
|
this._displayTaskbarElementPositionsForMonitor(this.monitors[this._builder.get_object('multimon_primary_combo').get_active()]);
|
||||||
|
|
||||||
this._settings.bind('multi-monitors',
|
this._settings.bind('multi-monitors',
|
||||||
this._builder.get_object('multimon_multi_switch'),
|
this._builder.get_object('multimon_multi_switch'),
|
||||||
'active',
|
'active',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
this._settings.bind('show-clock-all-monitors',
|
if (this.monitors.length === 1) {
|
||||||
this._builder.get_object('multimon_multi_show_clock_switch'),
|
|
||||||
'active',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
this._settings.bind('show-status-menu-all-monitors',
|
|
||||||
this._builder.get_object('multimon_multi_show_status_menu_switch'),
|
|
||||||
'active',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
if (monitors.length === 1) {
|
|
||||||
this._builder.get_object('multimon_multi_switch').set_active(false);
|
this._builder.get_object('multimon_multi_switch').set_active(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,102 +1008,20 @@ const Settings = new Lang.Class({
|
|||||||
|
|
||||||
// Behavior panel
|
// Behavior panel
|
||||||
|
|
||||||
this._settings.bind('show-show-apps-button',
|
|
||||||
this._builder.get_object('show_applications_button_switch'),
|
|
||||||
'active',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
this._settings.bind('show-show-apps-button',
|
|
||||||
this._builder.get_object('show_application_options_button'),
|
|
||||||
'sensitive',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding'));
|
this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding'));
|
||||||
this._builder.get_object('show_applications_side_padding_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
this._builder.get_object('show_applications_side_padding_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
this._settings.set_int('show-apps-icon-side-padding', widget.get_value());
|
this._settings.set_int('show-apps-icon-side-padding', widget.get_value());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this._builder.get_object('show_application_options_button').connect('clicked', Lang.bind(this, function() {
|
|
||||||
let dialog = new Gtk.Dialog({ title: _('Show Applications options'),
|
|
||||||
transient_for: this.widget.get_toplevel(),
|
|
||||||
use_header_bar: true,
|
|
||||||
modal: true });
|
|
||||||
|
|
||||||
// GTK+ leaves positive values for application-defined response ids.
|
|
||||||
// Use +1 for the reset action
|
|
||||||
dialog.add_button(_('Reset to defaults'), 1);
|
|
||||||
|
|
||||||
let box = this._builder.get_object('show_applications_options');
|
|
||||||
dialog.get_content_area().add(box);
|
|
||||||
|
|
||||||
let fileChooser = this._builder.get_object('show_applications_icon_file_filebutton');
|
|
||||||
let fileImage = this._builder.get_object('show_applications_current_icon_image');
|
|
||||||
let fileFilter = new Gtk.FileFilter();
|
|
||||||
let handleIconChange = function(newIconPath) {
|
|
||||||
if (newIconPath && GLib.file_test(newIconPath, GLib.FileTest.EXISTS)) {
|
|
||||||
let file = Gio.File.new_for_path(newIconPath)
|
|
||||||
let pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(file.read(null), 32, 32, true, null);
|
|
||||||
|
|
||||||
fileImage.set_from_pixbuf(pixbuf);
|
|
||||||
fileChooser.set_filename(newIconPath);
|
|
||||||
} else {
|
|
||||||
newIconPath = '';
|
|
||||||
fileImage.set_from_icon_name('view-app-grid-symbolic', 32);
|
|
||||||
fileChooser.unselect_all();
|
|
||||||
fileChooser.set_current_folder(GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES));
|
|
||||||
}
|
|
||||||
|
|
||||||
this._settings.set_string('show-apps-icon-file', newIconPath || '');
|
|
||||||
};
|
|
||||||
|
|
||||||
fileFilter.add_pixbuf_formats();
|
|
||||||
fileChooser.filter = fileFilter;
|
|
||||||
|
|
||||||
fileChooser.connect('file-set', widget => handleIconChange.call(this, widget.get_filename()));
|
|
||||||
handleIconChange.call(this, this._settings.get_string('show-apps-icon-file'));
|
|
||||||
|
|
||||||
dialog.connect('response', Lang.bind(this, function(dialog, id) {
|
|
||||||
if (id == 1) {
|
|
||||||
// restore default settings
|
|
||||||
this._settings.set_value('show-apps-icon-side-padding', this._settings.get_default_value('show-apps-icon-side-padding'));
|
|
||||||
this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding'));
|
|
||||||
this._settings.set_value('show-apps-override-escape', this._settings.get_default_value('show-apps-override-escape'));
|
|
||||||
handleIconChange.call(this, null);
|
|
||||||
} else {
|
|
||||||
// remove the settings box so it doesn't get destroyed;
|
|
||||||
dialog.get_content_area().remove(box);
|
|
||||||
dialog.destroy();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}));
|
|
||||||
|
|
||||||
dialog.show_all();
|
|
||||||
}));
|
|
||||||
|
|
||||||
this._settings.bind('animate-show-apps',
|
this._settings.bind('animate-show-apps',
|
||||||
this._builder.get_object('application_button_animation_button'),
|
this._builder.get_object('application_button_animation_switch'),
|
||||||
'active',
|
'active',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
this._settings.bind('show-show-apps-button',
|
|
||||||
this._builder.get_object('application_button_animation_button'),
|
|
||||||
'sensitive',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
this._settings.bind('show-apps-override-escape',
|
this._settings.bind('show-apps-override-escape',
|
||||||
this._builder.get_object('show_applications_esc_key_switch'),
|
this._builder.get_object('show_applications_esc_key_switch'),
|
||||||
'active',
|
'active',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
this._settings.bind('show-activities-button',
|
|
||||||
this._builder.get_object('show_activities_button_switch'),
|
|
||||||
'active',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
this._settings.bind('show-showdesktop-button',
|
|
||||||
this._builder.get_object('show_showdesktop_button_switch'),
|
|
||||||
'active',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
this._settings.bind('show-showdesktop-button',
|
|
||||||
this._builder.get_object('show_showdesktop_options_button'),
|
|
||||||
'sensitive',
|
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
this._settings.bind('show-showdesktop-hover',
|
this._settings.bind('show-showdesktop-hover',
|
||||||
this._builder.get_object('show_showdesktop_hide_switch'),
|
this._builder.get_object('show_showdesktop_hide_switch'),
|
||||||
@@ -942,59 +1033,6 @@ const Settings = new Lang.Class({
|
|||||||
'sensitive',
|
'sensitive',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
this._builder.get_object('show_showdesktop_options_button').connect('clicked', Lang.bind(this, function() {
|
|
||||||
|
|
||||||
let dialog = new Gtk.Dialog({ title: _('Show Desktop options'),
|
|
||||||
transient_for: this.widget.get_toplevel(),
|
|
||||||
use_header_bar: true,
|
|
||||||
modal: true });
|
|
||||||
|
|
||||||
// GTK+ leaves positive values for application-defined response ids.
|
|
||||||
// Use +1 for the reset action
|
|
||||||
dialog.add_button(_('Reset to defaults'), 1);
|
|
||||||
|
|
||||||
let box = this._builder.get_object('box_show_showdesktop_options');
|
|
||||||
dialog.get_content_area().add(box);
|
|
||||||
|
|
||||||
this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width'));
|
|
||||||
this._builder.get_object('show_showdesktop_width_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
|
||||||
this._settings.set_int('showdesktop-button-width', widget.get_value());
|
|
||||||
}));
|
|
||||||
|
|
||||||
this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay'));
|
|
||||||
this._builder.get_object('show_showdesktop_delay_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
|
||||||
this._settings.set_int('show-showdesktop-delay', widget.get_value());
|
|
||||||
}));
|
|
||||||
|
|
||||||
this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time'));
|
|
||||||
this._builder.get_object('show_showdesktop_time_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
|
||||||
this._settings.set_int('show-showdesktop-time', widget.get_value());
|
|
||||||
}));
|
|
||||||
|
|
||||||
dialog.connect('response', Lang.bind(this, function(dialog, id) {
|
|
||||||
if (id == 1) {
|
|
||||||
// restore default settings
|
|
||||||
this._settings.set_value('showdesktop-button-width', this._settings.get_default_value('showdesktop-button-width'));
|
|
||||||
this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width'));
|
|
||||||
|
|
||||||
this._settings.set_value('show-showdesktop-hover', this._settings.get_default_value('show-showdesktop-hover'));
|
|
||||||
|
|
||||||
this._settings.set_value('show-showdesktop-delay', this._settings.get_default_value('show-showdesktop-delay'));
|
|
||||||
this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay'));
|
|
||||||
|
|
||||||
this._settings.set_value('show-showdesktop-time', this._settings.get_default_value('show-showdesktop-time'));
|
|
||||||
this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time'));
|
|
||||||
} else {
|
|
||||||
// remove the settings box so it doesn't get destroyed;
|
|
||||||
dialog.get_content_area().remove(box);
|
|
||||||
dialog.destroy();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}));
|
|
||||||
|
|
||||||
dialog.show_all();
|
|
||||||
}));
|
|
||||||
|
|
||||||
this._settings.bind('show-appmenu',
|
this._settings.bind('show-appmenu',
|
||||||
this._builder.get_object('show_appmenu_switch'),
|
this._builder.get_object('show_appmenu_switch'),
|
||||||
'active',
|
'active',
|
||||||
@@ -1750,20 +1788,10 @@ const Settings = new Lang.Class({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var setGsStockPanelOptions = () => {
|
|
||||||
let keepTopPanel = this._settings.get_boolean('stockgs-keep-top-panel');
|
|
||||||
|
|
||||||
this._builder.get_object('stockgs_top_panel_description')[keepTopPanel ? 'show' : 'hide']();
|
|
||||||
this._builder.get_object('multimon_multi_show_clock_label').set_text(keepTopPanel ? _('Display the clock on additional panels') : _('Display the clock on secondary panels'));
|
|
||||||
this._builder.get_object('multimon_multi_show_status_menu_label').set_text(keepTopPanel ? _('Display the status menu on additional panels') : _('Display the status menu on secondary panels'));
|
|
||||||
};
|
|
||||||
|
|
||||||
this._settings.connect('changed::stockgs-keep-top-panel', () => {
|
this._settings.connect('changed::stockgs-keep-top-panel', () => {
|
||||||
setGsStockPanelOptions();
|
|
||||||
maybeDisableTopPosition();
|
maybeDisableTopPosition();
|
||||||
});
|
});
|
||||||
|
|
||||||
setGsStockPanelOptions();
|
|
||||||
maybeDisableTopPosition();
|
maybeDisableTopPosition();
|
||||||
|
|
||||||
this._settings.bind('stockgs-panelbtn-click-only',
|
this._settings.bind('stockgs-panelbtn-click-only',
|
||||||
|
|||||||
@@ -25,21 +25,6 @@
|
|||||||
<value value='3' nick='PASS_THROUGH'/>
|
<value value='3' nick='PASS_THROUGH'/>
|
||||||
<value value='4' nick='CHANGE_VOLUME'/>
|
<value value='4' nick='CHANGE_VOLUME'/>
|
||||||
</enum>
|
</enum>
|
||||||
<enum id='org.gnome.shell.extensions.dash-to-panel.statusAreaPosition'>
|
|
||||||
<value value='0' nick='BUTTONSLEFT'/>
|
|
||||||
<value value='1' nick='STATUSLEFT'/>
|
|
||||||
<value value='2' nick='STATUSRIGHT'/>
|
|
||||||
<value value='3' nick='BUTTONSRIGHT'/>
|
|
||||||
<value value='4' nick='TASKBARLEFT'/>
|
|
||||||
<value value='5' nick='TASKBARRIGHT'/>
|
|
||||||
</enum>
|
|
||||||
<enum id='org.gnome.shell.extensions.dash-to-panel.taskbarPosition'>
|
|
||||||
<value value='0' nick='LEFTPANEL'/>
|
|
||||||
<value value='1' nick='CENTEREDMONITOR'/>
|
|
||||||
<value value='2' nick='CENTEREDCONTENT'/>
|
|
||||||
<value value='3' nick='LEFTPANEL_FIXEDCENTER'/>
|
|
||||||
<value value='4' nick='LEFTPANEL_FLOATCENTER'/>
|
|
||||||
</enum>
|
|
||||||
<enum id='org.gnome.shell.extensions.dash-to-panel.hotkeyPrefix'>
|
<enum id='org.gnome.shell.extensions.dash-to-panel.hotkeyPrefix'>
|
||||||
<value value='0' nick='Super'/>
|
<value value='0' nick='Super'/>
|
||||||
<value value='1' nick='SuperAlt'/>
|
<value value='1' nick='SuperAlt'/>
|
||||||
@@ -87,6 +72,11 @@
|
|||||||
<summary>Panel position</summary>
|
<summary>Panel position</summary>
|
||||||
<description>Panel is shown on the Bottom or Top of the screen.</description>
|
<description>Panel is shown on the Bottom or Top of the screen.</description>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="panel-element-positions" type="s">
|
||||||
|
<default>'{}'</default>
|
||||||
|
<summary>Panel element positions</summary>
|
||||||
|
<description>Panel element positions (JSON).</description>
|
||||||
|
</key>
|
||||||
<key type="i" name="panel-size">
|
<key type="i" name="panel-size">
|
||||||
<default>48</default>
|
<default>48</default>
|
||||||
<summary>Panel size</summary>
|
<summary>Panel size</summary>
|
||||||
@@ -207,16 +197,6 @@
|
|||||||
<summary>Force hot corner</summary>
|
<summary>Force hot corner</summary>
|
||||||
<description>Wheter to force having an Activities hot corner on the primary monitor</description>
|
<description>Wheter to force having an Activities hot corner on the primary monitor</description>
|
||||||
</key>
|
</key>
|
||||||
<key name="location-clock" enum="org.gnome.shell.extensions.dash-to-panel.statusAreaPosition">
|
|
||||||
<default>'STATUSLEFT'</default>
|
|
||||||
<summary>Location of the clock</summary>
|
|
||||||
<description>Set the location of the clock on the taskbar</description>
|
|
||||||
</key>
|
|
||||||
<key name="taskbar-position" enum="org.gnome.shell.extensions.dash-to-panel.taskbarPosition">
|
|
||||||
<default>'LEFTPANEL'</default>
|
|
||||||
<summary>Position of the taskbar</summary>
|
|
||||||
<description>Set the position of the taskbar on the panel</description>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="taskbar-locked">
|
<key type="b" name="taskbar-locked">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Lock the taskbar</summary>
|
<summary>Lock the taskbar</summary>
|
||||||
@@ -583,30 +563,25 @@
|
|||||||
<description>When the applications are ungrouped, this defines if running applications stay separate from the favorite icons.</description>
|
<description>When the applications are ungrouped, this defines if running applications stay separate from the favorite icons.</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="i" name="primary-monitor">
|
<key type="i" name="primary-monitor">
|
||||||
<default>-1</default>
|
<default>0</default>
|
||||||
<summary>Primary monitor index</summary>
|
<summary>Primary monitor index</summary>
|
||||||
<description>Specifies the index of the primary monitor (-1 = GNOME Primary Monitor).</description>
|
<description>Specifies the index of the primary monitor.</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="multi-monitors">
|
<key type="b" name="multi-monitors">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<summary>Display panels on all monitors</summary>
|
<summary>Display panels on all monitors</summary>
|
||||||
<description>Specifies if a panel is shown on every monitors</description>
|
<description>Specifies if a panel is shown on every monitors</description>
|
||||||
</key>
|
</key>
|
||||||
|
<key type="ai" name="available-monitors">
|
||||||
|
<default>[]</default>
|
||||||
|
<summary>Available monitors</summary>
|
||||||
|
<description>Available gnome-shell (Mutter) monitors, internal use</description>
|
||||||
|
</key>
|
||||||
<key type="b" name="isolate-monitors">
|
<key type="b" name="isolate-monitors">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Provide monitor isolation</summary>
|
<summary>Provide monitor isolation</summary>
|
||||||
<description>Dash shows only windows from the current monitor</description>
|
<description>Dash shows only windows from the current monitor</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="show-clock-all-monitors">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Display the clock on all monitors</summary>
|
|
||||||
<description>Specifies if every panel should display the clock. If false, the clock is only displayed on the primary monitor.</description>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="show-status-menu-all-monitors">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Display the status menu on all monitors</summary>
|
|
||||||
<description>Specifies if every panel should display the status menu. If false, the status menu is only displayed on the primary monitor.</description>
|
|
||||||
</key>
|
|
||||||
<key type="b" name="show-favorites-all-monitors">
|
<key type="b" name="show-favorites-all-monitors">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
<summary>Display the favorites on all monitors</summary>
|
<summary>Display the favorites on all monitors</summary>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#dashtopanelScrollview .app-well-app .overview-icon,
|
#dashtopanelScrollview .app-well-app .overview-icon,
|
||||||
#dashtopanelTaskbar .show-apps .overview-icon {
|
.dashtopanelMainPanel .show-apps .overview-icon {
|
||||||
border: none;
|
border: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
29
taskbar.js
29
taskbar.js
@@ -89,21 +89,16 @@ var taskbarActor = Utils.defineClass({
|
|||||||
|
|
||||||
let availFixedSize = box[Panel.fixedCoord.c2] - box[Panel.fixedCoord.c1];
|
let availFixedSize = box[Panel.fixedCoord.c2] - box[Panel.fixedCoord.c1];
|
||||||
let availVarSize = box[Panel.varCoord.c2] - box[Panel.varCoord.c1];
|
let availVarSize = box[Panel.varCoord.c2] - box[Panel.varCoord.c1];
|
||||||
let [, showAppsButton, scrollview, leftFade, rightFade] = this.get_children();
|
let [, scrollview, leftFade, rightFade] = this.get_children();
|
||||||
let [, showAppsNatSize] = showAppsButton[Panel.sizeFunc](availFixedSize);
|
|
||||||
let [, natSize] = this[Panel.sizeFunc](availFixedSize);
|
let [, natSize] = this[Panel.sizeFunc](availFixedSize);
|
||||||
let childBox = new Clutter.ActorBox();
|
let childBox = new Clutter.ActorBox();
|
||||||
let orientation = Panel.getOrientation();
|
let orientation = Panel.getOrientation();
|
||||||
|
|
||||||
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c1];
|
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c1];
|
||||||
childBox[Panel.fixedCoord.c1] = box[Panel.fixedCoord.c1];
|
|
||||||
|
|
||||||
childBox[Panel.varCoord.c2] = box[Panel.varCoord.c1] + showAppsNatSize;
|
|
||||||
childBox[Panel.fixedCoord.c2] = box[Panel.fixedCoord.c2];
|
|
||||||
showAppsButton.allocate(childBox, flags);
|
|
||||||
|
|
||||||
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c1] + showAppsNatSize;
|
|
||||||
childBox[Panel.varCoord.c2] = Math.min(availVarSize, natSize);
|
childBox[Panel.varCoord.c2] = Math.min(availVarSize, natSize);
|
||||||
|
childBox[Panel.fixedCoord.c1] = box[Panel.fixedCoord.c1];
|
||||||
|
childBox[Panel.fixedCoord.c2] = box[Panel.fixedCoord.c2];
|
||||||
|
|
||||||
scrollview.allocate(childBox, flags);
|
scrollview.allocate(childBox, flags);
|
||||||
|
|
||||||
let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values();
|
let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values();
|
||||||
@@ -119,7 +114,6 @@ var taskbarActor = Utils.defineClass({
|
|||||||
rightFade.set_style(gradientStyle);
|
rightFade.set_style(gradientStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c1] + showAppsNatSize;
|
|
||||||
childBox[Panel.varCoord.c2] = childBox[Panel.varCoord.c1] + (value > 0 ? scrollview._dtpFadeSize : 0);
|
childBox[Panel.varCoord.c2] = childBox[Panel.varCoord.c1] + (value > 0 ? scrollview._dtpFadeSize : 0);
|
||||||
leftFade.allocate(childBox, flags);
|
leftFade.allocate(childBox, flags);
|
||||||
|
|
||||||
@@ -193,8 +187,7 @@ var taskbar = Utils.defineClass({
|
|||||||
this._scrollView.connect('scroll-event', Lang.bind(this, this._onScrollEvent ));
|
this._scrollView.connect('scroll-event', Lang.bind(this, this._onScrollEvent ));
|
||||||
this._scrollView.add_actor(this._box);
|
this._scrollView.add_actor(this._box);
|
||||||
|
|
||||||
// Create a wrapper around the real showAppsIcon in order to add a popupMenu.
|
this._showAppsIconWrapper = panel.showAppsIconWrapper;
|
||||||
this._showAppsIconWrapper = new AppIcons.ShowAppsIconWrapper();
|
|
||||||
this._showAppsIconWrapper.connect('menu-state-changed', Lang.bind(this, function(showAppsIconWrapper, opened) {
|
this._showAppsIconWrapper.connect('menu-state-changed', Lang.bind(this, function(showAppsIconWrapper, opened) {
|
||||||
this._itemMenuStateChanged(showAppsIconWrapper, opened);
|
this._itemMenuStateChanged(showAppsIconWrapper, opened);
|
||||||
}));
|
}));
|
||||||
@@ -215,7 +208,6 @@ var taskbar = Utils.defineClass({
|
|||||||
this._hookUpLabel(this._showAppsIcon, this._showAppsIconWrapper);
|
this._hookUpLabel(this._showAppsIcon, this._showAppsIconWrapper);
|
||||||
|
|
||||||
this._container.add_child(new St.Widget({ width: 0, reactive: false }));
|
this._container.add_child(new St.Widget({ width: 0, reactive: false }));
|
||||||
this._container.add_actor(this._showAppsIcon);
|
|
||||||
this._container.add_actor(this._scrollView);
|
this._container.add_actor(this._scrollView);
|
||||||
|
|
||||||
let orientation = Panel.getOrientation();
|
let orientation = Panel.getOrientation();
|
||||||
@@ -358,7 +350,10 @@ var taskbar = Utils.defineClass({
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
adjustment,
|
adjustment,
|
||||||
'notify::upper',
|
[
|
||||||
|
'notify::upper',
|
||||||
|
'notify::pageSize'
|
||||||
|
],
|
||||||
() => {
|
() => {
|
||||||
// Update minimization animation target position on scrollview change.
|
// Update minimization animation target position on scrollview change.
|
||||||
this._updateAppIcons();
|
this._updateAppIcons();
|
||||||
@@ -392,7 +387,6 @@ var taskbar = Utils.defineClass({
|
|||||||
destroy: function() {
|
destroy: function() {
|
||||||
this._signalsHandler.destroy();
|
this._signalsHandler.destroy();
|
||||||
this._signalsHandler = 0;
|
this._signalsHandler = 0;
|
||||||
this._showAppsIconWrapper.destroy();
|
|
||||||
|
|
||||||
this._container.destroy();
|
this._container.destroy();
|
||||||
|
|
||||||
@@ -896,7 +890,7 @@ var taskbar = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Reset the displayed apps icon to mantain the correct order
|
// Reset the displayed apps icon to mantain the correct order
|
||||||
resetAppIcons : function() {
|
resetAppIcons : function(geometryChange) {
|
||||||
let children = this._getTaskbarIcons(true);
|
let children = this._getTaskbarIcons(true);
|
||||||
|
|
||||||
for (let i = 0; i < children.length; i++) {
|
for (let i = 0; i < children.length; i++) {
|
||||||
@@ -908,8 +902,7 @@ var taskbar = Utils.defineClass({
|
|||||||
this._shownInitially = false;
|
this._shownInitially = false;
|
||||||
this._redisplay();
|
this._redisplay();
|
||||||
|
|
||||||
if (Panel.checkIfVertical()) {
|
if (geometryChange && Panel.checkIfVertical()) {
|
||||||
this.showAppsButton.set_width(this.dtpPanel.geom.w);
|
|
||||||
this.previewMenu._updateClip();
|
this.previewMenu._updateClip();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user