From a4224f4acc52a1b69e43951aaad1864c6db54e90 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Sat, 8 May 2021 15:07:25 +0200 Subject: [PATCH] Update to Gnome 40 (#1303) * 1 * renamed ui.viewSelector to ui.searchController * add arrowIcon null check * add object null check * add _showAppsButton null check * fixed _workspacesDisplay * removed shadow-type properties * removed packing from ui * renamed margin_left/right to margin_start/end * renamed GtkRadioButton to GtkToggleButton, removed draw_indicator and image_position * removed xalign from buttons, stock -> icon_name, GtkFileChooserButton -> BtkButton (todo connect a GtkFileChooserNative), removed format-value (todo connect GtkScaleFormatValueFunc callback) * removed events, relief * comment arrowIcon.set_icon_name and _hbox.get_last_child out * called gtk4-builder-tool simplify --3to4 on Settings.ui * fix _workspaceDisplay * revert Settings.ui back to old gtk3 version * removed _builder.connect_signals_full and added a BuilderScope instead, use class specific add functions, removed show_all for widgets, updated margins* for GtkGrid * add try catch aroung object.connect * fixed _searchEntry path * disabled _newUpdateWorkspacesViews temporarily, because it is very buggy right now * fixed _searchEntry path (this time for real?) * dialog.show_all() -> dialog.show(), widget.get_toplevel() -> widget.get_root(), fixed adjustScrollableHeight (no longer crashes, still does not work correctly) * updated GtkGrid.attach calls * added Gtk.FileChooserNative for show_applications_icon_file_filebutton * added packing again to ui (commented) and also added layout row/column/width/height in exchange for top_attach/left_attach/colspan/rowspan * renamed colspan/rowspan to column-span/row-span * removed all packaing left_attach/top_attach * updated adjustScrollableHeight so the dialog will have a reasonable size again * limit shell-version to 40 since it is not backwards compatible right now * called _updateBackgrounds in layoutManager ,fixed overview <-> _overview typo? * pass Settings instead of Settings._settings to BuilderScope * workaround for showAppsIcon (_showAppsButton seems to be no longer be available) * replaced newlines in the ui file with the newline unicode symbol, so code block collapsing works peroperly * moved the scrolled window directly into each notebook tab, so the tab headers are always visible * fixed taskbarListBox children loops * commented non working elements out (panel on left/right, import/export settings, update) * renamed Settings to Preferences to avoid confusion with dconf settings object * updated this.widget to this.notebook * fixed dialogs size and expand * fixed window preview options having too many columns * removed all packing with expand/fill/position (already uncommented) * removed menu arrows since they are no longer recommended for gnome40 * removed adjustScrollableHeight, default sizes are acceptable * updated ui required version to gtk 4.0 * updated path to dash.showAppsButton * fixes for showAppsButton * fixed clickToExit * fixed import/export settings * added disable show overview on startup option * removed old show apps animation * fixed panel on left/right side * fixed scroll on volume icon no longer will scrolling on the volume icon switch workspaces as well * commented some setFocusedMonitor support out, caused issues on Xorg * removed oldDash * updated hide overview on startup, no longer closes overview after suspend etc * removed _newOverviewRelayout * removed _newUpdateWorkspacesViews * commented setFocusedMonitor out completly, because show overview on non primary monitor does not work properly for now * fixed typo * fixed merging error * check if func is valid in hookVfunc * updated ui to gtk4, fixed merging error * fixed layout for apply changes to all monitors * fix behaviour tab and app icon margin/padding grid * fix animate launching new windows grid row * fixed about tab Co-authored-by: Cole Gerdemann --- Settings.ui | 7493 ++++++++--------- extension.js | 19 +- metadata.json | 2 +- overview.js | 71 +- panel.js | 61 +- panelManager.js | 155 +- prefs.js | 647 +- ...shell.extensions.dash-to-panel.gschema.xml | 10 +- taskbar.js | 77 +- utils.js | 13 +- 10 files changed, 3807 insertions(+), 4741 deletions(-) diff --git a/Settings.ui b/Settings.ui index 9589a20..b6fdd3c 100644 --- a/Settings.ui +++ b/Settings.ui @@ -1,7 +1,7 @@ - + True False @@ -20,8 +20,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -33,11 +33,6 @@ Animation type 0 - - False - True - 0 - @@ -50,12 +45,6 @@ Plank - - False - False - end - 1 - @@ -70,8 +59,8 @@ True False - 12 - 12 + 12 + 12 12 12 24 @@ -80,16 +69,16 @@ True False - 12 + 12 Duration True 0 end + + 0 + 0 + - - 0 - 0 - @@ -101,12 +90,12 @@ 0 0 right - + + + 0 + 1 + - - 1 - 0 - @@ -115,11 +104,11 @@ Rotation 0 end + + 1 + 0 + - - 0 - 1 - @@ -131,12 +120,12 @@ 0 0 right - + + + 1 + 1 + - - 1 - 1 - @@ -145,11 +134,11 @@ Travel 0 end + + 2 + 0 + - - 0 - 2 - @@ -161,12 +150,12 @@ 0 0 right - + + + 2 + 1 + - - 1 - 2 - @@ -175,11 +164,11 @@ Zoom 0 end + + 3 + 0 + - - 0 - 3 - @@ -191,12 +180,12 @@ 0 0 right - + + + 3 + 1 + - - 1 - 3 - @@ -205,11 +194,11 @@ Convexity 0 end + + 4 + 0 + - - 0 - 4 - @@ -221,12 +210,12 @@ 1 1 right - + + + 4 + 1 + - - 1 - 4 - @@ -235,11 +224,11 @@ Extent 0 end + + 0 + 5 + - - 0 - 5 - @@ -251,23 +240,18 @@ 0 0 right - + + + 5 + 1 + - - 1 - 5 - - - False - True - 0 - @@ -327,12 +311,13 @@ True False vertical + 1 + 1 True False 0 - in True @@ -358,27 +343,23 @@ - - False - True - 0 - True False - 12 - 12 + 12 + 12 12 12 vertical + 1 + 1 True False 0 - in True @@ -394,8 +375,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -411,11 +392,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -424,11 +405,11 @@ True Shift+Click action 0 + + 0 + 0 + - - 0 - 0 - @@ -445,12 +426,12 @@ Toggle single / Cycle multiple Quit + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -466,8 +447,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -483,11 +464,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -496,11 +477,11 @@ True Middle-Click action 0 + + 0 + 0 + - - 0 - 0 - @@ -516,12 +497,12 @@ Toggle single / Preview multiple Quit + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -537,8 +518,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -554,11 +535,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -567,11 +548,11 @@ True Shift+Middle-Click action 0 + + 0 + 0 + - - 0 - 0 - @@ -587,12 +568,12 @@ Toggle single / Preview multiple Quit + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -601,23 +582,19 @@ - - False - True - 0 - True False vertical + 1 + 1 True False 0 - in True @@ -634,8 +611,8 @@ True False center - 12 - 12 + 12 + 12 12 12 32 @@ -647,11 +624,11 @@ Integrate <i>AppMenu</i> items True 0 + + 0 + 0 + - - 0 - 0 - @@ -659,11 +636,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -680,8 +657,8 @@ True False center - 12 - 12 + 12 + 12 12 12 32 @@ -693,11 +670,11 @@ <i>Show Details</i> menu item True 0 + + 0 + 0 + - - 0 - 0 - @@ -705,11 +682,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -718,11 +695,6 @@ - - False - True - 0 - @@ -753,16 +725,17 @@ 12 12 vertical + 1 + 1 True False - 12 - 12 + 12 + 12 12 12 0 - in True @@ -777,8 +750,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -790,11 +763,11 @@ True Highlight focused application 0 + + 0 + 0 + - - 0 - 0 - @@ -802,17 +775,17 @@ True end center + + 0 + 1 + - - 1 - 0 - True False - 12 + 12 8 @@ -821,11 +794,11 @@ True Icon dominant color 0 + + 0 + 0 + - - 0 - 0 - @@ -834,10 +807,6 @@ end center - - 1 - 0 - @@ -846,11 +815,11 @@ True Custom color 0 + + 1 + 0 + - - 0 - 1 - @@ -858,11 +827,11 @@ True True end + + 1 + 1 + - - 1 - 1 - @@ -871,11 +840,11 @@ True Highlight opacity 0 + + 2 + 0 + - - 0 - 2 - @@ -885,18 +854,18 @@ 5 focus_highlight_opacity_adjustment 5 + + 2 + 1 + - - 1 - 2 - + + 1 + 0 + 2 + - - 0 - 1 - 2 - @@ -911,8 +880,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -923,11 +892,11 @@ True Indicator size (px) 0 + + 0 + 0 + - - 0 - 0 - @@ -936,11 +905,11 @@ end 0 dot_size_adjustment + + 0 + 1 + - - 1 - 0 - @@ -955,8 +924,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -967,11 +936,11 @@ True Indicator color - Icon Dominant 0 + + 0 + 0 + - - 0 - 0 - @@ -979,11 +948,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -999,8 +968,8 @@ True False - 12 - 12 + 12 + 12 vertical @@ -1014,11 +983,6 @@ Indicator color - Override Theme 0 - - False - True - 0 - @@ -1027,24 +991,14 @@ end center - - False - True - 1 - - - False - True - 0 - True False - 12 + 12 12 12 4 @@ -1056,11 +1010,11 @@ True 1 window open (or ungrouped) 0 + + 0 + 0 + - - 0 - 0 - @@ -1074,12 +1028,6 @@ True True - - False - True - 4 - 0 - @@ -1088,17 +1036,12 @@ True end - - False - True - 1 - + + 0 + 1 + - - 1 - 0 - @@ -1107,11 +1050,11 @@ True 2 windows open 0 + + 1 + 0 + - - 0 - 1 - @@ -1120,11 +1063,11 @@ True 3 windows open 0 + + 2 + 0 + - - 0 - 2 - @@ -1133,11 +1076,11 @@ True 4+ windows open 0 + + 3 + 0 + - - 0 - 3 - @@ -1145,11 +1088,11 @@ True True end + + 1 + 1 + - - 1 - 1 - @@ -1157,11 +1100,11 @@ True True end + + 2 + 1 + - - 1 - 2 - @@ -1169,18 +1112,13 @@ True True end + + 3 + 1 + - - 1 - 3 - - - False - True - 1 - @@ -1191,7 +1129,7 @@ True False - 12 + 12 True @@ -1200,11 +1138,6 @@ Use different for unfocused 0 - - False - True - 0 - @@ -1213,24 +1146,14 @@ end center - - False - True - 1 - - - False - True - 0 - True False - 12 + 12 12 12 4 @@ -1242,11 +1165,11 @@ True 1 window open (or ungrouped) 0 + + 0 + 0 + - - 0 - 0 - @@ -1260,12 +1183,6 @@ True True - - False - True - 4 - 0 - @@ -1274,17 +1191,12 @@ True end - - False - True - 1 - + + 0 + 1 + - - 1 - 0 - @@ -1293,11 +1205,11 @@ True 2 windows open 0 + + 1 + 0 + - - 0 - 1 - @@ -1305,11 +1217,11 @@ True True end + + 1 + 1 + - - 1 - 1 - @@ -1318,11 +1230,11 @@ True 3 windows open 0 + + 2 + 0 + - - 0 - 2 - @@ -1330,11 +1242,11 @@ True True end + + 2 + 1 + - - 1 - 2 - @@ -1343,11 +1255,11 @@ True 4+ windows open 0 + + 3 + 0 + - - 0 - 3 - @@ -1355,25 +1267,15 @@ True True end + + 3 + 1 + - - 1 - 3 - - - False - True - 1 - - - False - True - 4 - @@ -1382,11 +1284,6 @@ - - False - True - 0 - @@ -1404,12 +1301,13 @@ True False vertical + 1 + 1 True False 0 - in True @@ -1423,8 +1321,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1437,11 +1335,11 @@ 0 group_apps_label_font_size_adjustment True + + 0 + 1 + - - 1 - 0 - @@ -1451,11 +1349,11 @@ Font size (px) of the application titles (default is 14) True 0 + + 0 + 0 + - - 0 - 0 - @@ -1469,8 +1367,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1481,11 +1379,11 @@ True Font weight of application titles 0 + + 0 + 0 + - - 0 - 0 - @@ -1499,11 +1397,11 @@ bold bolder + + 0 + 1 + - - 1 - 0 - @@ -1517,8 +1415,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1530,11 +1428,11 @@ Font color of the application titles True 0 + + 0 + 0 + - - 0 - 0 - @@ -1542,11 +1440,11 @@ True True end + + 0 + 1 + - - 1 - 0 - @@ -1560,8 +1458,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1573,11 +1471,11 @@ Font color of the minimized application titles True 0 + + 0 + 0 + - - 0 - 0 - @@ -1585,11 +1483,11 @@ True True end + + 0 + 1 + - - 1 - 0 - @@ -1603,8 +1501,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1615,11 +1513,11 @@ True Maximum width (px) of the application titles (default is 160) 0 + + 0 + 0 + - - 0 - 0 - @@ -1630,11 +1528,11 @@ 0 group_apps_label_max_width_adjustment True + + 0 + 1 + - - 1 - 0 - @@ -1648,8 +1546,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1660,11 +1558,11 @@ True Use a fixed width for the application titles 0 + + 0 + 0 + - - 0 - 0 - @@ -1672,11 +1570,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -1690,12 +1588,12 @@ + + 1 + 0 + 2 + - - 0 - 1 - 2 - @@ -1709,8 +1607,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1721,11 +1619,11 @@ True Display running indicators on unfocused applications 0 + + 0 + 0 + - - 0 - 0 - @@ -1733,11 +1631,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -1751,8 +1649,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -1763,11 +1661,11 @@ True Use the favorite icons as application launchers 0 + + 0 + 0 + - - 0 - 0 - @@ -1775,11 +1673,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -1788,11 +1686,6 @@ - - False - True - 0 - @@ -1828,12 +1721,13 @@ True False vertical + 1 + 1 True False 0 - in True @@ -1847,8 +1741,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -1862,11 +1756,11 @@ Only hide the panel when it is obstructed by windows True 0 + + 0 + 0 + - - 0 - 0 - @@ -1874,17 +1768,17 @@ True end center + + 0 + 1 + - - 1 - 0 - True False - 12 + 12 4 @@ -1893,11 +1787,11 @@ True The panel hides from 0 + + 0 + 0 + - - 0 - 0 - @@ -1909,18 +1803,18 @@ Focused windows Maximized windows + + 0 + 1 + - - 1 - 0 - + + 1 + 0 + 2 + - - 0 - 1 - 2 - @@ -1934,8 +1828,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -1948,11 +1842,11 @@ Require pressure at the edge of the screen to reveal the panel True 0 + + 0 + 0 + - - 0 - 0 - @@ -1960,17 +1854,17 @@ True end center + + 0 + 1 + - - 1 - 0 - True False - 12 + 12 4 @@ -1980,11 +1874,11 @@ Required pressure threshold (px) True 0 + + 0 + 0 + - - 0 - 0 - @@ -1995,11 +1889,11 @@ 0 intellihide_pressure_threshold_adjustment True + + 0 + 1 + - - 1 - 0 - @@ -2009,11 +1903,11 @@ Required pressure timeout (ms) True 0 + + 1 + 0 + - - 0 - 1 - @@ -2024,18 +1918,18 @@ 0 intellihide_pressure_time_adjustment True + + 1 + 1 + - - 1 - 1 - + + 1 + 0 + 2 + - - 0 - 1 - 2 - @@ -2050,8 +1944,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -2064,11 +1958,11 @@ Allow the panel to be revealed while in fullscreen mode True 0 + + 0 + 0 + - - 0 - 0 - @@ -2076,11 +1970,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -2094,8 +1988,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -2108,11 +2002,11 @@ Only hide secondary panels (requires multi-monitors option) True 0 + + 0 + 0 + - - 0 - 0 - @@ -2120,11 +2014,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -2138,8 +2032,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -2149,12 +2043,12 @@ center 12 e.g. <Super>i + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -2163,11 +2057,11 @@ True Keyboard shortcut to reveal and hold the panel 0 + + 0 + 0 + - - 0 - 0 - @@ -2180,11 +2074,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -2198,8 +2092,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -2210,11 +2104,11 @@ True Hide and reveal animation duration (ms) 0 + + 0 + 0 + - - 0 - 0 - @@ -2225,11 +2119,11 @@ 0 intellihide_animation_time_adjustment True + + 0 + 1 + - - 1 - 0 - @@ -2244,8 +2138,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -2256,11 +2150,11 @@ True Delay before hiding the panel (ms) 0 + + 0 + 0 + - - 0 - 0 - @@ -2272,11 +2166,11 @@ intellihide_close_delay_adjustment True 10 + + 0 + 1 + - - 1 - 0 - @@ -2290,8 +2184,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -2304,11 +2198,11 @@ Delay before enabling intellihide on start (ms) True 0 + + 0 + 0 + - - 0 - 0 - @@ -2320,11 +2214,11 @@ intellihide_enable_hide_delay_adjustment True 10 + + 0 + 1 + - - 1 - 0 - @@ -2333,11 +2227,6 @@ - - False - True - 0 - @@ -2415,7 +2304,6 @@ True True - in 460 480 @@ -2439,8 +2327,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -2454,11 +2342,11 @@ 0 preview_timeout_adjustment True + + 0 + 1 + - - 1 - 0 - @@ -2468,11 +2356,11 @@ Time (ms) before showing (400 is default) True 0 + + 0 + 0 + - - 0 - 0 - @@ -2481,11 +2369,11 @@ True Animation time (ms) 0 + + 2 + 0 + - - 0 - 2 - @@ -2496,11 +2384,11 @@ 0 preview_animation_time_adjustment True + + 2 + 1 + - - 1 - 2 - @@ -2515,43 +2403,32 @@ Time (ms) before hiding (100 is default) 0 - - False - True - 0 - True True False - 12 + 12 4 - True 4 True False start - 4 + 4 Immediate on application icon click True - - False - True - 1 - + + 1 + 0 + - - 0 - 1 - @@ -2564,11 +2441,11 @@ leave_timeout_adjustment True 25 + + 1 + 1 + - - 1 - 1 - @@ -2582,8 +2459,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -2595,11 +2472,11 @@ Middle click on the preview to close the window True 0 + + 0 + 0 + - - 0 - 0 - @@ -2607,11 +2484,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -2625,8 +2502,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -2639,12 +2516,12 @@ Window previews preferred size (px) True 0 + + 0 + 0 + 2 + - - 0 - 0 - 3 - @@ -2657,10 +2534,6 @@ True 100 - - 2 - 0 - @@ -2670,12 +2543,11 @@ Window previews aspect ratio Y (height) True 0 + + 2 + 0 + - - 0 - 2 - 2 - @@ -2685,12 +2557,11 @@ Window previews padding (px) True 0 + + 3 + 0 + - - 0 - 3 - 2 - @@ -2702,11 +2573,11 @@ preview_padding_adjustment True 50 + + 3 + 1 + - - 2 - 3 - @@ -2745,11 +2616,6 @@ 21 - - False - True - 1 - @@ -2759,17 +2625,12 @@ True end - - False - True - 2 - + + 1 + 1 + - - 2 - 1 - @@ -2779,12 +2640,11 @@ Window previews aspect ratio X (width) True 0 + + 1 + 0 + - - 0 - 1 - 2 - @@ -2823,11 +2683,6 @@ 21 - - False - True - 0 - @@ -2837,17 +2692,12 @@ True end - - False - True - 1 - + + 2 + 1 + - - 2 - 2 - @@ -2861,8 +2711,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -2874,11 +2724,11 @@ Use custom opacity for the previews background True 0 + + 0 + 0 + - - 0 - 0 - @@ -2892,12 +2742,12 @@ + + 1 + 0 + 2 + - - 0 - 1 - 2 - @@ -2911,11 +2761,6 @@ end center - - False - True - 1 - @@ -2927,17 +2772,12 @@ preview_opacity_adjustment 5 - - False - True - 2 - + + 0 + 1 + - - 1 - 0 - @@ -2951,8 +2791,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -2964,11 +2804,6 @@ Close button and header position 0 - - False - True - 0 - @@ -2977,7 +2812,7 @@ end 32 - + Bottom True True @@ -2985,40 +2820,22 @@ center center True - True - - False - True - 1 - - + Top True True False center center - bottom - True preview_title_position_bottom_button - - False - True - 2 - - - False - True - 1 - @@ -3032,8 +2849,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3045,11 +2862,11 @@ Display window preview headers True 0 + + 0 + 0 + - - 0 - 0 - @@ -3057,11 +2874,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -3081,11 +2898,6 @@ end center - - False - True - 1 - @@ -3098,17 +2910,12 @@ True 6 - - False - True - 2 - + + 0 + 1 + - - 1 - 0 - @@ -3118,11 +2925,11 @@ Icon size (px) of the window preview True 0 + + 1 + 0 + - - 0 - 0 - @@ -3136,19 +2943,19 @@ + + 1 + 0 + 2 + - - 0 - 1 - 2 - + + 1 + 0 + 2 + - - 0 - 1 - 2 - @@ -3166,11 +2973,11 @@ preview_title_font_size_adjustment True 6 + + 0 + 1 + - - 1 - 0 - @@ -3180,18 +2987,18 @@ Font size (px) of the preview titles True 0 + + 0 + 0 + - - 0 - 0 - + + 2 + 0 + 2 + - - 0 - 2 - 2 - @@ -3206,11 +3013,11 @@ True Font weight of the preview titles 0 + + 0 + 0 + - - 0 - 0 - @@ -3225,18 +3032,18 @@ bold bolder + + 0 + 1 + - - 1 - 0 - + + 3 + 0 + 2 + - - 0 - 3 - 2 - @@ -3252,11 +3059,11 @@ Font color of the preview titles True 0 + + 0 + 0 + - - 0 - 0 - @@ -3264,18 +3071,18 @@ True True end + + 0 + 1 + - - 1 - 0 - + + 4 + 0 + 2 + - - 0 - 4 - 2 - @@ -3290,8 +3097,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3303,11 +3110,11 @@ Enable window peeking True 0 + + 0 + 0 + - - 0 - 0 - @@ -3315,11 +3122,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -3333,12 +3140,12 @@ + + 1 + 0 + 2 + - - 0 - 1 - 2 - @@ -3353,11 +3160,11 @@ True Enter window peeking mode timeout (ms) 0 + + 0 + 0 + - - 0 - 0 - @@ -3369,11 +3176,11 @@ enter_peek_mode_timeout_adjustment True 50 + + 0 + 1 + - - 1 - 0 - @@ -3387,19 +3194,19 @@ + + 1 + 0 + 2 + - - 0 - 1 - 2 - + + 2 + 0 + 2 + - - 0 - 2 - 2 - @@ -3414,11 +3221,11 @@ True Window peeking mode opacity 0 + + 0 + 0 + - - 0 - 0 - @@ -3429,11 +3236,11 @@ 0 peek_mode_opacity_adjustment True + + 0 + 1 + - - 1 - 0 - @@ -3447,19 +3254,19 @@ + + 1 + 0 + 2 + - - 0 - 1 - 2 - + + 3 + 0 + 2 + - - 0 - 3 - 2 - @@ -3479,6 +3286,8 @@ True False vertical + 1 + 1 True @@ -3492,8 +3301,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3508,12 +3317,12 @@ scroll_icon_options_delay_adjustment True 50 + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -3523,11 +3332,11 @@ Delay between mouse scroll events (ms) True 0 + + 0 + 0 + - - 0 - 0 - @@ -3540,22 +3349,17 @@ + + 1 + 0 + - - 0 - 1 - - - False - True - 0 - @@ -3567,6 +3371,8 @@ True False vertical + 1 + 1 True @@ -3580,8 +3386,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3596,12 +3402,12 @@ scroll_panel_options_delay_adjustment True 50 + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -3611,11 +3417,11 @@ Delay between mouse scroll events (ms) True 0 + + 0 + 0 + - - 0 - 0 - @@ -3628,11 +3434,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -3646,8 +3452,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3659,11 +3465,11 @@ Show popup when changing workspace True 0 + + 0 + 0 + - - 0 - 0 - @@ -3676,11 +3482,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -3688,23 +3494,18 @@ True end center + + 0 + 1 + 2 + - - 1 - 0 - 2 - - - False - True - 0 - @@ -3715,17 +3516,18 @@ True False - 12 - 12 + 12 + 12 12 12 vertical + 1 + 1 True False 0 - in True @@ -3741,8 +3543,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3755,12 +3557,12 @@ Super Super + Alt + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -3769,11 +3571,11 @@ True Hotkeys prefix 0 + + 0 + 0 + - - 0 - 0 - @@ -3786,11 +3588,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -3806,8 +3608,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3821,12 +3623,12 @@ Show temporarily Always visible + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -3835,11 +3637,11 @@ True Number overlay 0 + + 0 + 0 + - - 0 - 0 - @@ -3852,11 +3654,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -3870,8 +3672,8 @@ True False - 12 - 12 + 12 + 12 12 12 True @@ -3883,11 +3685,11 @@ True end shortcut_time_adjustment + + 0 + 1 + - - 1 - 0 - @@ -3896,11 +3698,11 @@ True Hide timeout (ms) 0 + + 0 + 0 + - - 0 - 0 - @@ -3914,8 +3716,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3925,12 +3727,12 @@ center 12 e.g. <Super>q + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -3939,11 +3741,11 @@ True Shortcut to show the overlay for 2 seconds 0 + + 0 + 0 + - - 0 - 0 - @@ -3956,11 +3758,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -3974,8 +3776,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -3987,11 +3789,11 @@ Show window previews on hotkey True 0 + + 0 + 0 + - - 0 - 0 - @@ -3999,12 +3801,12 @@ True end center + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -4018,11 +3820,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -4036,8 +3838,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -4052,12 +3854,12 @@ Numeric keypad Both + + 0 + 1 + 2 + - - 1 - 0 - 2 - @@ -4066,11 +3868,11 @@ True Hotkeys are activated with 0 + + 0 + 0 + - - 0 - 0 - @@ -4083,11 +3885,11 @@ + + 1 + 0 + - - 0 - 1 - @@ -4096,11 +3898,6 @@ - - False - True - 0 - @@ -4112,6 +3909,8 @@ True False vertical + 1 + 1 True @@ -4120,8 +3919,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -4134,11 +3933,11 @@ Current Show Applications icon True 0 + + 0 + 0 + - - 0 - 0 - @@ -4147,26 +3946,23 @@ True False end - gtk-missing-image + gtk-missing-image 32 + + 0 + 1 + - - 1 - 0 - - + 140 True - False - False - Select a Show Applications image icon + + 1 + 1 + - - 1 - 1 - @@ -4176,20 +3972,15 @@ Custom Show Applications image icon True 0 + + 1 + 0 + - - 0 - 1 - - - False - True - 0 - @@ -4199,8 +3990,8 @@ True False - 12 - 12 + 12 + 12 12 12 True @@ -4213,11 +4004,11 @@ end 0 show_applications_side_padding_adjustment + + 0 + 1 + - - 1 - 0 - @@ -4226,20 +4017,15 @@ True Show Applications icon side padding (px) 0 + + 0 + 0 + - - 0 - 0 - - - False - True - 1 - @@ -4249,8 +4035,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -4260,11 +4046,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -4274,68 +4060,15 @@ Override escape key and return to desktop True 0 + + 0 + 0 + - - 0 - 0 - - - False - True - 2 - - - - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Animate <i>Show Applications</i>. - True - 0 - - - 0 - 0 - - - - - True - True - end - center - - - 1 - 0 - - - - - - - False - True - 3 - @@ -4363,6 +4096,8 @@ True False none + 1 + 1 True @@ -4371,8 +4106,8 @@ True False - 12 - 12 + 12 + 12 12 12 4 @@ -4383,11 +4118,11 @@ False True 0 + + 0 + 0 + - - 0 - 0 - @@ -4399,11 +4134,11 @@ show_showdesktop_width_adjustment True 1 + + 0 + 1 + - - 1 - 0 - @@ -4412,11 +4147,11 @@ True Override Show Desktop line color 0 + + 1 + 0 + - - 0 - 1 - @@ -4432,11 +4167,6 @@ end True - - False - True - 0 - @@ -4445,17 +4175,12 @@ end center - - False - True - 1 - + + 1 + 1 + - - 1 - 1 - @@ -4469,8 +4194,8 @@ True False - 12 - 12 + 12 + 12 12 12 12 @@ -4483,11 +4208,11 @@ Reveal the desktop when hovering the Show Desktop button True 0 + + 0 + 0 + - - 0 - 0 - @@ -4495,11 +4220,11 @@ True end center + + 0 + 1 + - - 1 - 0 - @@ -4514,11 +4239,11 @@ Delay before revealing the desktop (ms) True 0 + + 0 + 0 + - - 0 - 0 - @@ -4530,11 +4255,11 @@ show_showdesktop_delay_adjustment True 1 + + 0 + 1 + - - 1 - 0 - @@ -4544,11 +4269,11 @@ Fade duration (ms) True 0 + + 1 + 0 + - - 0 - 1 - @@ -4560,29 +4285,24 @@ show_showdesktop_time_adjustment True 1 + + 1 + 1 + - - 1 - 1 - + + 1 + 0 + 2 + - - 0 - 1 - 2 - - - False - True - 2 - @@ -4625,6 +4345,8 @@ True False vertical + 1 + 1 True @@ -4638,8 +4360,8 @@ True False - 12 - 12 + 12 + 12 12 12 4 @@ -4650,11 +4372,11 @@ True The panel background opacity is affected by 0 + + 0 + 0 + - - 0 - 0 - @@ -4666,11 +4388,11 @@ Focused windows Maximized windows + + 0 + 1 + - - 1 - 0 - @@ -4684,8 +4406,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -4699,11 +4421,11 @@ trans_distance_adjustment True 50 + + 0 + 1 + - - 1 - 0 - @@ -4713,11 +4435,11 @@ Change opacity when a window gets closer than (px) True 0 + + 0 + 0 + - - 0 - 0 - @@ -4731,24 +4453,19 @@ True False - 12 - 12 + 12 + 12 12 12 True False - 12 + 12 Change opacity to (%) True 0 - - False - True - 0 - @@ -4758,12 +4475,6 @@ 0 trans_opacity_min_adjustment - - False - False - end - 1 - @@ -4777,8 +4488,8 @@ True False - 12 - 12 + 12 + 12 12 12 32 @@ -4792,11 +4503,11 @@ trans_anim_time_adjustment True 50 + + 0 + 1 + - - 1 - 0 - @@ -4806,22 +4517,17 @@ Opacity change animation duration (ms) True 0 + + 0 + 0 + - - 0 - 0 - - - False - True - 0 - @@ -4840,570 +4546,507 @@ True True - - True - False - 24 - 24 - 24 - 24 - vertical - 24 + - + True False - 0 - in + 24 + 24 + 24 + 24 + vertical + 24 - + True False - none + 0 - + True - True + False + none - + True - False - 12 - 12 - 12 - 12 - 32 - 32 + True - + True False - True - Display the main panel on - 0 - - - 0 - 0 - - - - - True - False - center - - - 1 - 0 - - - - - - - - - True - True - - - True - False - 12 - 12 - 12 - 12 - 6 - 32 - - - True - False - True - Display panels on all monitors - True - 0 - - - 0 - 0 - - - - - True - True - end - center - - - 1 - 0 - - - - - - - - - - - - - - False - True - 0 - - - - - True - False - 0 - in - - - True - False - none - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Panel Intellihide - True - 0 - - - 0 - 0 - - - - - True - False - 6 + 12 + 12 + 12 + 12 + 32 + 32 - + True - True - True - center - center - 0.46000000834465027 - - - True - False - emblem-system-symbolic - - - + False + True + Display the main panel on + 0 + + 0 + 0 + - - False - True - 0 - - + + True + False + center + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 6 + 32 + + + True + False + True + Display panels on all monitors + True + 0 + + 0 + 0 + + + + + True True end center + + 0 + 1 + - - False - True - 1 - - - 1 - 0 - 2 - - - - - True - False - True - Hide and reveal the panel according to preferences - True - 40 - 0 - - - - 0 - 1 - + + + - - - - - - False - True - 1 - - - - - True - False - 0 - in - + True False - vertical + 0 - + True False - 12 - 12 - 12 - 12 + none - - True - False - True - Order and positions on monitor - 0 - - - 0 - 0 - - - - - True - False - center - - - 1 - 0 - - - - - Apply changes to all monitors + + 100 True True - False - 12 - 4 - 4 - True - - - 0 - 1 - 2 - - - - - True - False - 6 - 0 - none - + True False - none + 12 + 12 + 12 + 12 + 32 - - 100 + True - True + False + True + Panel Intellihide + True + 0 + + 0 + 0 + + + + + + True + False + 6 - + True - False - 6 - 6 - 12 - 32 + True + True + center + center - - True - True - baseline - True - panel_size_adjustment - 0 - 0 - right - - - - - 1 - 1 - - - - + True False - Panel thickness -(default is 48) - 0 + emblem-system-symbolic - - 0 - 1 - + + + + + + True + True + end + center + + + + 0 + 1 + 2 + + + + + + True + False + True + Hide and reveal the panel according to preferences + True + 40 + 0 + + + 1 + 0 + + + + + + + + + + + + + + + + + True + False + 0 + + + True + False + vertical + + + True + False + 12 + 12 + 12 + 12 + + + True + False + True + Order and positions on monitor + 0 + + 0 + 0 + + + + + + True + False + center + + 0 + 1 + + + + + + Apply changes to all monitors + True + True + False + 12 + 4 + 4 + + 1 + 0 + 2 + + + + + + True + False + 6 + 0 + + + True + False + none + + + 100 + True + True - + True False - Panel length (%) -(default is 100) - 0 - - - 0 - 2 - - - - - True - True - baseline - True - panel_length_adjustment - 0 - 0 - right - - - 1 - 2 - - - - - True - False - center - - Start - Middle - End - - - - 1 - 3 - - - - - True - False - Anchor - 0 - - - 0 - 3 - - - - - True - False - True - Panel screen position - 0 - - - 0 - 0 - - - - - True - False - 32 + 6 + 6 + 12 + 32 - - Bottom + True True - False - center - center - 0 - True - True - + baseline + True + panel_size_adjustment + 0 + 0 + right + + + + 1 + 1 + - - False - True - 0 - - - Top + True - True - False - center - center + False + Panel thickness (default is 48) 0 - bottom - True - position_bottom_button - + + 1 + 0 + - - False - True - 1 - - - Left + True - True - False - center - center + False + Panel length (%) (default is 100) 0 - bottom - True - position_bottom_button - + + 2 + 0 + - - False - True - 2 - - - Right + True True - False - center - center - 0 - bottom - True - position_bottom_button - + baseline + True + panel_length_adjustment + 0 + 0 + right + + 2 + 1 + + + + + + True + False + center + + Start + Middle + End + + + 3 + 1 + + + + + + True + False + Anchor + 0 + + 3 + 0 + + + + + + True + False + True + Panel screen position + 0 + + 0 + 0 + + + + + + True + False + 32 + + + Bottom + True + True + False + center + center + + True + + + + + + Top + True + True + False + center + center + + position_bottom_button + + + + + + Left + True + True + False + center + center + + position_bottom_button + + + + + + Right + True + True + False + center + center + + position_bottom_button + + + + 0 + 1 + - - False - True - 3 - - - 1 - 0 - + + 1 + 0 + + + + + + 2 + 0 + 2 + - - - - - 0 - 2 - 2 - + + + + True + False + 6 + none + - - False - True - 0 - - - - True - False - 6 - none - - - False - True - 1 - + + - - - - - False - True - 2 - @@ -5413,324 +5056,313 @@ False Position - - False - - - True - False - 24 - 24 - 24 - 24 - vertical - 24 + - + True False - 0 - in + 24 + 24 + 24 + 24 + vertical + 24 - + True False - none + 0 - - 100 + True - True + False + none - + + 100 True - False - 12 - 12 - 6 - 6 - 12 - 32 + True - + True False - App Icon Margin -(default is 8) - 0 + 12 + 12 + 6 + 6 + 12 + 32 + + + True + False + App Icon Margin (default is 8) + 0 + + 0 + 0 + + + + + + True + True + baseline + True + appicon_margin_adjustment + 0 + 0 + right + + + 0 + 1 + + + - - 0 - 0 - + + + + + 100 + True + True - + True - True - baseline - True - appicon_margin_adjustment - 0 - 0 - right - - + False + 12 + 12 + 6 + 6 + 32 + + + True + False + App Icon Padding (default is 4) + 0 + + 0 + 0 + + + + + + True + True + baseline + True + appicon_padding_adjustment + 0 + 0 + right + + + 0 + 1 + + + - - 1 - 0 - - - - 100 - True - True - - - True - False - 12 - 12 - 6 - 6 - 32 - - - True - False - App Icon Padding -(default is 4) - 0 - - - 0 - 0 - - - - - True - True - baseline - True - appicon_padding_adjustment - 0 - 0 - right - - - - - 1 - 0 - - - - - + + - - - - - - False - True - 0 - - - - - True - False - 0 - in - + True False - none + 0 - - 100 + True - True + False + none - + + 100 True - False - 12 - 12 - 12 - 12 - 32 + True - - True - False - True - Running indicator position - 0 - - - False - True - 0 - - - - + True False + 12 + 12 + 12 + 12 32 - - Bottom + True - True - False - center - True - True - + False + True + Running indicator position + 0 - - False - True - 0 - - - Top + True - True - False - center - bottom - True - dots_bottom_button - + False + 32 + + + Bottom + True + True + False + center + True + + + + + + Top + True + True + False + center + dots_bottom_button + + + + + + Left + True + True + False + center + dots_bottom_button + + + + + + Right + True + True + False + center + dots_bottom_button + + + - - False - True - 1 - - - - - Left - True - True - False - center - True - dots_bottom_button - - - - False - True - 2 - - - - - Right - True - True - False - center - True - dots_bottom_button - - - - False - True - 3 - - - False - True - 1 - - - - - - 100 - True - True - + + 100 True - False - 12 - 12 - 12 - 12 - 32 + True - + True False - True - Running indicator style (Focused app) - 0 - - - False - True - 0 - - - - - True - False - 6 + 12 + 12 + 12 + 12 + 32 - + True - True - True - center - - - True - False - emblem-system-symbolic - - - + False + True + Running indicator style (Focused app) + 0 - - False - True - 0 - - + + True + False + 6 + + + True + True + True + center + + + True + False + emblem-system-symbolic + + + + + + + + True + False + end + center + + Dots + Squares + Dashes + Segmented + Solid + Ciliora + Metro + + + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Running indicator style (Unfocused apps) + 0 + + + + True False end @@ -5745,616 +5377,474 @@ Metro - - False - True - 1 - - - False - True - 1 - - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Running indicator style (Unfocused apps) - 0 - - - False - True - 0 - - - - - True - False - end - center - - Dots - Squares - Dashes - Segmented - Solid - Ciliora - Metro - - - - False - True - 1 - - - - - + + - - - - - - False - True - 1 - - - - - True - False - 0 - in - + True False - none + 0 - + True - True + False + none - + True - False - 12 - 12 - 12 - 12 - 32 + True - + True False - True - Override panel theme background color - True - 0 - - - 0 - 0 - - - - - True - False - 6 - - - True - True - True - end - - - False - True - 0 - - - - - True - True - end - center - - - False - True - 1 - - - - - 1 - 0 - - - - - - - - - True - True - - - True - False - vertical - - - True - False - 12 - 12 + 12 + 12 12 12 32 - + True False True - Override panel theme background opacity + Override panel theme background color True 0 + + 0 + 0 + - - 0 - 0 - - - True - True - end - center - - - 1 - 0 - - - - + True False - 12 - 12 - 6 + 6 - + True - False - True - Panel background opacity (%) - True - 0 + True + True + end - - 0 - 0 - - + True True end center - 0 - trans_opacity_adjustment - - 1 - 0 - + + 0 + 1 + + + + + + + + + + True + True + + + True + False + vertical + + + True + False + 12 + 12 + 12 + 12 + 32 - + True False True - vertical - - - True - False - True - Dynamic background opacity - True - 0 - - - False - True - 0 - - - - - True - False - True - Change opacity when a window gets close to the panel - True - 40 - 0 - - - - False - True - 1 - - + Override panel theme background opacity + True + 0 + + 0 + 0 + - - 0 - 1 - - + True - False + True end center - 6 + + 0 + 1 + + + + + + True + False + 12 + 12 + 6 - + True - True - True - center - center - 0.46000000834465027 - - - True - False - emblem-system-symbolic - - - + False + True + Panel background opacity (%) + True + 0 + + 0 + 0 + - - False - True - 0 - - + True True end center + 0 + trans_opacity_adjustment + + 0 + 1 + - - False - True - 1 - + + + True + False + True + vertical + + + True + False + True + Dynamic background opacity + True + 0 + + + + + True + False + True + Change opacity when a window gets close to the panel + True + 40 + 0 + + + + + 1 + 0 + + + + + + True + False + end + center + 6 + + + True + True + True + center + center + + + True + False + emblem-system-symbolic + + + + + + + + True + True + end + center + + + + 1 + 1 + + + + + 1 + 0 + 2 + - - 1 - 1 - - - 0 - 1 - 2 - - - False - True - 0 - - - - - - True - True - + True - False - 12 - 12 - 12 - 12 - 32 + True - + True False - True - Override panel theme gradient - True - 0 - - - 0 - 0 - - - - - True - True - end - center - - - 1 - 0 - - - - - True - False - 12 + 12 + 12 12 - 6 + 12 + 32 - + True False True - Gradient top color and opacity (%) + Override panel theme gradient + True 0 + + 0 + 0 + - - 0 - 0 - - - True - False - True - Gradient bottom color and opacity (%) - 0 - - - 0 - 1 - - - - - True - False - 6 - - - True - True - True - - - False - True - 0 - - - - - True - True - end - center - 0 - trans_gradient_opacity1_adjustment - - - False - True - 1 - - - - - 1 - 0 - - - - - True - False - 6 - - - True - True - True - - - False - True - 0 - - - - - True - True - end - center - 0 - trans_gradient_opacity2_adjustment - - - False - True - 1 - - - - - 1 - 1 - - - - - 0 - 1 - 2 - - - - - - - - - - - - - - False - True - 2 - - - - - True - False - 0 - in - - - True - False - none - - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Animate hovering app icons - 0 - - - 0 - 2 - - - - - True - False - 6 - - - True - True - True - center - - - True - False - emblem-system-symbolic - - - - - - False - True - 0 - - - - + True True end center + + 0 + 1 + + + + + + True + False + 12 + 12 + 6 + + + True + False + True + Gradient top color and opacity (%) + 0 + + 0 + 0 + + + + + + True + False + True + Gradient bottom color and opacity (%) + 0 + + 1 + 0 + + + + + + True + False + 6 + + + True + True + True + + + + + True + True + end + center + 0 + trans_gradient_opacity1_adjustment + + + + 0 + 1 + + + + + + True + False + 6 + + + True + True + True + + + + + True + True + end + center + 0 + trans_gradient_opacity2_adjustment + + + + 1 + 1 + + + + + 1 + 0 + 2 + + + + + + + + + + + + + + + + + True + False + 0 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Animate hovering app icons + 0 + + 2 + 0 + + + + + + True + False + 6 + + + True + True + True + center + + + True + False + emblem-system-symbolic + + + + + + + + True + True + end + center + + + + 2 + 1 + - - False - True - 1 - - - 1 - 2 - @@ -6365,9 +5855,6 @@ - - 1 - @@ -6375,510 +5862,524 @@ False Style - - 1 - False - - - True - False - 24 - 24 - 24 - 24 - vertical - 24 + - + True False - 0 - in + 24 + 24 + 24 + 24 + vertical + 24 - + True False - none + 0 - + True - True + False + none - + True - False - 12 - 12 - 12 - 12 - 6 - 32 + True - - True - True - end - center - - - 1 - 0 - - - - + True False - True - Show favorite applications - 0 - - - 0 - 0 - - - - - True - False - True - Show running applications - 0 - - - 0 - 2 - - - - - True - True - end - center - - - 1 - 2 - - - - - True - True - end - center - - - 1 - 1 - - - - - True - False - True - Show favorite applications on secondary panels - True - 0 - - - 0 - 1 - - - - - - - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - True - end - center - - - 1 - 0 - 2 - - - - - True - False - True - Show <i>AppMenu</i> button - True - 0 - - - 0 - 0 - - - - - True - False - True - Top Bar > Show App Menu must be enabled in Tweak Tool - True - True - 0 - - - - 0 - 1 - - - - - - - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 4 - 32 - - - True - False - 6 + 12 + 12 + 12 + 12 + 6 + 32 - - True - True - True - center - center - 0.46000000834465027 - - - True - False - emblem-system-symbolic - - - - - - False - True - 0 - - - - + True True end center + + 0 + 1 + - - False - True - 1 - - - - 1 - 0 - - - - - True - False - True - Show window previews on hover - True - 0 - - - 0 - 0 - - - - - True - True - end - center - - - 1 - 1 - - - - - True - False - True - Show tooltip on hover - True - 0 - - - 0 - 1 - - - - - - - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 6 - 32 - - - True - True - end - center - - - 1 - 0 - - - - - True - False - True - Isolate Workspaces - True - 0 - - - 0 - 0 - - - - - True - True - end - center - - - 1 - 1 - - - - - True - False - True - Isolate monitors - True - 0 - - - 0 - 1 - - - - - - - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 6 - 32 - - - True - True - end - center - - - 1 - 0 - - - - - True - False - True - Click empty space to close overview - True - 0 - - - 0 - 0 - - - - - - - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Ungroup applications - True - 0 - - - 0 - 0 - - - - - True - False - 6 - + True - True - True - center - center - 0.46000000834465027 - - - True - False - emblem-system-symbolic - - - + False + True + Show favorite applications + 0 + + 0 + 0 + - - False - True - 0 - - + + True + False + True + Show running applications + 0 + + 2 + 0 + + + + + True True end center + + 2 + 1 + + + + + + True + True + end + center + + 1 + 1 + + + + + + True + False + True + Show favorite applications on secondary panels + True + 0 + + 1 + 0 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + center + + 0 + 1 + 2 + + + + + + True + False + True + Show <i>AppMenu</i> button + True + 0 + + 0 + 0 + + + + + + True + False + True + Top Bar > Show App Menu must be enabled in Tweak Tool + True + True + 0 + + + 1 + 0 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 4 + 32 + + + True + False + 6 + + + True + True + True + center + center + + + True + False + emblem-system-symbolic + + + + + + + + True + True + end + center + + + + 0 + 1 + + + + + + True + False + True + Show window previews on hover + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 1 + 1 + + + + + + True + False + True + Show tooltip on hover + True + 0 + + 1 + 0 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 6 + 32 + + + True + True + end + center + + 0 + 1 + + + + + + True + False + True + Isolate Workspaces + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 1 + 1 + + + + + + True + False + True + Isolate monitors + True + 0 + + 1 + 0 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 6 + 32 + + + True + True + end + center + + 0 + 1 + + + + + + True + False + True + Click empty space to close overview + True + 0 + + 0 + 0 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 6 + 32 + + + True + True + end + center + + 0 + 1 + + + + + + True + False + True + Disable show overview on startup + True + 0 + + 0 + 0 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Ungroup applications + True + 0 + + 0 + 0 + + + + + + True + False + 6 + + + True + True + True + center + center + + + True + False + emblem-system-symbolic + + + + + + + + True + True + end + center + + + + 0 + 1 + - - False - True - 1 - - - 1 - 0 - + + + - - - - - False - True - 0 - - - 2 - @@ -6886,465 +6387,402 @@ False Behavior - - 2 - False - - - True - False - 24 - 24 - 24 - 24 - vertical - 24 + - - False - 0 - in - - - True - False - none - - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Behaviour when clicking on the icon of a running application. - True - 0 - - - - 0 - 1 - - - - - True - False - True - Click action - 0 - - - 0 - 0 - - - - - True - False - 6 - - - True - True - True - center - - - True - False - emblem-system-symbolic - - - - - - False - True - 0 - - - - - True - False - center - - Cycle windows + minimize - Cycle through windows - Toggle single / Preview multiple - Toggle single / Cycle multiple - Toggle windows - Raise windows - Launch new instance - - - - False - True - 1 - - - - - 1 - 0 - 2 - - - - - - - - - - - - - - False - True - 0 - - - - - False - 0 - in - - - True - False - 12 - 12 - 12 - 12 - 16 - 6 - - - True - False - vertical - - - True - False - True - Scroll panel action - 0 - - - False - True - 0 - - - - - True - False - True - Behavior when mouse scrolling over the panel. - True - 0 - - - - False - True - 1 - - - - - 0 - 0 - - - - - True - False - vertical - - - True - False - True - Scroll icon action - 0 - - - False - True - 0 - - - - - True - False - True - Behavior when mouse scrolling over an application icon. - True - 0 - - - - False - True - 1 - - - - - 0 - 1 - - - - - True - True - True - end - center - - - True - False - emblem-system-symbolic - - - - - - 1 - 0 - - - - - True - False - center - True - - Do nothing - Switch workspace - Cycle windows - Change volume - - - - 2 - 0 - - - - - True - False - center - True - - Do nothing - Cycle windows - Same as panel - - - - 2 - 1 - - - - - True - True - True - end - center - - - True - False - emblem-system-symbolic - - - - - - 1 - 1 - - - - - - - - - - False - True - 1 - - - - + True False - 0 - in + 24 + 24 + 24 + 24 + vertical + 24 - - True + False - none + 0 - + True - True + False + none - + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Behaviour when clicking on the icon of a running application. + True + 0 + + + 1 + 0 + + + + + + True + False + True + Click action + 0 + + 0 + 0 + + + + + + True + False + 6 + + + True + True + True + center + + + True + False + emblem-system-symbolic + + + + + + + + True + False + center + + Cycle windows + minimize + Cycle through windows + Toggle single / Preview multiple + Toggle windows + Raise windows + Launch new instance + + + + + 0 + 1 + 2 + + + + + + + + + + + + + + + + + False + 0 + + + True + False + 12 + 12 + 12 + 12 + 16 + 6 + + True False - 12 - 12 - 12 - 12 - 32 + vertical - + True False True - Enable Super+(0-9) as shortcuts to activate apps. It can also be used together with Shift and Ctrl. - True + Scroll panel action + 0 + + + + + True + False + True + Behavior when mouse scrolling over the panel. True 0 - - 0 - 1 - + + 0 + 0 + + + + + + True + False + vertical - + True False True - Use hotkeys to activate apps + Scroll icon action 0 - - 0 - 0 - - + True False - 6 + True + Behavior when mouse scrolling over an application icon. + True + 0 + + + + + 1 + 0 + + + + + + True + True + True + end + center + + + True + False + emblem-system-symbolic + + + + + 0 + 1 + + + + + + True + False + center + True + + Do nothing + Switch workspace + Cycle windows + Change volume + + + 0 + 2 + + + + + + True + False + center + True + + Do nothing + Cycle windows + Same as panel + + + 1 + 2 + + + + + + True + True + True + end + center + + + True + False + emblem-system-symbolic + + + + + 1 + 1 + + + + + + + + + + + + + True + False + 0 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 - + True - True - True - center - center - 0.46000000834465027 + False + True + Enable Super+(0-9) as shortcuts to activate apps. It can also be used together with Shift and Ctrl. + True + True + 0 + + + 1 + 0 + + + + + + True + False + True + Use hotkeys to activate apps + 0 + + 0 + 0 + + + + + + True + False + 6 - + True - False - emblem-system-symbolic + True + True + center + center + + + True + False + emblem-system-symbolic + + + - + + + True + True + end + center + + + + 0 + 1 + 2 + - - False - True - 0 - - - - - True - True - end - center - - - False - True - 1 - - - 1 - 0 - 2 - + + + - - - - - False - True - 3 - - - 3 - @@ -7352,547 +6790,226 @@ False Action - - 3 - False - - - True - False - 24 - 24 - 24 - 24 - vertical - 24 + - + True False - 0 - in + 24 + 24 + 24 + 24 + vertical + 24 - - True - True - none - - - 100 - True - True - - - True - False - 12 - 12 - 6 - 6 - 12 - 32 - - - True - False - Tray Font Size -(0 = theme default) - 0 - - - 0 - 0 - - - - - True - True - baseline - True - tray_size_adjustment - 0 - 0 - right - - - - - 1 - 0 - - - - - True - False - LeftBox Font Size -(0 = theme default) - 0 - - - 0 - 1 - - - - - True - True - baseline - True - leftbox_size_adjustment - 0 - 0 - right - - - - - 1 - 1 - - - - - - - - - - - - - - False - True - 0 - - - - - True - False - 0 - in - - + True False - none + 0 - - 100 + True True + none - + + 100 True - False - 12 - 12 - 12 - 12 - 12 - 32 + True - + True False - Tray Item Padding -(-1 = theme default) - 0 - - - 0 - 0 - - - - - True - True - baseline - True - tray_padding_adjustment - 0 - 0 - right - - - - - 1 - 0 - - - - - True - False - Status Icon Padding -(-1 = theme default) - 0 - - - 0 - 1 - - - - - True - True - baseline - True - statusicon_padding_adjustment - 0 - 0 - right - - - - - 1 - 1 - - - - - True - False - LeftBox Padding -(-1 = theme default) - 0 - - - 0 - 2 - - - - - True - True - baseline - True - leftbox_padding_adjustment - 0 - 0 - right - - - - - 1 - 2 - - - - - - - - - - - False - True - 1 - - - - - True - False - 0 - in - - - True - False - none - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 6 - 32 - - - True - False - True - Animate switching applications - 0 - - - 0 - 0 - - - - - True - True - end - center - - - 1 - 0 - - - - - True - True - end - center - - - 1 - 1 - - - - - True - False - True - Animate launching new windows - 0 - - - 0 - 1 - - - - - - - - - - - False - True - 2 - - - - - True - False - 0 - in - - - True - False - none - - - True - True - - - True - False - 12 - 12 - 12 - 12 - 6 - 32 - - - True - False - True - Keep original gnome-shell dash (overview) - 0 - - - 0 - 0 - - - - - True - True - end - center - - - 1 - 0 - - - - - True - False - True - Force Activities hot corner on primary monitor - 0 - - - 0 - 3 - - - - - True - True - end - center - - - 1 - 3 - - - - - True - False - True - Activate panel menu buttons (e.g. date menu) on click only - 0 - - - 0 - 2 - - - - - True - True - end - center - - - 1 - 2 - - - - - True - False - True - Keep original gnome-shell top panel - 0 - - - 0 - 1 - - - - - True - True - end - center - - - 1 - 1 - - - - - - - - - - - - - - False - True - 3 - - - - - True - False - 0 - in - - - True - False - none - - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 20 - 32 - - - True - False - True - App icon secondary (right-click) menu - 0 - - - 0 - 0 - - - - - True - True - True - center + 12 + 12 + 6 + 6 + 12 + 32 - + True False - emblem-system-symbolic + Tray Font Size (0 = theme default) + 0 + + 0 + 0 + + + + + + True + True + baseline + True + tray_size_adjustment + 0 + 0 + right + + + 0 + 1 + + + + + + True + False + LeftBox Font Size (0 = theme default) + 0 + + 1 + 0 + + + + + + True + True + baseline + True + leftbox_size_adjustment + 0 + 0 + right + + + 1 + 1 + + + + + + + + + + + + + + + + + True + False + 0 + + + True + False + none + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + Tray Item Padding (-1 = theme default) + 0 + + 0 + 0 + + + + + + True + True + baseline + True + tray_padding_adjustment + 0 + 0 + right + + + 0 + 1 + + + + + + True + False + Status Icon Padding (-1 = theme default) + 0 + + 1 + 0 + + + + + + True + True + baseline + True + statusicon_padding_adjustment + 0 + 0 + right + + + 1 + 1 + + + + + + True + False + LeftBox Padding (-1 = theme default) + 0 + + 2 + 0 + + + + + + True + True + baseline + True + leftbox_padding_adjustment + 0 + 0 + right + + + 2 + 1 + - - - 1 - 0 - @@ -7900,34 +7017,307 @@ - - + + + True + False + 0 + + + True + False + none + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 6 + 32 + + + True + False + True + Animate switching applications + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + True + end + center + + 1 + 1 + + + + + + True + False + True + Animate launching new windows + 0 + + 1 + 0 + + + + + + + + + + + + + + True + False + 0 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 6 + 32 + + + True + False + True + Keep original gnome-shell dash (overview) + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + True + Force Activities hot corner on primary monitor + 0 + + 3 + 0 + + + + + + True + True + end + center + + 3 + 1 + + + + + + True + False + True + Activate panel menu buttons (e.g. date menu) on click only + 0 + + 2 + 0 + + + + + + True + True + end + center + + 2 + 1 + + + + + + True + False + True + Keep original gnome-shell top panel + 0 + + 1 + 0 + + + + + + True + True + end + center + + 1 + 1 + + + + + + + + + + + + + + + + + True + False + 0 + + + True + False + none + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 20 + 32 + + + True + False + True + App icon secondary (right-click) menu + 0 + + 0 + 0 + + + + + + True + True + True + center + + + True + False + emblem-system-symbolic + + + + + 0 + 1 + + + + + + + + + + + + + + + + + Advanced Options + False + True + True + start + - - False - True - 4 - - - - - Advanced Options - True - True - True - start - - - False - True - 5 - - - 4 - @@ -7936,220 +7326,173 @@ center Fine-Tune - - 4 - False - - - False - 24 - 24 - 24 - 24 - True - True - vertical - 5 + - True False + 24 + 24 + 24 + 24 + True + True vertical + 5 - + True False - <b>Dash-to-Panel</b> - True - - - False - True - 0 - - - - - True - False - center + vertical - + True False - end - version: + <b>Dash-to-Panel</b> + True - - False - True - 0 - - + True False - start - ... - - - False - True - 1 - - - - - False - True - 1 - - - - - GitHub - True - True - True - - center - none - https://github.com/jderose9/dash-to-panel - - - False - True - 2 - - - - - False - True - 0 - - - - - False - 20 - 0 - in - - - True - False - none - - - True - True + center - + True False - 12 - 12 - 12 - 12 - 6 - 32 + end + version: + + + + + True + False + start + ... + + + + + + + GitHub + True + True + True + center + https://github.com/jderose9/dash-to-panel + + + + + + + False + 20 + 0 + + + True + False + none + + + True + True - + True False + 12 + 12 + 12 12 - True - Use the buttons below to create a settings file from your current preferences that can be imported on a different machine. - True - 0 - + 6 + 32 + + + True + False + 12 + True + Use the buttons below to create a settings file from your current preferences that can be imported on a different machine. + True + 0 + + + 1 + 0 + 2 + + + + + + True + False + start + Export and import settings + + 0 + 0 + 2 + + + + + + Export to file + True + True + True + + 2 + 0 + + + + + + Import from file + True + True + True + + 2 + 1 + + + - - 0 - 1 - 2 - - - - - True - False - start - Export and import settings - - - 0 - 0 - 2 - - - - - Export to file - True - True - True - - - 0 - 2 - - - - - Import from file - True - True - True - - - 1 - 2 - + + + - - + + + True + True + end + <span size="small">This program comes with ABSOLUTELY NO WARRANTY. See the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, version 2 or later</a> for details.</span> + True + center + True + - - False - True - 1 - - - - - True - True - end - <span size="small">This program comes with ABSOLUTELY NO WARRANTY. -See the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, version 2 or later</a> for details.</span> - True - center - True - - - True - True - 6 - - - 5 - @@ -8157,10 +7500,6 @@ See the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">G False About - - 5 - False - diff --git a/extension.js b/extension.js index 8ab108f..30a3a4b 100644 --- a/extension.js +++ b/extension.js @@ -38,12 +38,13 @@ const Utils = Me.imports.utils; const UBUNTU_DOCK_UUID = 'ubuntu-dock@ubuntu.com'; let panelManager; -let oldDash; let extensionChangedHandler; let disabledUbuntuDock; let extensionSystem = (Main.extensionManager || imports.ui.extensionSystem); function init() { + this._realHasOverview = Main.sessionMode.hasOverview; + Convenience.initTranslations(Utils.TRANSLATION_DOMAIN); //create an object that persists until gnome-shell is restarted, even if the extension is disabled @@ -91,6 +92,13 @@ function _enable() { Me.settings = Convenience.getSettings('org.gnome.shell.extensions.dash-to-panel'); Me.desktopSettings = Convenience.getSettings('org.gnome.desktop.interface'); + if (Me.settings.get_boolean('hide-overview-on-startup') && Main.layoutManager._startingUp) { + Main.sessionMode.hasOverview = false; + Main.layoutManager.connect('startup-complete', () => { + Main.sessionMode.hasOverview = this._realHasOverview + }); + } + panelManager = new PanelManager.dtpPanelManager(); panelManager.enable(); @@ -107,21 +115,14 @@ function _enable() { }), Shell.ActionMode.NORMAL | Shell.ActionMode.POPUP ); - - // Pretend I'm the dash: meant to make appgrd swarm animation come from the - // right position of the appShowButton. - oldDash = Main.overview._dash; - Main.overview._dash = panelManager.primaryPanel.taskbar; } function disable(reset) { panelManager.disable(); - Main.overview._dash = oldDash; Me.settings.run_dispose(); Me.desktopSettings.run_dispose(); delete Me.settings; - oldDash = null; panelManager = null; Utils.removeKeybinding('open-application-menu'); @@ -141,4 +142,6 @@ function disable(reset) { (extensionSystem._callExtensionEnable || extensionSystem.enableExtension).call(extensionSystem, UBUNTU_DOCK_UUID); } } + + Main.sessionMode.hasOverview = this._realHasOverview; } \ No newline at end of file diff --git a/metadata.json b/metadata.json index 801bcc8..317b2a5 100644 --- a/metadata.json +++ b/metadata.json @@ -3,7 +3,7 @@ "uuid": "dash-to-panel@jderose9.github.com", "name": "Dash to Panel", "description": "An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.\n\nFor a more traditional experience, you may also want to use Tweak Tool to enable Windows > Titlebar Buttons > Minimize & Maximize.\n\nFor the best support, please report any issues on Github. Dash-to-panel is developed and maintained by @jderose9 and @charlesg99.", -"shell-version": [ "3.18", "3.20", "3.22", "3.24", "3.26", "3.28", "3.30", "3.32", "3.34", "3.36", "3.38" ], +"shell-version": [ "40" ], "url": "https://github.com/jderose9/dash-to-panel", "gettext-domain": "dash-to-panel", "version": 9999 diff --git a/overview.js b/overview.js index ac66c1d..d0cdd6f 100644 --- a/overview.js +++ b/overview.js @@ -33,7 +33,6 @@ const Gdk = imports.gi.Gdk; const Gio = imports.gi.Gio; const Mainloop = imports.mainloop; const IconGrid = imports.ui.iconGrid; -const ViewSelector = imports.ui.viewSelector; const Meta = imports.gi.Meta; @@ -421,7 +420,7 @@ var dtpOverview = Utils.defineClass({ if (this._clickToExitEnabled) return; - let views = Utils.getAppDisplayViews(); + let view = imports.ui.appDisplay; this._oldOverviewReactive = Main.overview._overview.reactive Main.overview._overview.reactive = true; @@ -435,76 +434,10 @@ var dtpOverview = Utils.defineClass({ let [x, y] = global.get_pointer(); let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, x, y); - let activePage = Main.overview.viewSelector.getActivePage(); - if (activePage == ViewSelector.ViewPage.APPS) { - - if(pickedActor != Main.overview._overview - && (views.length > 1 && pickedActor != Main.overview.viewSelector.appDisplay._controls.get_parent()) - && pickedActor != (views[0].view.actor || views[0].view) - && (views.length > 1 && pickedActor != views[1].view._scrollView) - && (views.length > 1 && pickedActor != views[1].view._grid)) { - return Clutter.EVENT_PROPAGATE; - } - - if(Me.settings.get_boolean('animate-show-apps')) { - let view = Utils.find(views, v => v.view.actor.visible).view; - view.animate(IconGrid.AnimationDirection.OUT, Lang.bind(this, function() { - Main.overview.viewSelector._appsPage.hide(); - Main.overview.hide(); - })); - } else { - Main.overview.hide(); - } - } else if (activePage == ViewSelector.ViewPage.WINDOWS) { - let overviewControls = Main.overview._overview._controls || Main.overview._controls; - - if(pickedActor == overviewControls._thumbnailsBox - || pickedActor == overviewControls.dash._container) { - return Clutter.EVENT_PROPAGATE; - } - - if (pickedActor instanceof Meta.BackgroundActor) { - Utils.find(overviewControls._thumbnailsBox._thumbnails, t => - pickedActor == t._bgManager.backgroundActor - ).activate(); - return Clutter.EVENT_STOP; - } - - Main.overview.toggle(); - } else { - Main.overview.toggle(); - } + Main.overview.toggle(); }); Main.overview._overview.add_action(this._clickAction); - [Main.overview.viewSelector._workspacesDisplay].concat(views.map(v => v.view)).forEach(v => { - if (v._swipeTracker) { - this._signalsHandler.addWithLabel('clickToExit', [ - v._swipeTracker, - 'begin', - Lang.bind(this, this._onSwipeBegin) - ],[ - v._swipeTracker, - 'end', - Lang.bind(this, this._onSwipeEnd) - ]); - } else if (v._panAction) { - this._signalsHandler.addWithLabel('clickToExit', [ - v._panAction, - 'gesture-begin', - Lang.bind(this, this._onSwipeBegin) - ],[ - v._panAction, - 'gesture-cancel', - Lang.bind(this, this._onSwipeEnd) - ],[ - v._panAction, - 'gesture-end', - Lang.bind(this, this._onSwipeEnd) - ]); - } - }); - this._clickToExitEnabled = true; }, diff --git a/panel.js b/panel.js index 321af0e..1aafc1a 100644 --- a/panel.js +++ b/panel.js @@ -53,7 +53,6 @@ const DND = imports.ui.dnd; const Shell = imports.gi.Shell; const PopupMenu = imports.ui.popupMenu; const IconGrid = imports.ui.iconGrid; -const ViewSelector = imports.ui.viewSelector; const DateMenu = imports.ui.dateMenu; const Volume = imports.ui.status.volume; const Progress = Me.imports.progress; @@ -74,20 +73,6 @@ const T5 = 'trackerFocusAppTimeout'; const T6 = 'scrollPanelDelayTimeout'; const T7 = 'waitPanelBoxAllocation'; -function setMenuArrow(arrowIcon, side) { - let parent = arrowIcon.get_parent(); - let iconNames = { - '0': 'pan-down-symbolic', //TOP - '1': 'pan-start-symbolic', //RIGHT - '2': 'pan-up-symbolic', //BOTTOM - '3': 'pan-end-symbolic' //LEFT - }; - - parent.remove_child(arrowIcon); - arrowIcon.set_icon_name(iconNames[side]); - parent.add_child(arrowIcon); -} - var dtpPanel = Utils.defineClass({ Name: 'DashToPanel-Panel', Extends: St.Widget, @@ -147,10 +132,6 @@ var dtpPanel = Utils.defineClass({ this._setPanelMenu('dateMenu', DateMenu.DateMenuButton, this.panel.actor); this._setPanelMenu('activities', Panel.ActivitiesButton, this.panel.actor); - if (this.statusArea.aggregateMenu) { - setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), position); - } - this.panel.add_child(this._leftBox); this.panel.add_child(this._centerBox); this.panel.add_child(this._rightBox); @@ -159,8 +140,6 @@ var dtpPanel = Utils.defineClass({ this.statusArea = Main.panel.statusArea; this.menuManager = Main.panel.menuManager; - setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), position); - panelBoxes.forEach(p => this[p] = Main.panel[p]); ['activities', 'aggregateMenu', 'dateMenu'].forEach(b => { @@ -231,14 +210,7 @@ var dtpPanel = Utils.defineClass({ Main.overview._overview.insert_child_at_index(this._myPanelGhost, 0); } else { let overviewControls = Main.overview._overview._controls || Main.overview._controls; - - if (this.geom.position == St.Side.BOTTOM) { - Main.overview._overview.add_actor(this._myPanelGhost); - } else if (this.geom.position == St.Side.LEFT) { - overviewControls._group.insert_child_at_index(this._myPanelGhost, 0); - } else { - overviewControls._group.add_actor(this._myPanelGhost); - } + Main.overview._overview.add_actor(this._myPanelGhost); } if (this.panel._leftCorner) { @@ -300,15 +272,6 @@ var dtpPanel = Utils.defineClass({ } }; - if (this.statusArea.appMenu) { - setMenuArrow(this.statusArea.appMenu._arrow, position); - this._leftBox.remove_child(this.statusArea.appMenu.container); - } - - if (this.statusArea.keyboard) { - setMenuArrow(this.statusArea.keyboard._hbox.get_last_child(), position); - } - this.dynamicTransparency = new Transparency.DynamicTransparency(this); this.taskbar = new Taskbar.taskbar(this); @@ -322,11 +285,6 @@ var dtpPanel = Utils.defineClass({ this.panel.actor.add_style_class_name('dashtopanelMainPanel ' + this.getOrientation()); - // Since Gnome 3.8 dragging an app without having opened the overview before cause the attemp to - //animate a null target since some variables are not initialized when the viewSelector is created - if(Main.overview.viewSelector._activePage == null) - Main.overview.viewSelector._activePage = Main.overview.viewSelector._workspacesPage; - this._setPanelGhostSize(); this._timeoutsHandler.add([T2, Me.settings.get_int('intellihide-enable-start-delay'), () => this.intellihide = new Intellihide.Intellihide(this)]); @@ -366,6 +324,7 @@ var dtpPanel = Utils.defineClass({ this.statusArea.activities.actor, 'captured-event', (actor, e) => { + // todo this is not being called right now, so the overview is not shown on the correct monitor if (e.type() == Clutter.EventType.BUTTON_PRESS || e.type() == Clutter.EventType.TOUCH_BEGIN) { //temporarily use as primary the monitor on which the activities btn was clicked this.panelManager.setFocusedMonitor(this.monitor, true); @@ -481,15 +440,6 @@ var dtpPanel = Utils.defineClass({ originalParent ? originalParent.insert_child_at_index(container, b[1]) : null; delete container._dtpOriginalParent; }); - - if (this.statusArea.appMenu) { - setMenuArrow(this.statusArea.appMenu._arrow, St.Side.TOP); - this._leftBox.add_child(this.statusArea.appMenu.container); - } - - if (this.statusArea.keyboard) { - setMenuArrow(this.statusArea.keyboard._hbox.get_last_child(), St.Side.TOP); - } } if (!this.panel._leftCorner.actor.mapped) { @@ -500,7 +450,6 @@ var dtpPanel = Utils.defineClass({ this._setShowDesktopButton(false); delete Utils.getIndicators(this.statusArea.aggregateMenu._volume)._dtpIgnoreScroll; - setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), St.Side.TOP); if (DateMenu.IndicatorPad) { Utils.hookVfunc(DateMenu.IndicatorPad.prototype, 'get_preferred_width', DateMenu.IndicatorPad.prototype.vfunc_get_preferred_width); @@ -766,8 +715,7 @@ var dtpPanel = Utils.defineClass({ let paddingSide = this.getPosition() == St.Side.LEFT ? 'left' : 'right'; let scaleFactor = Utils.getScaleFactor(); let style = offset ? 'padding-' + paddingSide + ':' + (offset / scaleFactor) + 'px;' : null; - let searchEntry = Main.overview._searchEntry || Main.overview._overview._searchEntry; - + let searchEntry = Main.overview._overview._controls._searchEntry; searchEntry.get_parent().set_style(style); } }, @@ -1461,7 +1409,7 @@ var dtpPanel = Utils.defineClass({ _checkIfIgnoredScrollSource: function(source) { let ignoredConstr = ['WorkspaceIndicator']; - return source._dtpIgnoreScroll || ignoredConstr.indexOf(source.constructor.name) >= 0; + return source.get_parent()._dtpIgnoreScroll || ignoredConstr.indexOf(source.constructor.name) >= 0; }, _initProgressManager: function() { @@ -1532,7 +1480,6 @@ var dtpSecondaryAggregateMenu = Utils.defineClass({ this._indicators.add_child(Utils.getIndicators(this._volume)); this._indicators.add_child(Utils.getIndicators(this._power)); - this._indicators.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM)); this.menu.addMenuItem(this._volume.menu); this._volume._volumeMenu._readOutput(); diff --git a/panelManager.js b/panelManager.js index 20ee12d..4973848 100755 --- a/panelManager.js +++ b/panelManager.js @@ -76,6 +76,8 @@ var dtpPanelManager = Utils.defineClass({ this.dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex] || Main.layoutManager.primaryMonitor; this.proximityManager = new Proximity.ProximityManager(); + this._oldGetShowAppsButton = imports.ui.main.overview.dash.showAppsButton; + Utils.wrapActor(Main.panel); Utils.wrapActor(Main.overview.dash || 0); @@ -129,11 +131,6 @@ var dtpPanelManager = Utils.defineClass({ if (reset) return; - this._oldViewSelectorAnimateIn = Main.overview.viewSelector._animateIn; - Main.overview.viewSelector._animateIn = Lang.bind(this.primaryPanel, newViewSelectorAnimateIn); - this._oldViewSelectorAnimateOut = Main.overview.viewSelector._animateOut; - Main.overview.viewSelector._animateOut = Lang.bind(this.primaryPanel, newViewSelectorAnimateOut); - if (Config.PACKAGE_VERSION > '3.35.1') { this._oldDoSpringAnimation = AppDisplay.BaseAppView.prototype._doSpringAnimation; AppDisplay.BaseAppView.prototype._doSpringAnimation = newDoSpringAnimation; @@ -157,20 +154,13 @@ var dtpPanelManager = Utils.defineClass({ this._enableHotCornersId = Main.layoutManager._interfaceSettings.connect('changed::enable-hot-corners', () => Main.layoutManager._updateHotCorners()); } - this._oldOverviewRelayout = Main.overview._relayout; - Main.overview._relayout = Lang.bind(Main.overview, this._newOverviewRelayout); - - this._oldUpdateWorkspacesViews = Main.overview.viewSelector._workspacesDisplay._updateWorkspacesViews; - Main.overview.viewSelector._workspacesDisplay._updateWorkspacesViews = Lang.bind(Main.overview.viewSelector._workspacesDisplay, this._newUpdateWorkspacesViews); - - this._oldGetShowAppsButton = Main.overview.getShowAppsButton; Main.overview.getShowAppsButton = this._newGetShowAppsButton.bind(this); - - // Since Gnome 3.8 dragging an app without having opened the overview before cause the attemp to - //animate a null target since some variables are not initialized when the viewSelector is created - if(Main.overview.viewSelector._activePage == null) - Main.overview.viewSelector._activePage = Main.overview.viewSelector._workspacesPage; + this._needsDashItemContainerAllocate = !Dash.DashItemContainer.prototype.hasOwnProperty('vfunc_allocate'); + + if (this._needsDashItemContainerAllocate) { + Utils.hookVfunc(Dash.DashItemContainer.prototype, 'allocate', this._newDashItemContainerAllocate); + } LookingGlass.LookingGlass.prototype._oldResize = LookingGlass.LookingGlass.prototype._resize; LookingGlass.LookingGlass.prototype._resize = _newLookingGlassResize; @@ -340,14 +330,6 @@ var dtpPanelManager = Utils.defineClass({ Main.layoutManager._updatePanelBarrier = this._oldUpdatePanelBarrier; Main.layoutManager._updatePanelBarrier(); - Main.overview.viewSelector._animateIn = this._oldViewSelectorAnimateIn; - Main.overview.viewSelector._animateOut = this._oldViewSelectorAnimateOut; - - Main.overview._relayout = this._oldOverviewRelayout; - Main.overview._relayout(); - - Main.overview.viewSelector._workspacesDisplay._updateWorkspacesViews = this._oldUpdateWorkspacesViews; - Utils.getPanelGhost().set_size(-1, -1); if (this._oldDoSpringAnimation) { @@ -366,18 +348,16 @@ var dtpPanelManager = Utils.defineClass({ }, setFocusedMonitor: function(monitor, ignoreRelayout) { - this._needsIconAllocate = 1; - - if (!this.checkIfFocusedMonitor(monitor)) { - Main.overview.viewSelector._workspacesDisplay._primaryIndex = monitor.index; - - Main.overview._overview.clear_constraints(); - Main.overview._overview.add_constraint(new Layout.MonitorConstraint({ index: monitor.index })); - - if (ignoreRelayout) return; + // todo show overview on non primary monitor is not working right now on gnome40 - this._newOverviewRelayout.call(Main.overview); - } + // this._needsIconAllocate = 1; + + // if (!this.checkIfFocusedMonitor(monitor)) { + // Main.overview._overview._controls._workspacesDisplay._primaryIndex = monitor.index; + + // Main.overview._overview.clear_constraints(); + // Main.overview._overview.add_constraint(new Layout.MonitorConstraint({ index: monitor.index })); + // } }, _saveMonitors: function() { @@ -393,7 +373,7 @@ var dtpPanelManager = Utils.defineClass({ }, checkIfFocusedMonitor: function(monitor) { - return Main.overview.viewSelector._workspacesDisplay._primaryIndex == monitor.index; + return Main.overview._overview._controls._workspacesDisplay._primaryIndex == monitor.index; }, _createPanel: function(monitor, isStandalone) { @@ -511,66 +491,6 @@ var dtpPanelManager = Utils.defineClass({ }); }, - _newOverviewRelayout: function() { - // To avoid updating the position and size of the workspaces - // we just hide the overview. The positions will be updated - // when it is next shown. - this.hide(); - - let workArea = Main.layoutManager.getWorkAreaForMonitor(Main.overview.viewSelector._workspacesDisplay._primaryIndex); - - this._coverPane.set_position(0, workArea.y); - this._coverPane.set_size(workArea.width, workArea.height); - - this._updateBackgrounds(); - }, - - _newUpdateWorkspacesViews: function() { - for (let i = 0; i < this._workspacesViews.length; i++) - this._workspacesViews[i].destroy(); - - this._workspacesViews = []; - - let monitors = Main.layoutManager.monitors; - - for (let i = 0; i < monitors.length; i++) { - let workspaces; - let view; - if (this._workspacesOnlyOnPrimary && i != Main.layoutManager.primaryIndex) { - view = new WorkspacesView.ExtraWorkspaceView(i); - view.getActiveWorkspace = view.getActiveWorkspace || function() { return this._workspace; }; - workspaces = [view._workspace]; - } else { - view = new WorkspacesView.WorkspacesView(i, this._scrollAdjustment || 0); - workspaces = view._workspaces; - } - - Utils.wrapActor(view); - view.actor.connect('scroll-event', this._onScrollEvent.bind(this)); - if (i == Main.layoutManager.primaryIndex && view.scrollAdjustment) { - this._scrollAdjustment = view.scrollAdjustment; - this._scrollAdjustment.connect('notify::value', - this._scrollValueChanged.bind(this)); - } - - workspaces.forEach(w => w.setFullGeometry = geom => w._fullGeometry = geom); - this._workspacesViews.push(view); - } - - this._workspacesViews.forEach(wv => Main.layoutManager.overviewGroup.add_actor(wv.actor)); - - if (this._syncWorkspacesFullGeometry) { - //gnome-shell 3.36.4 - if (this._fullGeometry) - this._syncWorkspacesFullGeometry(); - if (this._actualGeometry) - this._syncWorkspacesActualGeometry(); - } else if (this._updateWorkspacesFullGeometry) { - this._updateWorkspacesFullGeometry(); - this._updateWorkspacesActualGeometry(); - } - }, - _newGetShowAppsButton: function() { let focusedMonitorIndex = Utils.findIndex(this.allPanels, p => this.checkIfFocusedMonitor(p.monitor)); @@ -661,47 +581,6 @@ var IconAnimator = Utils.defineClass({ } }); -function newViewSelectorAnimateIn(oldPage) { - if (oldPage) - oldPage.hide(); - - let vs = Main.overview.viewSelector; - - vs.emit('page-empty'); - - vs._activePage.show(); - - if (vs._activePage == vs._appsPage && oldPage == vs._workspacesPage) { - // Restore opacity, in case we animated via _fadePageOut - vs._activePage.opacity = 255; - let animate = Me.settings.get_boolean('animate-show-apps'); - if(animate) - vs.appDisplay.animate(IconGrid.AnimationDirection.IN); - } else { - vs._fadePageIn(); - } -} - -function newViewSelectorAnimateOut(page) { - let oldPage = page; - let vs = Main.overview.viewSelector; - - if (page == vs._appsPage && - vs._activePage == vs._workspacesPage && - !Main.overview.animationInProgress) { - let animate = Me.settings.get_boolean('animate-show-apps'); - if(animate) - vs.appDisplay.animate(IconGrid.AnimationDirection.OUT, Lang.bind(this, - function() { - vs._animateIn(oldPage) - })); - else - vs._animateIn(oldPage) - } else { - vs._fadePageOut(page); - } -} - function newGetPositionForDirection(direction, fromWs, toWs) { let [xDest, yDest] = WM.WindowManager.prototype._getPositionForDirection(direction, fromWs, toWs); diff --git a/prefs.js b/prefs.js index d402d6b..26ad471 100644 --- a/prefs.js +++ b/prefs.js @@ -157,24 +157,18 @@ function mergeObjects(main, bck) { return main; }; -const Settings = new Lang.Class({ - Name: 'DashToPanel.Settings', +const Preferences = new Lang.Class({ + Name: 'DashToPanel.Preferences', _init: function() { this._settings = Convenience.getSettings('org.gnome.shell.extensions.dash-to-panel'); - this._rtl = (Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL); - this._builder = new Gtk.Builder(); + this._builder.set_scope(new BuilderScope(this)); this._builder.set_translation_domain(Me.metadata['gettext-domain']); this._builder.add_from_file(Me.path + '/Settings.ui'); - this.notebook = this._builder.get_object('settings_notebook'); - this.viewport = new Gtk.Viewport(); - this.viewport.add(this.notebook); - this.widget = new Gtk.ScrolledWindow(); - this.widget.add(this.viewport); - + this.notebook.set_size_request(680, 740); // Timeout to delay the update of the settings this._panel_size_timeout = 0; @@ -187,10 +181,7 @@ const Settings = new Lang.Class({ this._tray_padding_timeout = 0; this._statusicon_padding_timeout = 0; this._leftbox_padding_timeout = 0; - this._bindSettings(); - - this._builder.connect_signals_full(Lang.bind(this, this._connector)); }, /** @@ -339,8 +330,11 @@ const Settings = new Lang.Class({ _displayPanelPositionsForMonitor: function(monitorIndex) { let taskbarListBox = this._builder.get_object('taskbar_display_listbox'); - - taskbarListBox.get_children().forEach(c => c.destroy()); + + while(taskbarListBox.get_first_child()) + { + taskbarListBox.remove(taskbarListBox.get_first_child()); + } let labels = {}; let panelPosition = this._getPanelPosition(monitorIndex); @@ -352,14 +346,17 @@ const Settings = new Lang.Class({ let monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); let monitors = monitorSync ? this.monitors : [monitorIndex]; - taskbarListBox.get_children().forEach(c => { + let child = taskbarListBox.get_first_child(); + while (child != null) + { newPanelElementPositions.push({ - element: c.id, - visible: c.visibleToggleBtn.get_active(), - position: c.positionCombo.get_active_id() + element: child.id, + visible: child.visibleToggleBtn.get_active(), + position: child.positionCombo.get_active_id() }); - }); - + child = child.get_next_sibling(); + } + monitors.forEach(m => panelElementPositionsSettings[m] = newPanelElementPositions); this._settings.set_string('panel-element-positions', JSON.stringify(panelElementPositionsSettings)); }; @@ -377,7 +374,7 @@ const Settings = new Lang.Class({ panelElementPositions.forEach(el => { let row = new Gtk.ListBoxRow(); - let grid = new Gtk.Grid({ margin: 2, margin_left: 12, margin_right: 12, column_spacing: 8 }); + let grid = new Gtk.Grid({ margin_start: 12, margin_end: 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 }); @@ -406,43 +403,41 @@ const Settings = new Lang.Class({ visibleToggleBtn.connect('toggled', () => updateElementsSettings()); positionCombo.connect('changed', () => updateElementsSettings()); - upBtn.add(upImg); - downBtn.add(downImg); + upBtn.set_child(upImg); + downBtn.set_child(downImg); - upDownGrid.add(upBtn); - upDownGrid.add(downBtn); + upDownGrid.attach(upBtn, 0, 0, 1, 1); + upDownGrid.attach(downBtn, 1, 0, 1, 1); - grid.add(upDownGrid); - grid.add(new Gtk.Label({ label: labels[el.element], xalign: 0, hexpand: true })); + grid.attach(upDownGrid, 0, 0, 1, 1); + grid.attach(new Gtk.Label({ label: labels[el.element], xalign: 0, hexpand: true }), 1, 0, 1, 1); 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.set_child(cogImg); + grid.attach(optionsBtn, 2, 0, 1, 1); optionsBtn.connect('clicked', () => this[Pos.optionDialogFunctions[el.element]]()); } - grid.add(visibleToggleBtn); - grid.add(positionCombo); + grid.attach(visibleToggleBtn, 3, 0, 1, 1); + grid.attach(positionCombo, 4, 0, 1, 1); row.id = el.element; row.visibleToggleBtn = visibleToggleBtn; row.positionCombo = positionCombo; - row.add(grid); - taskbarListBox.add(row); + row.set_child(grid); + taskbarListBox.insert(row, -1); }); - - taskbarListBox.show_all(); }, _showShowAppsButtonOptions: function() { let dialog = new Gtk.Dialog({ title: _('Show Applications options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -451,32 +446,39 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('show_applications_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); - let fileChooser = this._builder.get_object('show_applications_icon_file_filebutton'); + let fileChooserButton = this._builder.get_object('show_applications_icon_file_filebutton'); + let fileChooser = new Gtk.FileChooserNative({ title: _('Open icon'), transient_for: dialog }); let fileImage = this._builder.get_object('show_applications_current_icon_image'); let fileFilter = new Gtk.FileFilter(); + fileFilter.add_pixbuf_formats(); + fileChooser.filter = fileFilter; + let handleIconChange = function(newIconPath) { if (newIconPath && GLib.file_test(newIconPath, GLib.FileTest.EXISTS)) { - let file = Gio.File.new_for_path(newIconPath) + 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); + fileChooser.set_file(file); + fileChooserButton.set_label(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)); + fileImage.set_from_icon_name('view-app-grid-symbolic'); + let picturesFolder = Gio.File.new_for_path(GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES)); + fileChooser.set_file(picturesFolder); + fileChooserButton.set_label("(None)"); } 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())); + fileChooserButton.connect('clicked', Lang.bind(this, function() { + fileChooser.show(); + })); + + fileChooser.connect('response', widget => handleIconChange.call(this, widget.get_file().get_path())); handleIconChange.call(this, this._settings.get_string('show-apps-icon-file')); dialog.connect('response', Lang.bind(this, function(dialog, id) { @@ -494,12 +496,13 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(1, 1); }, _showDesktopButtonOptions: function() { let dialog = new Gtk.Dialog({ title: _('Show Desktop options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -508,7 +511,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_show_showdesktop_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(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) { @@ -546,7 +549,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(1, 1); }, _bindSettings: function() { @@ -641,7 +645,7 @@ const Settings = new Lang.Class({ this._builder.get_object('dot_style_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Running Indicator Options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -650,7 +654,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_dots_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); this._settings.bind('dot-color-dominant', this._builder.get_object('dot_color_dominant_switch'), @@ -783,7 +787,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(1, 1); })); @@ -986,7 +991,7 @@ const Settings = new Lang.Class({ this._builder.get_object('trans_dyn_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Dynamic opacity options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -995,7 +1000,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_dynamic_opacity_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); dialog.connect('response', Lang.bind(this, function(dialog, id) { if (id == 1) { @@ -1018,7 +1023,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(1, 1); })); @@ -1129,7 +1135,7 @@ const Settings = new Lang.Class({ this._builder.get_object('intellihide_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Intellihide options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1138,7 +1144,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_intellihide_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); dialog.connect('response', Lang.bind(this, function(dialog, id) { if (id == 1) { @@ -1173,7 +1179,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(1, 1); })); @@ -1184,11 +1191,6 @@ const Settings = new Lang.Class({ this._settings.set_int('show-apps-icon-side-padding', widget.get_value()); })); - this._settings.bind('animate-show-apps', - this._builder.get_object('application_button_animation_switch'), - 'active', - Gio.SettingsBindFlags.DEFAULT); - this._settings.bind('show-apps-override-escape', this._builder.get_object('show_applications_esc_key_switch'), 'active', @@ -1256,7 +1258,7 @@ const Settings = new Lang.Class({ this._builder.get_object('show_window_previews_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Window preview options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1266,9 +1268,7 @@ const Settings = new Lang.Class({ let scrolledWindow = this._builder.get_object('box_window_preview_options'); - adjustScrollableHeight(this._builder.get_object('viewport_window_preview_options'), scrolledWindow); - - dialog.get_content_area().add(scrolledWindow); + dialog.get_content_area().append(scrolledWindow); this._builder.get_object('preview_timeout_spinbutton').set_value(this._settings.get_int('show-window-previews-timeout')); this._builder.get_object('preview_timeout_spinbutton').connect('value-changed', Lang.bind (this, function(widget) { @@ -1482,7 +1482,7 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); })); @@ -1501,6 +1501,11 @@ const Settings = new Lang.Class({ 'active', Gio.SettingsBindFlags.DEFAULT); + this._settings.bind('hide-overview-on-startup', + this._builder.get_object('hide_overview_on_startup_switch'), + 'active', + Gio.SettingsBindFlags.DEFAULT); + this._settings.bind('group-apps', this._builder.get_object('group_apps_switch'), 'active', @@ -1542,7 +1547,7 @@ const Settings = new Lang.Class({ this._builder.get_object('show_group_apps_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Ungrouped application options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1551,7 +1556,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_group_apps_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); this._builder.get_object('group_apps_label_font_size_spinbutton').set_value(this._settings.get_int('group-apps-label-font-size')); this._builder.get_object('group_apps_label_font_size_spinbutton').connect('value-changed', Lang.bind (this, function(widget) { @@ -1613,7 +1618,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(600, 1); })); @@ -1637,7 +1643,7 @@ const Settings = new Lang.Class({ this._builder.get_object('middle_click_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Customize middle-click behavior'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1646,7 +1652,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_middle_click_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); this._builder.get_object('shift_click_action_combo').set_active_id(this._settings.get_string('shift-click-action')); @@ -1685,7 +1691,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(700, 1); })); @@ -1702,7 +1709,7 @@ const Settings = new Lang.Class({ // Create dialog for panel scroll options this._builder.get_object('scroll_panel_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Customize panel scroll behavior'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1711,7 +1718,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('scroll_panel_options_box'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); this._builder.get_object('scroll_panel_options_delay_spinbutton').set_value(this._settings.get_int('scroll-panel-delay')); this._builder.get_object('scroll_panel_options_delay_spinbutton').connect('value-changed', Lang.bind (this, function(widget) { @@ -1738,14 +1745,15 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(640, 1); })); // Create dialog for icon scroll options this._builder.get_object('scroll_icon_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Customize icon scroll behavior'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1754,7 +1762,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('scroll_icon_options_box'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); this._builder.get_object('scroll_icon_options_delay_spinbutton').set_value(this._settings.get_int('scroll-icon-delay')); this._builder.get_object('scroll_icon_options_delay_spinbutton').connect('value-changed', Lang.bind (this, function(widget) { @@ -1774,7 +1782,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(640, 1); })); @@ -1842,7 +1851,7 @@ const Settings = new Lang.Class({ this._builder.get_object('overlay_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Advanced hotkeys options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1851,7 +1860,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_overlay_shortcut'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); dialog.connect('response', Lang.bind(this, function(dialog, id) { if (id == 1) { @@ -1868,7 +1877,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(600, 1); })); @@ -1876,7 +1886,7 @@ const Settings = new Lang.Class({ this._builder.get_object('secondarymenu_options_button').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Secondary Menu Options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1885,7 +1895,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_secondarymenu_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); this._settings.bind('secondarymenu-contains-appmenu', this._builder.get_object('secondarymenu_appmenu_switch'), @@ -1910,7 +1920,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(480, 1); })); @@ -1918,7 +1929,7 @@ const Settings = new Lang.Class({ this._builder.get_object('button_advanced_options').connect('clicked', Lang.bind(this, function() { let dialog = new Gtk.Dialog({ title: _('Advanced Options'), - transient_for: this.widget.get_toplevel(), + transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); @@ -1927,7 +1938,7 @@ const Settings = new Lang.Class({ dialog.add_button(_('Reset to defaults'), 1); let box = this._builder.get_object('box_advanced_options'); - dialog.get_content_area().add(box); + dialog.get_content_area().append(box); dialog.connect('response', Lang.bind(this, function(dialog, id) { if (id == 1) { @@ -1941,7 +1952,8 @@ const Settings = new Lang.Class({ return; })); - dialog.show_all(); + dialog.show(); + dialog.set_default_size(480, 1); })); @@ -2119,9 +2131,8 @@ const Settings = new Lang.Class({ this._builder.get_object('importexport_export_button').connect('clicked', widget => { this._showFileChooser( _('Export settings'), - { action: Gtk.FileChooserAction.SAVE, - do_overwrite_confirmation: true }, - Gtk.STOCK_SAVE, + { action: Gtk.FileChooserAction.SAVE }, + "Save", filename => { let file = Gio.file_new_for_path(filename); let raw = file.replace(null, false, Gio.FileCreateFlags.NONE, null); @@ -2137,29 +2148,30 @@ const Settings = new Lang.Class({ this._showFileChooser( _('Import settings'), { action: Gtk.FileChooserAction.OPEN }, - Gtk.STOCK_OPEN, + "Open", filename => { - let settingsFile = Gio.File.new_for_path(filename); - let [ , pid, stdin, stdout, stderr] = - GLib.spawn_async_with_pipes( - null, - ['dconf', 'load', SCHEMA_PATH], - null, - GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, - null - ); - - stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true }); - GLib.close(stdout); - GLib.close(stderr); - - let [ , , , retCode] = GLib.spawn_command_line_sync(GSET + ' -d ' + Me.uuid); - - if (retCode == 0) { - GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, () => GLib.spawn_command_line_sync(GSET + ' -e ' + Me.uuid)); - } + if (filename && GLib.file_test(filename, GLib.FileTest.EXISTS)) { + let settingsFile = Gio.File.new_for_path(filename); + let [ , pid, stdin, stdout, stderr] = + GLib.spawn_async_with_pipes( + null, + ['dconf', 'load', SCHEMA_PATH], + null, + GLib.SpawnFlags.SEARCH_PATH | GLib.SpawnFlags.DO_NOT_REAP_CHILD, + null + ); - stdin.splice(settingsFile.read(null), Gio.OutputStreamSpliceFlags.CLOSE_SOURCE | Gio.OutputStreamSpliceFlags.CLOSE_TARGET, null); + stdin = new Gio.UnixOutputStream({ fd: stdin, close_fd: true }); + GLib.close(stdout); + GLib.close(stderr); + + let [ , , , retCode] = GLib.spawn_command_line_sync(GSET + ' -d ' + Me.uuid); + if (retCode == 0) { + GLib.child_watch_add(GLib.PRIORITY_DEFAULT, pid, () => GLib.spawn_command_line_sync(GSET + ' -e ' + Me.uuid)); + } + + stdin.splice(settingsFile.read(null), Gio.OutputStreamSpliceFlags.CLOSE_SOURCE | Gio.OutputStreamSpliceFlags.CLOSE_TARGET, null); + } } ); }); @@ -2178,234 +2190,240 @@ const Settings = new Lang.Class({ }, _showFileChooser: function(title, params, acceptBtn, acceptHandler) { - let dialog = new Gtk.FileChooserDialog(mergeObjects({ title: title, transient_for: this.widget.get_toplevel() }, params)); + let dialog = new Gtk.FileChooserDialog(mergeObjects({ title: title, transient_for: this.notebook.get_root() }, params)); - dialog.add_button(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL); + dialog.add_button("Cancel", Gtk.ResponseType.CANCEL); dialog.add_button(acceptBtn, Gtk.ResponseType.ACCEPT); - if (dialog.run() == Gtk.ResponseType.ACCEPT) { - try { - acceptHandler(dialog.get_filename()); - } catch(e) { - log('error from dash-to-panel filechooser: ' + e); - } - } + dialog.show(); - dialog.destroy(); - }, + dialog.connect('response', Lang.bind(this, function(dialog, id) { + acceptHandler.call(this, dialog.get_file().get_path()); + dialog.destroy(); + })); + } +}); - /** - * Object containing all signals defined in the glade file - */ - _SignalHandler: { - animate_appicon_hover_options_duration_scale_format_value_cb: function(scale, value) { - return _("%d ms").format(value); - }, - animate_appicon_hover_options_rotation_scale_format_value_cb: function(scale, value) { - return _("%d °").format(value); - }, +const BuilderScope = GObject.registerClass({ + Implements: [Gtk.BuilderScope], +}, class BuilderScope extends GObject.Object { + + _init(preferences) { + this._preferences = preferences; + super._init(); + } - animate_appicon_hover_options_travel_scale_format_value_cb: function(scale, value) { - return _("%d %%").format(value); - }, - - animate_appicon_hover_options_zoom_scale_format_value_cb: function(scale, value) { - return _("%d %%").format(value); - }, - - animate_appicon_hover_options_convexity_scale_format_value_cb: function(scale, value) { - return _("%.1f").format(value); - }, - - animate_appicon_hover_options_extent_scale_format_value_cb: function(scale, value) { - return Gettext.ngettext("%d icon", "%d icons", value).format(value); - }, - - position_bottom_button_clicked_cb: function(button) { - if (!this._ignorePositionRadios && button.get_active()) this._setPanelPosition(Pos.BOTTOM); - }, - - position_top_button_clicked_cb: function(button) { - if (!this._ignorePositionRadios && button.get_active()) this._setPanelPosition(Pos.TOP); - }, + vfunc_create_closure(builder, handlerName, flags, connectObject) { + if (flags & Gtk.BuilderClosureFlags.SWAPPED) + throw new Error('Unsupported template signal flag "swapped"'); - position_left_button_clicked_cb: function(button) { - if (!this._ignorePositionRadios && button.get_active()) this._setPanelPosition(Pos.LEFT); - }, - - position_right_button_clicked_cb: function(button) { - if (!this._ignorePositionRadios && button.get_active()) this._setPanelPosition(Pos.RIGHT); - }, + if (typeof this[handlerName] === 'undefined') + throw new Error(`${handlerName} is undefined`); + + return this[handlerName].bind(connectObject || this); + } + + on_btn_click(connectObject) { + connectObject.set_label("Clicked"); + } - dots_bottom_button_toggled_cb: function(button) { - if (button.get_active()) - this._settings.set_string('dot-position', "BOTTOM"); - }, - - dots_top_button_toggled_cb: function(button) { - if (button.get_active()) - this._settings.set_string('dot-position', "TOP"); - }, + animate_appicon_hover_options_duration_scale_format_value_cb(scale, value) { + return _("%d ms").format(value); + } - dots_left_button_toggled_cb: function(button) { - if (button.get_active()) - this._settings.set_string('dot-position', "LEFT"); - }, - - dots_right_button_toggled_cb: function(button) { - if (button.get_active()) - this._settings.set_string('dot-position', "RIGHT"); - }, + animate_appicon_hover_options_rotation_scale_format_value_cb(scale, value) { + return _("%d °").format(value); + } - preview_title_position_bottom_button_toggled_cb: function(button) { - if (button.get_active()) - this._settings.set_string('window-preview-title-position', 'BOTTOM'); - }, - - preview_title_position_top_button_toggled_cb: function(button) { - if (button.get_active()) - this._settings.set_string('window-preview-title-position', 'TOP'); - }, + animate_appicon_hover_options_travel_scale_format_value_cb(scale, value) { + return _("%d %%").format(value); + } + animate_appicon_hover_options_zoom_scale_format_value_cb(scale, value) { + return _("%d %%").format(value); + } - panel_length_scale_format_value_cb: function(scale, value) { - return value+ '%'; - }, + animate_appicon_hover_options_convexity_scale_format_value_cb(scale, value) { + return _("%.1f").format(value); + } - panel_size_scale_format_value_cb: function(scale, value) { - return value+ ' px'; - }, + animate_appicon_hover_options_extent_scale_format_value_cb(scale, value) { + return Gettext.ngettext("%d icon", "%d icons", value).format(value); + } - panel_size_scale_value_changed_cb: function(scale) { - // Avoid settings the size continuously - if (this._panel_size_timeout > 0) - Mainloop.source_remove(this._panel_size_timeout); + position_bottom_button_clicked_cb(button) { + if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.BOTTOM); + } - this._panel_size_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - const value = scale.get_value(); - const monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); - const monitorsToSetFor = monitorSync ? this.monitors : [this._currentMonitorIndex]; - monitorsToSetFor.forEach(monitorIndex => { - PanelSettings.setPanelSize(this._settings, monitorIndex, value); - }); + position_top_button_clicked_cb(button) { + if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.TOP); + } + + position_left_button_clicked_cb(button) { + if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.LEFT); + } - this._panel_size_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - }, + position_right_button_clicked_cb(button) { + if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.RIGHT); + } - tray_size_scale_format_value_cb: function(scale, value) { - return value+ ' px'; - }, + dots_bottom_button_toggled_cb(button) { + if (button.get_active()) + this._preferences._settings.set_string('dot-position', "BOTTOM"); + } - tray_size_scale_value_changed_cb: function(scale) { - // Avoid settings the size consinuosly - if (this._tray_size_timeout > 0) - Mainloop.source_remove(this._tray_size_timeout); + dots_top_button_toggled_cb(button) { + if (button.get_active()) + this._preferences._settings.set_string('dot-position', "TOP"); + } - this._tray_size_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - this._settings.set_int('tray-size', scale.get_value()); - this._tray_size_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - }, + dots_left_button_toggled_cb(button) { + if (button.get_active()) + this._preferences._settings.set_string('dot-position', "LEFT"); + } - leftbox_size_scale_format_value_cb: function(scale, value) { - return value+ ' px'; - }, + dots_right_button_toggled_cb(button) { + if (button.get_active()) + this._preferences._settings.set_string('dot-position', "RIGHT"); + } - leftbox_size_scale_value_changed_cb: function(scale) { - // Avoid settings the size consinuosly - if (this._leftbox_size_timeout > 0) - Mainloop.source_remove(this._leftbox_size_timeout); + preview_title_position_bottom_button_toggled_cb(button) { + if (button.get_active()) + this._preferences._settings.set_string('window-preview-title-position', 'BOTTOM'); + } - this._leftbox_size_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - this._settings.set_int('leftbox-size', scale.get_value()); - this._leftbox_size_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - }, + preview_title_position_top_button_toggled_cb(button) { + if (button.get_active()) + this._preferences._settings.set_string('window-preview-title-position', 'TOP'); + } - appicon_margin_scale_format_value_cb: function(scale, value) { - return value+ ' px'; - }, + panel_size_scale_format_value_cb(scale, value) { + return value+ ' px'; + } - appicon_margin_scale_value_changed_cb: function(scale) { - // Avoid settings the size consinuosly - if (this._appicon_margin_timeout > 0) - Mainloop.source_remove(this._appicon_margin_timeout); + panel_size_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._panel_size_timeout > 0) + Mainloop.source_remove(this._preferences._panel_size_timeout); - this._appicon_margin_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - this._settings.set_int('appicon-margin', scale.get_value()); - this._appicon_margin_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - }, + this._preferences._panel_size_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('panel-size', scale.get_value()); + this._preferences._panel_size_timeout = 0; + return GLib.SOURCE_REMOVE; + })); + } - appicon_padding_scale_format_value_cb: function(scale, value) { - return value + ' px'; - }, + tray_size_scale_format_value_cb(scale, value) { + return value+ ' px'; + } - appicon_padding_scale_value_changed_cb: function(scale) { - // Avoid settings the size consinuosly - if (this._appicon_padding_timeout > 0) - Mainloop.source_remove(this._appicon_padding_timeout); + tray_size_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._tray_size_timeout > 0) + Mainloop.source_remove(this._preferences._tray_size_timeout); - this._appicon_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - this._settings.set_int('appicon-padding', scale.get_value()); - this._appicon_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - }, + this._preferences._tray_size_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('tray-size', scale.get_value()); + this._preferences._tray_size_timeout = 0; + return GLib.SOURCE_REMOVE; + })); + } - tray_padding_scale_format_value_cb: function(scale, value) { - return value+ ' px'; - }, + leftbox_size_scale_format_value_cb(scale, value) { + return value+ ' px'; + } - tray_padding_scale_value_changed_cb: function(scale) { - // Avoid settings the size consinuosly - if (this._tray_padding_timeout > 0) - Mainloop.source_remove(this._tray_padding_timeout); + leftbox_size_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._leftbox_size_timeout > 0) + Mainloop.source_remove(this._preferences._leftbox_size_timeout); - this._tray_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - this._settings.set_int('tray-padding', scale.get_value()); - this._tray_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - }, + this._preferences._leftbox_size_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('leftbox-size', scale.get_value()); + this._preferences._leftbox_size_timeout = 0; + return GLib.SOURCE_REMOVE; + })); + } - statusicon_padding_scale_format_value_cb: function(scale, value) { - return value+ ' px'; - }, + appicon_margin_scale_format_value_cb(scale, value) { + return value+ ' px'; + } - statusicon_padding_scale_value_changed_cb: function(scale) { - // Avoid settings the size consinuosly - if (this._statusicon_padding_timeout > 0) - Mainloop.source_remove(this._statusicon_padding_timeout); + appicon_margin_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._appicon_margin_timeout > 0) + Mainloop.source_remove(this._preferences._appicon_margin_timeout); - this._statusicon_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - this._settings.set_int('status-icon-padding', scale.get_value()); - this._statusicon_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - }, + this._preferences._appicon_margin_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('appicon-margin', scale.get_value()); + this._preferences._appicon_margin_timeout = 0; + return GLib.SOURCE_REMOVE; + })); + } - leftbox_padding_scale_format_value_cb: function(scale, value) { - return value+ ' px'; - }, + appicon_padding_scale_format_value_cb(scale, value) { + return value + ' px'; + } - leftbox_padding_scale_value_changed_cb: function(scale) { - // Avoid settings the size consinuosly - if (this._leftbox_padding_timeout > 0) - Mainloop.source_remove(this._leftbox_padding_timeout); + appicon_padding_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._appicon_padding_timeout > 0) + Mainloop.source_remove(this._preferences._appicon_padding_timeout); - this._leftbox_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { - this._settings.set_int('leftbox-padding', scale.get_value()); - this._leftbox_padding_timeout = 0; - return GLib.SOURCE_REMOVE; - })); - } + this._preferences._appicon_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('appicon-padding', scale.get_value()); + this._preferences._appicon_padding_timeout = 0; + return GLib.SOURCE_REMOVE; + })); + } + + tray_padding_scale_format_value_cb(scale, value) { + return value+ ' px'; + } + + tray_padding_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._tray_padding_timeout > 0) + Mainloop.source_remove(this._preferences._tray_padding_timeout); + + this._preferences._tray_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('tray-padding', scale.get_value()); + this._preferences._tray_padding_timeout = 0; + return GLib.SOURCE_REMOVE; + })); + } + + statusicon_padding_scale_format_value_cb(scale, value) { + return value+ ' px'; + } + + statusicon_padding_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._statusicon_padding_timeout > 0) + Mainloop.source_remove(this._preferences._statusicon_padding_timeout); + + this._preferences._statusicon_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('status-icon-padding', scale.get_value()); + this._preferences._statusicon_padding_timeout = 0; + return GLib.SOURCE_REMOVE; + })); + } + + leftbox_padding_scale_format_value_cb(scale, value) { + return value+ ' px'; + } + + leftbox_padding_scale_value_changed_cb(scale) { + // Avoid settings the size consinuosly + if (this._preferences._leftbox_padding_timeout > 0) + Mainloop.source_remove(this._preferences._leftbox_padding_timeout); + + this._preferences._leftbox_padding_timeout = Mainloop.timeout_add(SCALE_UPDATE_TIMEOUT, Lang.bind(this, function() { + this._preferences._settings.set_int('leftbox-padding', scale.get_value()); + this._preferences._leftbox_padding_timeout = 0; + return GLib.SOURCE_REMOVE; + })); } }); @@ -2414,20 +2432,7 @@ function init() { } function buildPrefsWidget() { - let settings = new Settings(); - let widget = settings.widget; - - // I'd like the scrolled window to default to a size large enough to show all without scrolling, if it fits on the screen - // But, it doesn't seem possible, so I'm setting a minimum size if there seems to be enough screen real estate - widget.show_all(); - adjustScrollableHeight(settings.viewport, widget); + let preferences = new Preferences(); - return widget; -} - -function adjustScrollableHeight(viewport, scrollableWindow) { - let viewportSize = viewport.size_request(); - let screenHeight = scrollableWindow.get_screen().get_height() - 120; - - scrollableWindow.set_size_request(viewportSize.width, viewportSize.height > screenHeight ? screenHeight : viewportSize.height); + return preferences.notebook; } diff --git a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml index 2c9e86a..7e8ea3a 100644 --- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml +++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml @@ -384,11 +384,6 @@ Override escape key Override the escape key to return to the desktop when entering the overview using the Show Applications button - - true - Animate Show Applications from the desktop - Animate Show Applications from the desktop - [] Show Apps button context menu commands @@ -559,6 +554,11 @@ Close overview by clicking in empty space Close overview or app grid by clicking in empty space + + false + Hide overview on startup + Hide overview on startup, which would be shown by default at gnome startup. + true Group applications diff --git a/taskbar.js b/taskbar.js index 5feb1a9..494ec3d 100644 --- a/taskbar.js +++ b/taskbar.js @@ -35,7 +35,8 @@ const Shell = imports.gi.Shell; const St = imports.gi.St; const Mainloop = imports.mainloop; -const AppDisplay = imports.ui.appDisplay; +const SearchController = imports.ui.main.overview._overview._controls._searchController; +const AppDisplay = imports.ui.main.overview._overview._controls.appDisplay; const AppFavorites = imports.ui.appFavorites; const Dash = imports.ui.dash; const DND = imports.ui.dnd; @@ -247,7 +248,8 @@ var taskbar = Utils.defineClass({ } this.showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled)); - this.showAppsButton.checked = Main.overview.viewSelector._showAppsButton.checked; + + this.showAppsButton.checked = (SearchController._showAppsButton) ? SearchController._showAppsButton.checked : false; this._showAppsIcon.childScale = 1; this._showAppsIcon.childOpacity = 255; @@ -352,7 +354,7 @@ var taskbar = Utils.defineClass({ ], [ // Ensure the ShowAppsButton status is kept in sync - Main.overview.viewSelector._showAppsButton, + SearchController._showAppsButton, 'notify::checked', Lang.bind(this, this._syncShowAppsButtonToggled) ], @@ -1214,26 +1216,16 @@ var taskbar = Utils.defineClass({ // application button, cutomize the behaviour. Otherwise the shell has changed the // status (due to the _syncShowAppsButtonToggled function below) and it // has already performed the desired action. + let selector = SearchController; - let animate = Me.settings.get_boolean('animate-show-apps'); - let selector = Main.overview.viewSelector; - - if (selector._showAppsButton.checked !== this.showAppsButton.checked) { + if (selector._showAppsButton && + selector._showAppsButton.checked !== this.showAppsButton.checked) { // find visible view - let visibleView; - Utils.getAppDisplayViews().every(function(v, index) { - if (v.view.actor.visible) { - visibleView = index; - return false; - } - else - return true; - }); if (this.showAppsButton.checked) { if (Me.settings.get_boolean('show-apps-override-escape')) { //override escape key to return to the desktop when entering the overview using the showapps button - Main.overview.viewSelector._onStageKeyPress = function(actor, event) { + SearchController._onStageKeyPress = function(actor, event) { if (Main.modalCount == 1 && event.get_key_symbol() === Clutter.KEY_Escape) { this._searchActive ? this.reset() : Main.overview.hide(); @@ -1248,7 +1240,7 @@ var taskbar = Utils.defineClass({ // runs if we are already inside the overview. if (!Main.overview._shown) { this.forcedOverview = true; - let grid = Utils.getAppDisplayViews()[visibleView].view._grid; + let grid = AppDisplay._grid; let onShownCb; let overviewSignal = Config.PACKAGE_VERSION > '3.38.1' ? 'showing' : 'shown'; let overviewShowingId = Main.overview.connect(overviewSignal, () => { @@ -1256,30 +1248,7 @@ var taskbar = Utils.defineClass({ onShownCb(); }); - if (animate) { - // Animate in the the appview, hide the appGrid to avoiud flashing - // Go to the appView before entering the overview, skipping the workspaces. - // Do this manually avoiding opacity in transitions so that the setting of the opacity - // to 0 doesn't get overwritten. - Main.overview.viewSelector._activePage.hide(); - Main.overview.viewSelector._activePage = Main.overview.viewSelector._appsPage; - Main.overview.viewSelector._activePage.show(); - grid.actor.opacity = 0; - - // The animation has to be trigered manually because the AppDisplay.animate - // method is waiting for an allocation not happening, as we skip the workspace view - // and the appgrid could already be allocated from previous shown. - // It has to be triggered after the overview is shown as wrong coordinates are obtained - // otherwise. - onShownCb = () => Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { - grid.actor.opacity = 255; - grid.animateSpring(IconGrid.AnimationDirection.IN, this.showAppsButton); - }); - } else { - Main.overview.viewSelector._activePage = Main.overview.viewSelector._appsPage; - Main.overview.viewSelector._activePage.show(); - onShownCb = () => grid.emit('animation-done'); - } + onShownCb = () => grid.emit('animation-done'); } //temporarily use as primary the monitor on which the showapps btn was clicked, this is @@ -1288,33 +1257,19 @@ var taskbar = Utils.defineClass({ let overviewHiddenId = Main.overview.connect('hidden', () => { Main.overview.disconnect(overviewHiddenId); - delete Main.overview.viewSelector._onStageKeyPress; + delete SearchController._onStageKeyPress; }); // Finally show the overview selector._showAppsButton.checked = true; - Main.overview.show(); + Main.overview.show(2 /*APP_GRID*/); } else { if (this.forcedOverview) { // force exiting overview if needed - if (animate) { - // Manually trigger springout animation without activating the - // workspaceView to avoid the zoomout animation. Hide the appPage - // onComplete to avoid ugly flashing of original icons. - let view = Utils.getAppDisplayViews()[visibleView].view; - view.animate(IconGrid.AnimationDirection.OUT, Lang.bind(this, function() { - Main.overview.viewSelector._appsPage.hide(); - Main.overview.hide(); - selector._showAppsButton.checked = false; - this.forcedOverview = false; - })); - } - else { - Main.overview.hide(); - this.forcedOverview = false; - } + Main.overview.hide(); + this.forcedOverview = false; } else { selector._showAppsButton.checked = false; @@ -1325,7 +1280,7 @@ var taskbar = Utils.defineClass({ }, _syncShowAppsButtonToggled: function() { - let status = Main.overview.viewSelector._showAppsButton.checked; + let status = SearchController._showAppsButton.checked; if (this.showAppsButton.checked !== status) this.showAppsButton.checked = status; }, diff --git a/utils.js b/utils.js index 51d056d..d90d2cc 100644 --- a/utils.js +++ b/utils.js @@ -187,9 +187,14 @@ var GlobalSignalsHandler = defineClass({ let object = item[0]; let event = item[1][i]; let callback = item[2] - let id = object.connect(event, callback); + try { + let id = object.connect(event, callback); - handlers.push([object, id]); + handlers.push([object, id]); + } catch (e) + { + + } } return handlers; @@ -304,7 +309,7 @@ var getScaleFactor = function() { var getAppDisplayViews = function() { //gnome-shell 3.38 only has one view and it is now the appDisplay - return Main.overview.viewSelector.appDisplay._views || [{ view: Main.overview.viewSelector.appDisplay }]; + return imports.ui.appDisplay._views || [{ view: imports.ui.appDisplay }]; }; var findIndex = function(array, predicate) { @@ -340,7 +345,7 @@ var mergeObjects = function(main, bck) { }; var hookVfunc = function(proto, symbol, func) { - if (Gi.hook_up_vfunc_symbol) { + if (Gi.hook_up_vfunc_symbol && func) { //gjs > 1.53.3 proto[Gi.hook_up_vfunc_symbol](symbol, func); } else {