[gnome-builder/wip/gtk4-port: 301/1774] plugins/dspy: port dspy plugin to GTK 4
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 301/1774] plugins/dspy: port dspy plugin to GTK 4
- Date: Mon, 11 Jul 2022 22:31:06 +0000 (UTC)
commit 7a9df68969e4b6f8cb9a4614f100563c5bbaa56a
Author: Christian Hergert <chergert redhat com>
Date: Fri Apr 1 03:10:45 2022 -0700
plugins/dspy: port dspy plugin to GTK 4
Minimal port, still needs some work with menus, icons, and connecting
to external buses.
src/plugins/dspy/dspy-plugin.c | 7 +-
src/plugins/dspy/dspy.gresource.xml | 1 -
src/plugins/dspy/gbp-dspy-surface.c | 60 --
src/plugins/dspy/gbp-dspy-surface.h | 33 -
src/plugins/dspy/gbp-dspy-surface.ui | 10 -
src/plugins/dspy/gbp-dspy-workspace.c | 9 +-
src/plugins/dspy/gbp-dspy-workspace.ui | 26 +-
src/plugins/dspy/gtk/menus.ui | 6 +
src/plugins/dspy/libdspy/dspy-connection-button.c | 263 ------
src/plugins/dspy/libdspy/dspy-connection-button.h | 46 --
src/plugins/dspy/libdspy/dspy-connection.c | 491 -----------
src/plugins/dspy/libdspy/dspy-connection.h | 56 --
.../dspy/libdspy/dspy-introspection-model.c | 919 ---------------------
.../dspy/libdspy/dspy-introspection-model.h | 35 -
src/plugins/dspy/libdspy/dspy-method-invocation.c | 585 -------------
src/plugins/dspy/libdspy/dspy-method-invocation.h | 74 --
src/plugins/dspy/libdspy/dspy-method-view.c | 471 -----------
src/plugins/dspy/libdspy/dspy-method-view.h | 46 --
src/plugins/dspy/libdspy/dspy-method-view.ui | 282 -------
src/plugins/dspy/libdspy/dspy-name-marquee.c | 186 -----
src/plugins/dspy/libdspy/dspy-name-marquee.h | 38 -
src/plugins/dspy/libdspy/dspy-name-marquee.ui | 115 ---
src/plugins/dspy/libdspy/dspy-name-row.c | 214 -----
src/plugins/dspy/libdspy/dspy-name-row.h | 36 -
src/plugins/dspy/libdspy/dspy-name-row.ui | 52 --
src/plugins/dspy/libdspy/dspy-name.c | 486 -----------
src/plugins/dspy/libdspy/dspy-name.h | 53 --
src/plugins/dspy/libdspy/dspy-names-model.c | 533 ------------
src/plugins/dspy/libdspy/dspy-names-model.h | 39 -
src/plugins/dspy/libdspy/dspy-node.c | 598 --------------
src/plugins/dspy/libdspy/dspy-private.h | 202 -----
src/plugins/dspy/libdspy/dspy-signature.c | 82 --
src/plugins/dspy/libdspy/dspy-tree-view.c | 327 --------
src/plugins/dspy/libdspy/dspy-tree-view.h | 46 --
src/plugins/dspy/libdspy/dspy-view.c | 615 --------------
src/plugins/dspy/libdspy/dspy-view.h | 41 -
src/plugins/dspy/libdspy/dspy-view.ui | 218 -----
src/plugins/dspy/libdspy/dspy.h | 37 -
src/plugins/dspy/libdspy/gtk/menus.ui | 9 -
.../symbolic/apps/org.gnome.dfeet-symbolic.svg | 81 --
src/plugins/dspy/libdspy/libdspy.gresource.xml | 12 -
src/plugins/dspy/libdspy/meson.build | 34 -
src/plugins/dspy/libdspy/themes/shared.css | 16 -
src/plugins/dspy/meson.build | 1 -
44 files changed, 19 insertions(+), 7472 deletions(-)
---
diff --git a/src/plugins/dspy/dspy-plugin.c b/src/plugins/dspy/dspy-plugin.c
index 781afd2b4..e17bf5dc2 100644
--- a/src/plugins/dspy/dspy-plugin.c
+++ b/src/plugins/dspy/dspy-plugin.c
@@ -20,20 +20,15 @@
#include "config.h"
-#include <libide-gui.h>
-#include <libide-editor.h>
#include <libpeas/peas.h>
-#include <libdspy-resources.h>
+#include <libide-gui.h>
#include "gbp-dspy-application-addin.h"
_IDE_EXTERN void
_gbp_dspy_register_types (PeasObjectModule *module)
{
- g_resources_register (libdspy_get_resource ());
- dzl_application_add_resources (DZL_APPLICATION (IDE_APPLICATION_DEFAULT), "resource:///org/gnome/dspy");
-
peas_object_module_register_extension_type (module,
IDE_TYPE_APPLICATION_ADDIN,
GBP_TYPE_DSPY_APPLICATION_ADDIN);
diff --git a/src/plugins/dspy/dspy.gresource.xml b/src/plugins/dspy/dspy.gresource.xml
index bb738591b..c677ee2a0 100644
--- a/src/plugins/dspy/dspy.gresource.xml
+++ b/src/plugins/dspy/dspy.gresource.xml
@@ -3,7 +3,6 @@
<gresource prefix="/plugins/dspy">
<file>dspy.plugin</file>
<file>gtk/menus.ui</file>
- <file preprocess="xml-stripblanks">gbp-dspy-surface.ui</file>
<file preprocess="xml-stripblanks">gbp-dspy-workspace.ui</file>
</gresource>
</gresources>
diff --git a/src/plugins/dspy/gbp-dspy-workspace.c b/src/plugins/dspy/gbp-dspy-workspace.c
index 233c3d5d5..6c84c982c 100644
--- a/src/plugins/dspy/gbp-dspy-workspace.c
+++ b/src/plugins/dspy/gbp-dspy-workspace.c
@@ -22,14 +22,15 @@
#include "config.h"
-#include "gbp-dspy-surface.h"
+#include <dspy.h>
+
#include "gbp-dspy-workspace.h"
struct _GbpDspyWorkspace
{
IdeWorkspace parent_instance;
IdeHeaderBar *header_bar;
- GbpDspySurface *surface;
+ DspyView *view;
};
G_DEFINE_FINAL_TYPE (GbpDspyWorkspace, gbp_dspy_workspace, IDE_TYPE_WORKSPACE)
@@ -44,7 +45,9 @@ gbp_dspy_workspace_class_init (GbpDspyWorkspaceClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/plugins/dspy/gbp-dspy-workspace.ui");
gtk_widget_class_bind_template_child (widget_class, GbpDspyWorkspace, header_bar);
- gtk_widget_class_bind_template_child (widget_class, GbpDspyWorkspace, surface);
+ gtk_widget_class_bind_template_child (widget_class, GbpDspyWorkspace, view);
+
+ g_type_ensure (DSPY_TYPE_VIEW);
}
static void
diff --git a/src/plugins/dspy/gbp-dspy-workspace.ui b/src/plugins/dspy/gbp-dspy-workspace.ui
index f67f22ff8..7db18dcf8 100644
--- a/src/plugins/dspy/gbp-dspy-workspace.ui
+++ b/src/plugins/dspy/gbp-dspy-workspace.ui
@@ -5,31 +5,17 @@
<property name="default-height">700</property>
<child type="titlebar">
<object class="IdeHeaderBar" id="header_bar">
- <property name="show-close-button">true</property>
- <property name="show-fullscreen-button">false</property>
- <property name="visible">true</property>
+ <property name="menu-id">dspy-workspace-menu</property>
<child type="title">
- <object class="GtkLabel">
- <property name="label" translatable="yes">D-Bus Inspector</property>
- <property name="visible">true</property>
- <style>
- <class name="title"/>
- </style>
+ <object class="AdwWindowTitle">
+ <property name="title" translatable="yes">D-Bus Inspector</property>
</object>
</child>
</object>
</child>
- <child internal-child="surfaces">
- <object class="GtkStack" id="surfaces">
- <property name="visible">true</property>
- <child>
- <object class="GbpDspySurface" id="surface">
- <property name="visible">true</property>
- </object>
- <packing>
- <property name="name">dspy</property>
- </packing>
- </child>
+ <child type="content">
+ <object class="DspyView" id="view">
+ <property name="vexpand">true</property>
</object>
</child>
</template>
diff --git a/src/plugins/dspy/gtk/menus.ui b/src/plugins/dspy/gtk/menus.ui
index e82667e8a..f82d217c9 100644
--- a/src/plugins/dspy/gtk/menus.ui
+++ b/src/plugins/dspy/gtk/menus.ui
@@ -16,4 +16,10 @@
</item>
</section>
</menu>
+ <menu id="dspy-workspace-menu">
+ <item>
+ <attribute name="label" translatable="yes">Close</attribute>
+ <attribute name="action">window.close</attribute>
+ </item>
+ </menu>
</interface>
diff --git a/src/plugins/dspy/meson.build b/src/plugins/dspy/meson.build
index c920c57f0..c755711f4 100644
--- a/src/plugins/dspy/meson.build
+++ b/src/plugins/dspy/meson.build
@@ -5,7 +5,6 @@ libdspy_dep = dependency('dspy-1')
plugins_sources += files([
'dspy-plugin.c',
'gbp-dspy-application-addin.c',
- 'gbp-dspy-surface.c',
'gbp-dspy-workspace.c',
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]