Skip to content

Commit c7cec79

Browse files
authored
Merge pull request #120 from Arisamiga/main-gnome-48
# Added support for Gnome 47 and Gnome 48 With some styling improvement on prefs This pull request includes styling improvements, specifically by adjusting the margins in the preferences window. It also adds support for GNOME versions 47 and 48 in the manifest, as no dependency warnings were encountered during testing. Additionally, Gnome default icons have been added to the preferences tabs; this is necessary to avoid displaying broken icons in the window, which was the case beforehand.
2 parents 9379f86 + 5cfbde0 commit c7cec79

4 files changed

Lines changed: 59 additions & 8 deletions

File tree

metadata.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
"name": "Another Window Session Manager",
55
"shell-version": [
66
"45",
7-
"46"
7+
"46",
8+
"47",
9+
"48"
810
],
911
"url": "https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager",
1012
"uuid": "another-window-session-manager@gmail.com",
11-
"version": 49
13+
"version": 50
1214
}

prefs.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import GdkWayland from 'gi://GdkWayland';
88
import Gdk from 'gi://Gdk';
99

1010
import {ExtensionPreferences, gettext as _} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
11-
1211
import * as FileUtils from './utils/fileUtils.js';
1312
import * as Log from './utils/log.js';
1413
import {prefsUtilsInit, prefsUtilsDestroy, PrefsUtils} from './utils/prefsUtils.js';
@@ -272,7 +271,6 @@ export default class AnotherWindowSessionManagerPreferences extends ExtensionPre
272271

273272
this.close_by_rules_switch = this._builder.get_object('close_by_rules_switch');
274273
this.auto_close_session_switch = this._builder.get_object('auto_close_session_switch');
275-
276274
}
277275

278276
_installAutostartDesktopFile(desktopFileTemplate, targetDesktopFilePath) {

prefsCloseWindow.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const UICloseWindows = GObject.registerClass(
5151
const settingKey = 'close-windows-whitelist';
5252
const close_windows_whitelist_listbox = this._builder.get_object('close_windows_whitelist_listbox');
5353
close_windows_whitelist_listbox.set_header_func((currentRow, beforeRow, data) => {
54-
this._setHeader(currentRow, beforeRow, data, 'Whitelist', {margin_start: 0});
54+
this._setHeader(currentRow, beforeRow, data, 'Whitelist');
5555
});
5656

5757
const whitelistColumnView = new PrefsColumnView.WhitelistColumnView();
@@ -186,7 +186,7 @@ export const UICloseWindows = GObject.registerClass(
186186
margin_start: 12,
187187
use_markup: true,
188188
label: `<b>${headerName}</b>`,
189-
tooltip_text: 'Apps in the whitelist will be closed even they has multiple windows'
189+
tooltip_text: 'Apps in the whitelist will be closed even if they have multiple windows'
190190
});
191191
if (labelProperties)
192192
Object.assign(label, labelProperties);

ui/prefs-gtk4.ui

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</object>
2525

2626
<object class="AdwPreferencesPage" id="close_windows_page">
27-
<!-- <property name="icon-name">text-x-generic-symbolic</property> -->
27+
<property name="icon-name">window-close-symbolic</property>
2828
<property name="use_underline">true</property>
2929
<property name="title" translatable="yes">Close windows</property>
3030
<child>
@@ -47,6 +47,8 @@
4747
<object class="GtkGrid" id="auto_close_session_multi_grid1">
4848
<property name="margin-top">12</property>
4949
<property name="margin-bottom">12</property>
50+
<property name="margin_start">12</property>
51+
<property name="margin_end">12</property>
5052
<property name="row-spacing">6</property>
5153
<property name="column-spacing">32</property>
5254
<child>
@@ -103,6 +105,8 @@
103105
<object class="GtkGrid" id="close_by_rules_multi_grid1">
104106
<property name="margin-top">12</property>
105107
<property name="margin-bottom">12</property>
108+
<property name="margin_start">12</property>
109+
<property name="margin_end">12</property>
106110
<property name="row-spacing">6</property>
107111
<property name="column-spacing">32</property>
108112
<child>
@@ -190,7 +194,11 @@
190194
</child>
191195
</object>
192196
<object class="AdwPreferencesPage" id="save_windows_page">
197+
<property name="icon-name">document-save-symbolic</property>
193198
<property name="use_underline">true</property>
199+
<property name="margin_bottom">12</property>
200+
<property name="margin_start">12</property>
201+
<property name="margin_end">12</property>
194202
<property name="title" translatable="yes">Save windows</property>
195203
<child>
196204
<object class="GtkBox">
@@ -208,8 +216,10 @@
208216
<property name="margin-bottom">12</property>
209217
<property name="row-spacing">6</property>
210218
<property name="column-spacing">32</property>
219+
<property name="margin_start">6</property>
211220
<child>
212221
<object class="GtkLabel" id="save_session_notification_label">
222+
<property name="margin_top">12</property>
213223
<property name="hexpand">1</property>
214224
<property name="label" translatable="yes">Session is saved notification</property>
215225
<property name="use-markup">1</property>
@@ -222,6 +232,7 @@
222232
</child>
223233
<child>
224234
<object class="GtkSwitch" id="save_session_notification_switch">
235+
<property name="margin_end">6</property>
225236
<property name="focusable">1</property>
226237
<property name="active">1</property>
227238
<property name="halign">end</property>
@@ -262,10 +273,14 @@
262273
</child>
263274
</object>
264275
<object class="AdwPreferencesPage" id="restore_sessions_page">
276+
<property name="icon-name">view-refresh-symbolic</property>
265277
<property name="use_underline">true</property>
266278
<property name="title" translatable="yes">Restore sessions</property>
267279
<child>
268280
<object class="GtkScrolledWindow">
281+
<property name="margin_bottom">12</property>
282+
<property name="margin_start">12</property>
283+
<property name="margin_end">12</property>
269284
<property name="hscrollbar_policy">never</property>
270285
<child>
271286
<object class="GtkViewport">
@@ -287,7 +302,10 @@
287302
<property name="margin-top">12</property>
288303
<property name="row-spacing">6</property>
289304
<property name="column-spacing">32</property>
290-
<property name="margin-top">12</property><child>
305+
<property name="margin-top">12</property>
306+
<property name="margin_start">6</property>
307+
<property name="margin_end">6</property>
308+
<child>
291309
<object class="GtkLabel">
292310
<property name="hexpand">1</property>
293311
<property name="label" translatable="yes">Restore previous apps and windows at startup</property>
@@ -339,6 +357,9 @@
339357
<property name="margin-bottom">12</property>
340358
<property name="row-spacing">6</property>
341359
<property name="column-spacing">32</property>
360+
<property name="margin_start">6</property>
361+
<property name="margin_top">12</property>
362+
<property name="margin_end">12</property>
342363
<child>
343364
<object class="GtkLabel" id="restore_previous_delay_multi_label">
344365
<property name="hexpand">1</property>
@@ -402,6 +423,8 @@
402423
<property name="margin-bottom">12</property>
403424
<property name="row-spacing">6</property>
404425
<property name="column-spacing">32</property>
426+
<property name="margin_start">6</property>
427+
<property name="margin_end">12</property>
405428
<child>
406429
<object class="GtkLabel" id="restore_at_startup_multi_label">
407430
<property name="hexpand">1</property>
@@ -529,6 +552,8 @@
529552
<property name="margin-top">12</property>
530553
<property name="row-spacing">6</property>
531554
<property name="column-spacing">32</property>
555+
<property name="margin_start">6</property>
556+
<property name="margin_end">12</property>
532557
<child>
533558
<object class="GtkLabel" id="restore_session_interval_label">
534559
<property name="hexpand">1</property>
@@ -584,6 +609,9 @@
584609
<property name="margin-bottom">12</property>
585610
<property name="row-spacing">6</property>
586611
<property name="column-spacing">32</property>
612+
<property name="margin_start">6</property>
613+
<property name="margin_top">6</property>
614+
<property name="margin_end">6</property>
587615
<child>
588616
<object class="GtkLabel" id="autostart_delay_multi_label">
589617
<property name="hexpand">1</property>
@@ -645,6 +673,10 @@
645673
<property name="focusable">1</property>
646674
<property name="child">
647675
<object class="GtkBox">
676+
<property name="margin_start">6</property>
677+
<property name="margin_top">6</property>
678+
<property name="margin_end">6</property>
679+
<property name="margin_bottom">6</property>
648680
<child>
649681
<object class="GtkLabel" id="restore_window_tiling_label">
650682
<property name="label" translatable="yes">Restore window tiling</property>
@@ -668,6 +700,10 @@
668700
<property name="focusable">1</property>
669701
<property name="child">
670702
<object class="GtkBox">
703+
<property name="margin_start">6</property>
704+
<property name="margin_end">6</property>
705+
<property name="margin_top">6</property>
706+
<property name="margin_bottom">6</property>
671707
<child>
672708
<object class="GtkLabel">
673709
<property name="label" translatable="yes">Raise windows together</property>
@@ -701,6 +737,9 @@
701737
<property name="child">
702738
<object class="GtkGrid">
703739
<property name="margin-bottom">12</property>
740+
<property name="margin_start">6</property>
741+
<property name="margin_end">6</property>
742+
<property name="margin_top">6</property>
704743
<property name="row-spacing">6</property>
705744
<property name="column-spacing">32</property>
706745
<child>
@@ -762,7 +801,11 @@
762801
</child>
763802
</object>
764803
<object class="AdwPreferencesPage" id="general_page">
804+
<property name="icon-name">preferences-system-symbolic</property>
765805
<property name="use_underline">true</property>
806+
<property name="margin_bottom">12</property>
807+
<property name="margin_start">12</property>
808+
<property name="margin_end">12</property>
766809
<property name="title" translatable="yes">General</property>
767810
<child>
768811
<object class="GtkBox">
@@ -779,6 +822,8 @@
779822
<property name="focusable">1</property>
780823
<property name="margin-top">12</property>
781824
<property name="margin-bottom">12</property>
825+
<property name="margin_start">6</property>
826+
<property name="margin_end">6</property>
782827
<property name="child">
783828
<object class="GtkBox">
784829
<child>
@@ -823,6 +868,9 @@
823868
<property name="child">
824869
<object class="GtkGrid" id="debugging_mode_multi_grid">
825870
<property name="margin-top">12</property>
871+
<property name="margin-bottom">6</property>
872+
<property name="margin_start">6</property>
873+
<property name="margin_end">6</property>
826874
<property name="row-spacing">6</property>
827875
<property name="column-spacing">32</property>
828876
<child>
@@ -861,6 +909,9 @@
861909
<property name="child">
862910
<object class="GtkGrid" id="verbose_logging_grid">
863911
<property name="margin-bottom">12</property>
912+
<property name="margin-top">12</property>
913+
<property name="margin_start">6</property>
914+
<property name="margin_end">6</property>
864915
<property name="row-spacing">6</property>
865916
<property name="column-spacing">32</property>
866917
<child>

0 commit comments

Comments
 (0)