Skip to content

Commit

Permalink
Fix preferences dialog for GNOME Shell 40 and GTK4
Browse files Browse the repository at this point in the history
  • Loading branch information
sustmi committed May 10, 2021
1 parent b4f2c48 commit 0dabe50
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 54 deletions.
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
"url": "https://github.com/sustmi/gnome-shell-extension-historymanager-prefix-search",
"settings-schema": "org.gnome.shell.extensions.historymanager-prefix-search",
"gettext-domain": "historymanager-prefix-search",
"version": 13
"version": 14
}
6 changes: 3 additions & 3 deletions prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const HistoryManagerPrefixSearchPrefsWidget = GObject.registerClass(
class HistoryManagerPrefixSearchPrefsWidget
extends Gtk.Box {
_init(params) {
this.parent(params);
super._init(params);

this._settings = Convenience.getSettings(PREFS_SCHEMA);

Expand All @@ -39,7 +39,7 @@ class HistoryManagerPrefixSearchPrefsWidget
this._fillData(builder);
this._connectSignals(builder);

this.add(this._main_container);
this.append(this._main_container);
}

_fillData() {
Expand Down Expand Up @@ -74,6 +74,6 @@ class HistoryManagerPrefixSearchPrefsWidget

function buildPrefsWidget() {
let widget = new HistoryManagerPrefixSearchPrefsWidget();
widget.show_all();
widget.show();
return widget;
}
62 changes: 12 additions & 50 deletions prefs.xml
Original file line number Diff line number Diff line change
@@ -1,80 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<requires lib="gtk" version="4.0"/>
<object class="GtkBox" id="main-container">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">20</property>
<property name="margin_right">20</property>
<property name="margin_top">20</property>
<property name="margin_bottom">20</property>
<property name="can-focus">0</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="spacing">20</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">0</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">0</property>
<property name="label" translatable="yes">Control keys:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can-focus">0</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkRadioButton" id="page-keys">
<object class="GtkCheckButton" id="page-keys">
<property name="label" translatable="yes">PageUp + PageDown</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="active">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="arrow-keys">
<object class="GtkCheckButton" id="arrow-keys">
<property name="label" translatable="yes">KeyUp + KeyDown</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
<property name="group">page-keys</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</interface>

0 comments on commit 0dabe50

Please sign in to comment.