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 <corvettecole@gmail.com>
This commit is contained in:
Philipp
2021-05-08 15:07:25 +02:00
committed by GitHub
parent 925f5b27b3
commit a4224f4acc
10 changed files with 3807 additions and 4741 deletions

View File

@@ -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;
},