[shotwell/wip/gtk4: 37/45] Fix Plugin list
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/wip/gtk4: 37/45] Fix Plugin list
- Date: Wed, 13 Apr 2022 18:21:22 +0000 (UTC)
commit d1e9f93b4dfd45f43ae8aac3bf82049276a797c8
Author: Jens Georg <mail jensge org>
Date: Sun Apr 10 10:38:43 2022 +0200
Fix Plugin list
data/ui/manifest_widget.ui | 48 +++++++++--------------------------------
data/ui/preferences_dialog.ui | 2 +-
src/dialogs/Preferences.vala | 6 ++++--
src/plugins/ManifestWidget.vala | 4 ++--
4 files changed, 17 insertions(+), 43 deletions(-)
---
diff --git a/data/ui/manifest_widget.ui b/data/ui/manifest_widget.ui
index afcf173a..ac65e9ce 100644
--- a/data/ui/manifest_widget.ui
+++ b/data/ui/manifest_widget.ui
@@ -1,55 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
<interface domain="shotwell">
- <requires lib="gtk+" version="3.18"/>
+ <requires lib="gtk" version="4.0"/>
<template class="PluginsManifestWidgetMediator" parent="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkScrolledWindow" id="list_bin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
+ <property name="focusable">1</property>
+ <property name="hexpand">1</property>
+ <property name="vexpand">1</property>
<property name="hscrollbar_policy">never</property>
- <property name="shadow_type">etched-in</property>
<child>
<placeholder/>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
- <child>
- <object class="GtkButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="about_button">
- <property name="label" translatable="yes">_About</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <child type="end">
+ <object class="GtkButton" id="about_button">
+ <property name="label" translatable="yes">_About</property>
+ <property name="focusable">1</property>
+ <property name="receives_default">1</property>
+ <property name="use_underline">1</property>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</template>
</interface>
diff --git a/data/ui/preferences_dialog.ui b/data/ui/preferences_dialog.ui
index 6f8598ed..b7234129 100644
--- a/data/ui/preferences_dialog.ui
+++ b/data/ui/preferences_dialog.ui
@@ -444,7 +444,7 @@
<object class="GtkNotebookPage">
<property name="position">2</property>
<property name="child">
- <object class="GtkBox">
+ <object class="GtkBox" id="plugins_box">
<property name="orientation">vertical</property>
<child>
<placeholder/>
diff --git a/src/dialogs/Preferences.vala b/src/dialogs/Preferences.vala
index d0d09f35..7fdc8a11 100644
--- a/src/dialogs/Preferences.vala
+++ b/src/dialogs/Preferences.vala
@@ -43,7 +43,9 @@ public class PreferencesDialog : Gtk.Dialog {
private GLib.DateTime example_date = new GLib.DateTime.local(2009, 3, 10, 18, 16, 11);
[GtkChild]
private unowned Gtk.CheckButton lowercase;
- //private Plugins.ManifestWidgetMediator plugins_mediator = new Plugins.ManifestWidgetMediator();
+ private Plugins.ManifestWidgetMediator plugins_mediator = new Plugins.ManifestWidgetMediator();
+ [GtkChild]
+ private Gtk.Box plugins_box;
[GtkChild]
private unowned Gtk.ComboBoxText default_raw_developer_combo;
@@ -130,7 +132,7 @@ public class PreferencesDialog : Gtk.Dialog {
lowercase.toggled.connect(on_lowercase_toggled);
- //preferences_notebook.get_nth_page (2).set_child (plugins_mediator);
+ plugins_box.append (plugins_mediator);
populate_preference_options();
diff --git a/src/plugins/ManifestWidget.vala b/src/plugins/ManifestWidget.vala
index 44d0e334..94bd288e 100644
--- a/src/plugins/ManifestWidget.vala
+++ b/src/plugins/ManifestWidget.vala
@@ -110,7 +110,7 @@ private class ManifestListView : Gtk.TreeView {
private Gtk.TreeStore store = new Gtk.TreeStore(Column.N_COLUMNS,
typeof(bool), // ENABLED
typeof(bool), // CAN_ENABLE
- typeof(Gdk.Pixbuf), // ICON
+ typeof(Gdk.Paintable), // ICON
typeof(string), // NAME
typeof(string) // ID
);
@@ -160,7 +160,7 @@ private class ManifestListView : Gtk.TreeView {
Gdk.Paintable? icon = null;
if (extension_point.icon_name != null) {
icon = icon_theme.lookup_by_gicon(
- new ThemedIcon(extension_point.icon_name), ICON_SIZE, 0, Gtk.TextDirection.NONE, 0);
+ new ThemedIcon(extension_point.icon_name), ICON_SIZE, 1, Gtk.TextDirection.NONE, 0);
}
store.set(category_iter, Column.NAME, extension_point.name, Column.CAN_ENABLE, false,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]