gplugin/gplugin

Remove GTK3 support

19 months ago, Gary Kramlich
5dca05f85b18
Parents 4404fa24f8e9
Children 36ab28b74138
Remove GTK3 support

We no longer have any GTK3 consumers so there's no reason to keep this code
around.

Testing Done:
ran `ninja dist`

Reviewed at https://reviews.imfreedom.org/r/1709/
--- a/INSTALL.md Wed Sep 14 03:17:31 2022 -0500
+++ b/INSTALL.md Thu Sep 15 02:14:36 2022 -0500
@@ -11,7 +11,7 @@
A full build (enabled by default) depends on the following:
- * gtk-3
+ * gtk-4
* python3-dev, python-gi-dev, python3-gi
* libperl-dev, libglib-perl, libglib-object-introspection-perl
* liblua5.1-0-dev, lua-lgi
--- a/README.md Wed Sep 14 03:17:31 2022 -0500
+++ b/README.md Thu Sep 15 02:14:36 2022 -0500
@@ -16,7 +16,8 @@
## History
-GPlugin has a bit of history, you can read more about it in [HISTORY.md](HISTORY.md)
+GPlugin has a bit of history, you can read more about it in
+[HISTORY.md](HISTORY.md)
## Language Support
@@ -26,4 +27,8 @@
## API Reference
The in-development API reference for the development branch can be found at
-[docs.pidgin.im/gplugin/latest](https://docs.pidgin.im/gplugin/latest/).
+[docs.imfreedom.org/gplugin/](https://docs.imfreedom.org/gplugin/) for the core
+library and
+[docs.imfreedom.org/gplugin-gtk4/](https://docs.imfreedom.org/gplugin-gtk4/) for
+the GTK4 integration.
+
--- a/convey.yml Wed Sep 14 03:17:31 2022 -0500
+++ b/convey.yml Thu Sep 15 02:14:36 2022 -0500
@@ -15,7 +15,7 @@
- debian-bookworm-arm64
- debian-bookworm-armhf
- dist
- - fedora-34-amd64
+ - fedora-36-amd64
- fedora-rawhide-amd64
- i18n
- opensuse-tumbleweed-amd64
@@ -23,7 +23,6 @@
- ubuntu-jammy-amd64
- valgrind
- gplugin-docs
- - gplugin-gtk3-docs
- gplugin-gtk4-docs
import:
@@ -69,7 +68,6 @@
type: docker/export
files:
- build-docs/gplugin/reference/gplugin:gplugin-docs
- - build-docs/gplugin-gtk3/reference/gplugin-gtk3:gplugin-gtk3-docs
- build-docs/gplugin-gtk4/reference/gplugin-gtk4:gplugin-gtk4-docs
plans:
@@ -119,8 +117,8 @@
stages:
- tasks: [docs-clean, import, docs-build, docs-export]
- fedora-34-amd64:
- environment: TARGET=fedora-34-amd64
+ fedora-36-amd64:
+ environment: TARGET=fedora-36-amd64
stages:
- tasks: [import, build]
- tasks: [export]
--- a/gplugin-gtk3-viewer/data/gplugin-gtk-viewer.gresource.xml Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gresources>
- <gresource prefix="/org/imfreedom/keep/gplugin/gplugin/viewer/">
- <file compressed="true">window.ui</file>
- </gresource>
-</gresources>
--- a/gplugin-gtk3-viewer/data/window.ui Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
-<interface>
- <requires lib="gtk+" version="3.20"/>
- <requires lib="gplugin-gtk" version="0.28"/>
- <template class="viewer" parent="GtkWindow">
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="title" translatable="yes">GPlugin Viewer</property>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkScrolledWindow">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GPluginGtkView" id="view">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="headers_clickable">False</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection"/>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GPluginGtkPluginInfo" id="info">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child type="label">
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">__glade_unnamed_5</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </template>
-</interface>
--- a/gplugin-gtk3-viewer/gplugin-gtk-viewer-window.c Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#include "gplugin-gtk-viewer-window.h"
-
-#include <gtk/gtk.h>
-
-struct _GPluginGtkViewerWindow {
- GtkWindow parent;
-};
-
-G_DEFINE_TYPE(
- GPluginGtkViewerWindow,
- gplugin_gtk_viewer_window,
- GTK_TYPE_WINDOW)
-
-/******************************************************************************
- * GObject Stuff
- *****************************************************************************/
-static void
-gplugin_gtk_viewer_window_init(GPluginGtkViewerWindow *window)
-{
- gtk_widget_init_template(GTK_WIDGET(window));
-}
-
-static void
-gplugin_gtk_viewer_window_class_init(GPluginGtkViewerWindowClass *klass)
-{
- gtk_widget_class_set_template_from_resource(
- GTK_WIDGET_CLASS(klass),
- "/org/imfreedom/keep/gplugin/gplugin/viewer/window.ui");
-}
-
-/******************************************************************************
- * Public API
- *****************************************************************************/
-GtkWidget *
-gplugin_gtk_viewer_window_new(void)
-{
- return GTK_WIDGET(g_object_new(GPLUGIN_GTK_VIEWER_TYPE_WINDOW, NULL));
-}
--- a/gplugin-gtk3-viewer/gplugin-gtk-viewer-window.h Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#ifndef GPLUGIN_GTK_VIEWER_WINDOW_H
-#define GPLUGIN_GTK_VIEWER_WINDOW_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <gtk/gtk.h>
-
-#define GPLUGIN_GTK_VIEWER_TYPE_WINDOW (gplugin_gtk_viewer_window_get_type())
-G_DECLARE_FINAL_TYPE(
- GPluginGtkViewerWindow,
- gplugin_gtk_viewer_window,
- GPLUGIN_GTK_VIEWER,
- WINDOW,
- GtkWindow)
-
-G_BEGIN_DECLS
-
-GtkWidget *gplugin_gtk_viewer_window_new(void);
-
-G_END_DECLS
-
-#endif /* GPLUGIN_GTK_VIEWER_WINDOW_H */
--- a/gplugin-gtk3-viewer/gplugin-gtk-viewer.c Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <gtk/gtk.h>
-
-#include <gplugin.h>
-#include <gplugin-gtk.h>
-
-/******************************************************************************
- * Globals
- *****************************************************************************/
-static gboolean show_internal = FALSE;
-static gboolean version_only = FALSE;
-
-/******************************************************************************
- * Callbacks
- *****************************************************************************/
-static gboolean
-window_closed_cb(
- G_GNUC_UNUSED GtkWidget *w,
- G_GNUC_UNUSED GdkEvent *e,
- G_GNUC_UNUSED gpointer d)
-{
- gtk_main_quit();
-
- return FALSE;
-}
-
-static void
-selection_changed_cb(GtkTreeSelection *sel, gpointer data)
-{
- GPluginGtkPluginInfo *info = GPLUGIN_GTK_PLUGIN_INFO(data);
- GPluginPlugin *plugin = NULL;
- GtkTreeModel *model = NULL;
- GtkTreeIter iter;
-
- if(gtk_tree_selection_get_selected(sel, &model, &iter)) {
- gtk_tree_model_get(
- model,
- &iter,
- GPLUGIN_GTK_STORE_PLUGIN_COLUMN,
- &plugin,
- -1);
- }
-
- gplugin_gtk_plugin_info_set_plugin(info, plugin);
-}
-
-/******************************************************************************
- * Helpers
- *****************************************************************************/
-static gboolean
-internal_cb(
- G_GNUC_UNUSED const gchar *n,
- G_GNUC_UNUSED const gchar *v,
- G_GNUC_UNUSED gpointer d,
- G_GNUC_UNUSED GError **e)
-{
- show_internal = TRUE;
-
- return TRUE;
-}
-
-static gboolean
-version_cb(
- G_GNUC_UNUSED const gchar *n,
- G_GNUC_UNUSED const gchar *v,
- G_GNUC_UNUSED gpointer d,
- G_GNUC_UNUSED GError **e)
-{
- version_only = TRUE;
-
- printf("gplugin-gtk-viewer %s\n", GPLUGIN_VERSION);
-
- return TRUE;
-}
-
-static GtkWidget *
-create_window(void)
-{
- GtkWidget *window = NULL, *grid = NULL, *sw = NULL;
- GtkWidget *view = NULL, *info = NULL;
- GtkTreeSelection *sel = NULL;
-
- window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
- gtk_window_set_title(GTK_WINDOW(window), "GPlugin Viewer");
- gtk_container_set_border_width(GTK_CONTAINER(window), 12);
- g_signal_connect(
- G_OBJECT(window),
- "delete-event",
- G_CALLBACK(window_closed_cb),
- NULL);
-
- grid = gtk_grid_new();
- gtk_grid_set_row_homogeneous(GTK_GRID(grid), TRUE);
- gtk_grid_set_column_spacing(GTK_GRID(grid), 12);
- gtk_container_add(GTK_CONTAINER(window), grid);
-
- sw = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy(
- GTK_SCROLLED_WINDOW(sw),
- GTK_POLICY_NEVER,
- GTK_POLICY_AUTOMATIC);
- gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
- gtk_grid_attach(GTK_GRID(grid), sw, 0, 0, 1, 1);
-
- view = gplugin_gtk_view_new();
- gplugin_gtk_view_set_show_internal(GPLUGIN_GTK_VIEW(view), show_internal);
- gtk_container_add(GTK_CONTAINER(sw), view);
-
- info = gplugin_gtk_plugin_info_new();
- gtk_grid_attach(GTK_GRID(grid), info, 1, 0, 1, 1);
-
- sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
- g_signal_connect(
- G_OBJECT(sel),
- "changed",
- G_CALLBACK(selection_changed_cb),
- info);
-
- return window;
-}
-
-/******************************************************************************
- * Main Stuff
- *****************************************************************************/
-/* clang-format off */
-static GOptionEntry entries[] = {
- {
- "internal", 'i', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- internal_cb, "Show internal plugins",
- NULL,
- }, {
- "version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
- version_cb, "Display the version and exit",
- NULL,
- }, {
- NULL, 0, 0, 0, NULL, NULL, NULL,
- },
-};
-/* clang-format on */
-
-gint
-main(gint argc, gchar **argv)
-{
- GPluginManager *manager = NULL;
- GError *error = NULL;
- GOptionContext *ctx = NULL;
- GtkWidget *window = NULL;
-
- ctx = g_option_context_new("");
- g_option_context_add_main_entries(ctx, entries, NULL);
- g_option_context_add_group(ctx, gtk_get_option_group(TRUE));
- g_option_context_add_group(ctx, gplugin_get_option_group());
- g_option_context_parse(ctx, &argc, &argv, &error);
- g_option_context_free(ctx);
-
- if(error) {
- fprintf(stderr, "%s\n", error->message);
-
- g_error_free(error);
-
- gplugin_uninit();
-
- return EXIT_FAILURE;
- }
-
- if(version_only) {
- return 0;
- }
-
- gtk_init(&argc, &argv);
-
- gplugin_init(GPLUGIN_CORE_FLAGS_NONE);
-
- manager = gplugin_manager_get_default();
-
- gplugin_manager_prepend_paths_from_environment(
- manager,
- "GPLUGIN_PLUGIN_PATH");
-
- gplugin_manager_refresh(manager);
-
- /* now create and show the window */
- window = create_window();
- gtk_widget_show_all(window);
-
- gtk_main();
-
- gplugin_uninit();
-
- return 0;
-}
--- a/gplugin-gtk3-viewer/meson.build Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-if get_option('gtk3')
-
-if not get_option('install-gplugin-gtk3-viewer')
-summary('gplugin-gtk3-viewer',
- 'You have disabled installation of gplugin-gtk-viewer which is a ' +
- 'very useful diagnostics tool.',
- section : 'Warnings')
-endif
-
-gplugin_gtk3_viewer_resources = gnome.compile_resources(
- 'gplugin-gtk-viewer-resources',
- 'data/gplugin-gtk-viewer.gresource.xml',
- c_name: 'gplugin_gtk_viewer',
- source_dir: 'data')
-
-gplugin_gtk3_viewer = executable('gplugin-gtk3-viewer',
- 'gplugin-gtk-viewer.c',
- 'gplugin-gtk-viewer-window.c',
- 'gplugin-gtk-viewer-window.h',
- dependencies : [gplugin_dep, gplugin_gtk3_dep],
- install : get_option('install-gplugin-gtk3-viewer')
-)
-
-if get_option('help2man')
- gplugin_gtk_viewer_man = custom_target('gplugin-gtk3-viewer.1',
- command : [help2man,
- '--name=View installed plugins', '--section=1',
- '--help-option=--help-all', '--no-info',
- '--output', '@OUTPUT@',
- gplugin_gtk3_viewer],
- output : 'gplugin-gtk3-viewer.1',
- install : get_option('install-gplugin-gtk3-viewer'),
- install_dir : get_option('mandir') / 'man1')
-endif
-
-endif
--- a/gplugin-gtk3/data/gplugin-gtk.gresource.xml Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<gresources>
- <gresource prefix="/org/imfreedom/keep/gplugin/gplugin-gtk/">
- <file compressed="true">plugin-info.ui</file>
- </gresource>
-</gresources>
--- a/gplugin-gtk3/data/plugin-info.ui Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,582 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.2 -->
-<interface>
- <requires lib="gtk+" version="3.10"/>
- <template class="GPluginGtkPluginInfo" parent="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkLabel" id="name">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- <attribute name="scale" value="2"/>
- </attributes>
- </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="spacing">6</property>
- <child>
- <object class="GtkLabel" id="version_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Version</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="version">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="authors_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Authors</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="authors_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- </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">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="website_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Website</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="website">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="use_markup">True</property>
- <property name="track_visited_links">False</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">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="summary_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Summary</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="summary">
- <property name="visible">True</property>
- <property name="can_focus">False</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">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="description_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Description</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="description">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="wrap">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="dependencies_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Dependencies</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="dependencies_box">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- </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">6</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="error_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Error</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="error">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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">7</property>
- </packing>
- </child>
- <child>
- <object class="GtkExpander">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label_fill">True</property>
- <signal name="activate" handler="gplugin_gtk_plugin_info_expander_activate" object="GPluginGtkPluginInfo" swapped="no"/>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="id_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">ID</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="id">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="filename_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Filename</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="filename">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="abi_version_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">ABI Version</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="abi_version">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="loader_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Loader</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="loader">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="internal_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Internal</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="internal">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="load_on_query_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Load on Query</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="load_on_query">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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">5</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="expander">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">More</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">8</property>
- </packing>
- </child>
- </template>
- <object class="GtkSizeGroup" id="size_group">
- <widgets>
- <widget name="version_label"/>
- <widget name="authors_label"/>
- <widget name="website_label"/>
- <widget name="summary_label"/>
- <widget name="description_label"/>
- <widget name="dependencies_label"/>
- <widget name="id_label"/>
- <widget name="filename_label"/>
- <widget name="abi_version_label"/>
- <widget name="loader_label"/>
- <widget name="internal_label"/>
- <widget name="load_on_query_label"/>
- <widget name="error_label"/>
- </widgets>
- </object>
-</interface>
--- a/gplugin-gtk3/gplugin-gtk-plugin-info.c Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,485 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include <glib/gi18n-lib.h>
-
-#include <gplugin.h>
-
-#include <gplugin-gtk-plugin-info.h>
-
-/**
- * GPluginGtkPluginInfo:
- *
- * A widget that displays a [class@GPlugin.PluginInfo] in a user friendly way.
- */
-
-/******************************************************************************
- * Structs
- *****************************************************************************/
-struct _GPluginGtkPluginInfo {
- GtkBox parent;
-
- GPluginPlugin *plugin;
- gulong signal_id;
-
- GtkWidget *name;
- GtkWidget *version;
- GtkWidget *authors_box;
- GtkWidget *website;
- GtkWidget *summary;
- GtkWidget *description;
- GtkWidget *dependencies_box;
- GtkWidget *error;
- GtkWidget *expander;
- GtkWidget *id;
- GtkWidget *filename;
- GtkWidget *abi_version;
- GtkWidget *loader;
- GtkWidget *internal;
- GtkWidget *load_on_query;
-};
-
-/*****************************************************************************s
- * Enums
- *****************************************************************************/
-enum {
- PROP_ZERO,
- PROP_PLUGIN,
- N_PROPERTIES,
-};
-static GParamSpec *properties[N_PROPERTIES] = {
- NULL,
-};
-
-G_DEFINE_TYPE(GPluginGtkPluginInfo, gplugin_gtk_plugin_info, GTK_TYPE_BOX)
-
-/******************************************************************************
- * Callbacks
- *****************************************************************************/
-static void
-gplugin_gtk_plugin_info_expander_activate(
- GtkExpander *expander,
- G_GNUC_UNUSED gpointer data)
-{
- if(gtk_expander_get_expanded(expander))
- gtk_expander_set_label(expander, "More");
- else
- gtk_expander_set_label(expander, "Less");
-}
-
-/******************************************************************************
- * Helpers
- *****************************************************************************/
-static void
-_gplugin_gtk_plugin_info_refresh(GPluginGtkPluginInfo *info)
-{
- GtkWidget *widget = NULL;
- GError *error = NULL;
- GList *children = NULL, *iter = NULL;
- gchar *markup = NULL;
- gchar *name = NULL, *version = NULL, *website = NULL;
- gchar *summary = NULL, *description = NULL, *id = NULL, *abi_version = NULL;
- gchar *loader = NULL;
- gchar **authors = NULL;
- gchar **dependencies = NULL;
- guint32 abi_version_uint;
- gboolean loq = FALSE, internal = FALSE;
- const gchar *filename = NULL;
-
- /* remove all the children from the authors box */
- children = gtk_container_get_children(GTK_CONTAINER(info->authors_box));
- for(iter = children; iter; iter = iter->next)
- gtk_widget_destroy(GTK_WIDGET(iter->data));
- g_list_free(children);
-
- /* remove all the children from the dependencies box */
- children =
- gtk_container_get_children(GTK_CONTAINER(info->dependencies_box));
- for(iter = children; iter; iter = iter->next)
- gtk_widget_destroy(GTK_WIDGET(iter->data));
- g_list_free(children);
-
- /* now get the info if we can */
- if(GPLUGIN_IS_PLUGIN(info->plugin)) {
- GPluginPluginInfo *plugin_info = gplugin_plugin_get_info(info->plugin);
- GPluginLoader *plugin_loader = gplugin_plugin_get_loader(info->plugin);
-
- filename = gplugin_plugin_get_filename(info->plugin);
- error = gplugin_plugin_get_error(info->plugin);
-
- if(plugin_loader && GPLUGIN_IS_LOADER(plugin_loader)) {
- const char *loader_name = G_OBJECT_TYPE_NAME(plugin_loader);
- loader = g_strdup(loader_name);
- g_object_unref(G_OBJECT(plugin_loader));
- }
-
- /* clang-format off */
- g_object_get(
- G_OBJECT(plugin_info),
- "abi_version", &abi_version_uint,
- "authors", &authors,
- "summary", &summary,
- "description", &description,
- "dependencies", &dependencies,
- "id", &id,
- "internal", &internal,
- "load-on-query", &loq,
- "name", &name,
- "version", &version,
- "website", &website,
- NULL);
- /* clang-format on */
-
- /* fanagle the plugin name */
- markup = g_markup_printf_escaped(
- "<span font_size=\"large\" "
- "font_weight=\"bold\">%s</span>",
- (name) ? name : "Unnamed");
- g_free(name);
- name = markup;
-
- /* fanagle the website */
- if(website) {
- markup = g_markup_printf_escaped(
- "<a href=\"%s\">%s</a>",
- website,
- website);
- g_free(website);
- website = markup;
- }
-
- /* fanagle the abi_version */
- abi_version = g_strdup_printf("%08x", abi_version_uint);
-
- g_object_unref(G_OBJECT(plugin_info));
- }
-
- gtk_label_set_markup(GTK_LABEL(info->name), (name) ? name : "Unnamed");
- gtk_label_set_text(GTK_LABEL(info->version), (version) ? version : "");
- gtk_label_set_markup(GTK_LABEL(info->website), (website) ? website : "");
- gtk_label_set_text(GTK_LABEL(info->summary), (summary) ? summary : "");
- gtk_label_set_text(
- GTK_LABEL(info->description),
- (description) ? description : "");
- gtk_label_set_text(GTK_LABEL(info->id), (id) ? id : "");
- gtk_label_set_text(
- GTK_LABEL(info->error),
- (error) ? error->message : "(none)");
- gtk_label_set_text(GTK_LABEL(info->filename), (filename) ? filename : "");
- gtk_label_set_text(
- GTK_LABEL(info->abi_version),
- (abi_version) ? abi_version : "");
- gtk_label_set_text(GTK_LABEL(info->loader), (loader) ? loader : "Unknown");
- gtk_label_set_text(GTK_LABEL(info->internal), (internal) ? "Yes" : "No");
- gtk_label_set_text(GTK_LABEL(info->load_on_query), (loq) ? "Yes" : "No");
-
- /* set the authors */
- if(authors) {
- gint i = 0;
-
- for(i = 0; authors[i]; i++) {
- widget = gtk_label_new(authors[i]);
- gtk_widget_set_halign(widget, GTK_ALIGN_START);
- gtk_widget_set_valign(widget, GTK_ALIGN_START);
- gtk_box_pack_start(
- GTK_BOX(info->authors_box),
- widget,
- TRUE,
- TRUE,
- 0);
- gtk_widget_show(widget);
- }
- }
-
- /* set the dependencies */
- if(dependencies) {
- gint i = 0;
-
- for(i = 0; dependencies[i]; i++) {
- widget = gtk_label_new(dependencies[i]);
- gtk_widget_set_halign(widget, GTK_ALIGN_START);
- gtk_widget_set_valign(widget, GTK_ALIGN_START);
- gtk_box_pack_start(
- GTK_BOX(info->dependencies_box),
- widget,
- TRUE,
- TRUE,
- 0);
- gtk_widget_show(widget);
- }
- } else {
- widget = gtk_label_new(_("(none)"));
- gtk_box_pack_start(
- GTK_BOX(info->dependencies_box),
- widget,
- TRUE,
- TRUE,
- 0);
- gtk_widget_show(widget);
- }
-
- g_clear_error(&error);
- g_free(loader);
- g_free(abi_version);
- g_strfreev(authors);
- g_free(summary);
- g_free(description);
- g_strfreev(dependencies);
- g_free(id);
- g_free(name);
- g_free(version);
- g_free(website);
-}
-
-/******************************************************************************
- * Callbacks
- *****************************************************************************/
-static void
-gplugin_gtk_plugin_info_state_cb(
- G_GNUC_UNUSED GObject *obj,
- G_GNUC_UNUSED GParamSpec *pspec,
- gpointer data)
-{
- _gplugin_gtk_plugin_info_refresh(GPLUGIN_GTK_PLUGIN_INFO(data));
-}
-
-/******************************************************************************
- * GObject Stuff
- *****************************************************************************/
-static void
-gplugin_gtk_plugin_info_set_property(
- GObject *obj,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GPluginGtkPluginInfo *info = GPLUGIN_GTK_PLUGIN_INFO(obj);
-
- switch(prop_id) {
- case PROP_PLUGIN:
- gplugin_gtk_plugin_info_set_plugin(info, g_value_get_object(value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, prop_id, pspec);
- break;
- }
-}
-
-static void
-gplugin_gtk_plugin_info_get_property(
- GObject *obj,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GPluginGtkPluginInfo *info = GPLUGIN_GTK_PLUGIN_INFO(obj);
-
- switch(prop_id) {
- case PROP_PLUGIN:
- g_value_set_object(value, gplugin_gtk_plugin_info_get_plugin(info));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, prop_id, pspec);
- break;
- }
-}
-
-static void
-gplugin_gtk_plugin_info_finalize(GObject *obj)
-{
- GPluginGtkPluginInfo *info = GPLUGIN_GTK_PLUGIN_INFO(obj);
-
- if(info->signal_id != 0 && GPLUGIN_IS_PLUGIN(info->plugin)) {
- g_signal_handler_disconnect(G_OBJECT(info->plugin), info->signal_id);
- }
-
- g_clear_object(&info->plugin);
-
- G_OBJECT_CLASS(gplugin_gtk_plugin_info_parent_class)->finalize(obj);
-}
-
-static void
-gplugin_gtk_plugin_info_init(GPluginGtkPluginInfo *info)
-{
- gtk_widget_init_template(GTK_WIDGET(info));
-
- info->signal_id = 0;
-}
-
-static void
-gplugin_gtk_plugin_info_class_init(GPluginGtkPluginInfoClass *klass)
-{
- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
- GObjectClass *obj_class = G_OBJECT_CLASS(klass);
-
- obj_class->get_property = gplugin_gtk_plugin_info_get_property;
- obj_class->set_property = gplugin_gtk_plugin_info_set_property;
- obj_class->finalize = gplugin_gtk_plugin_info_finalize;
-
- /* properties */
- properties[PROP_PLUGIN] = g_param_spec_object(
- "plugin",
- "plugin",
- "The GPluginPlugin who's info should be displayed",
- G_TYPE_OBJECT,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
-
- /* template stuff */
- gtk_widget_class_set_template_from_resource(
- widget_class,
- "/org/imfreedom/keep/gplugin/gplugin-gtk/plugin-info.ui");
-
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- name);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- version);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- authors_box);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- website);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- summary);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- description);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- dependencies_box);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- error);
-
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- expander);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- id);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- filename);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- abi_version);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- loader);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- internal);
- gtk_widget_class_bind_template_child(
- widget_class,
- GPluginGtkPluginInfo,
- load_on_query);
-
- gtk_widget_class_bind_template_callback(
- widget_class,
- gplugin_gtk_plugin_info_expander_activate);
-}
-
-/******************************************************************************
- * API
- *****************************************************************************/
-
-/**
- * gplugin_gtk_plugin_info_new:
- *
- * Create a new widget which can be used to display info about a
- * [iface@GPlugin.Plugin].
- *
- * Returns: (transfer full): The new display widget.
- */
-GtkWidget *
-gplugin_gtk_plugin_info_new(void)
-{
- return GTK_WIDGET(g_object_new(GPLUGIN_GTK_TYPE_PLUGIN_INFO, NULL));
-}
-
-/**
- * gplugin_gtk_plugin_info_set_plugin:
- * @info: The widget instance.
- * @plugin: The plugin instance.
- *
- * Sets the plugin that should be displayed.
- *
- * A @plugin value of %NULL will clear the widget.
- */
-void
-gplugin_gtk_plugin_info_set_plugin(
- GPluginGtkPluginInfo *info,
- GPluginPlugin *plugin)
-{
- g_return_if_fail(GPLUGIN_GTK_IS_PLUGIN_INFO(info));
-
- if(info->signal_id != 0 && GPLUGIN_IS_PLUGIN(info->plugin)) {
- g_signal_handler_disconnect(info->plugin, info->signal_id);
- info->signal_id = 0;
- }
-
- if(g_set_object(&info->plugin, plugin) && GPLUGIN_IS_PLUGIN(plugin)) {
- _gplugin_gtk_plugin_info_refresh(info);
-
- /* Connect a signal to refresh when the plugin's state changes. We
- * can't use g_signal_connect_object because the plugin object never
- * gets destroyed, as the manager and the loader both keep a reference
- * to it and the GPluginGtkPluginInfo widget is reused for all plugins
- * so that all means that we just have to manage the callback
- * ourselves.
- */
- info->signal_id = g_signal_connect(
- G_OBJECT(plugin),
- "notify::state",
- G_CALLBACK(gplugin_gtk_plugin_info_state_cb),
- info);
- }
-}
-
-/**
- * gplugin_gtk_plugin_info_get_plugin:
- * @info: The widget instance.
- *
- * Returns the plugin that's being displayed.
- *
- * Returns: (transfer full): The plugin that's being displayed.
- */
-GPluginPlugin *
-gplugin_gtk_plugin_info_get_plugin(GPluginGtkPluginInfo *info)
-{
- g_return_val_if_fail(GPLUGIN_GTK_IS_PLUGIN_INFO(info), NULL);
-
- return (info->plugin) ? GPLUGIN_PLUGIN(g_object_ref(G_OBJECT(info->plugin)))
- : NULL;
-}
--- a/gplugin-gtk3/gplugin-gtk-plugin-info.h Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && \
- !defined(GPLUGIN_GTK_COMPILATION)
-#error "only <gplugin-gtk.h> may be included directly"
-#endif
-
-#ifndef GPLUGIN_GTK_PLUGIN_INFO_H
-#define GPLUGIN_GTK_PLUGIN_INFO_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <gtk/gtk.h>
-
-#include <gplugin.h>
-
-G_BEGIN_DECLS
-
-#define GPLUGIN_GTK_TYPE_PLUGIN_INFO (gplugin_gtk_plugin_info_get_type())
-G_DECLARE_FINAL_TYPE(
- GPluginGtkPluginInfo,
- gplugin_gtk_plugin_info,
- GPLUGIN_GTK,
- PLUGIN_INFO,
- GtkBox)
-
-GtkWidget *gplugin_gtk_plugin_info_new(void);
-
-void gplugin_gtk_plugin_info_set_plugin(
- GPluginGtkPluginInfo *info,
- GPluginPlugin *plugin);
-GPluginPlugin *gplugin_gtk_plugin_info_get_plugin(GPluginGtkPluginInfo *info);
-
-G_END_DECLS
-
-#endif /* GPLUGIN_GTK_PLUGIN_INFO_H */
--- a/gplugin-gtk3/gplugin-gtk-store.c Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include <gplugin.h>
-
-#include <gplugin-gtk-store.h>
-
-/**
- * GPluginGtkStoreColumns:
- * @GPLUGIN_GTK_STORE_ENABLED_COLUMN: The disabled column. This is used when a
- * plugin is in a state that can't be
- * changed. So the row should be disabled.
- * @GPLUGIN_GTK_STORE_LOADED_COLUMN: The loaded column.
- * @GPLUGIN_GTK_STORE_PLUGIN_COLUMN: The plugin column.
- * @GPLUGIN_GTK_STORE_MARKUP_COLUMN: The markup column.
- *
- * An enum declaring the columns in a [class@GPluginGtk3.Store].
- */
-
-/**
- * GPluginGtkStore:
- *
- * A [class@Gtk.ListStore] that contains all of the known plugins in GPlugin.
- */
-
-struct _GPluginGtkStore {
- GtkListStore parent;
-};
-
-G_DEFINE_TYPE(GPluginGtkStore, gplugin_gtk_store, GTK_TYPE_LIST_STORE)
-
-/******************************************************************************
- * Globals
- *****************************************************************************/
-static const GType column_types[] = {
- G_TYPE_BOOLEAN,
- G_TYPE_BOOLEAN,
- G_TYPE_OBJECT,
- G_TYPE_STRING,
-};
-
-G_STATIC_ASSERT(G_N_ELEMENTS(column_types) == GPLUGIN_GTK_STORE_N_COLUMNS);
-
-/******************************************************************************
- * Helpers
- *****************************************************************************/
-static void
-gplugin_gtk_store_add_plugin(GPluginGtkStore *store, GPluginPlugin *plugin)
-{
- GtkTreeIter iter;
- GPluginPluginInfo *info = gplugin_plugin_get_info(plugin);
- GPluginPluginState state = gplugin_plugin_get_state(plugin);
- GString *str = g_string_new("");
- gchar *name = NULL, *summary = NULL;
- gboolean loaded = FALSE, enabled = TRUE;
-
- /* clang-format off */
- g_object_get(
- G_OBJECT(info),
- "name", &name,
- "summary", &summary,
- NULL);
- /* clang-format on */
-
- g_string_append_printf(
- str,
- "<b>%s</b>\n",
- (name) ? name : "<i>Unnamed</i>");
- g_string_append_printf(
- str,
- "%s",
- (summary) ? summary : "<i>No Summary</i>");
-
- g_free(name);
- g_free(summary);
-
- loaded = (state == GPLUGIN_PLUGIN_STATE_LOADED);
- if(state == GPLUGIN_PLUGIN_STATE_UNLOAD_FAILED) {
- loaded = TRUE;
- enabled = FALSE;
- }
-
- gtk_list_store_append(GTK_LIST_STORE(store), &iter);
- gtk_list_store_set(
- GTK_LIST_STORE(store),
- &iter,
- GPLUGIN_GTK_STORE_LOADED_COLUMN,
- loaded,
- GPLUGIN_GTK_STORE_ENABLED_COLUMN,
- enabled,
- GPLUGIN_GTK_STORE_PLUGIN_COLUMN,
- g_object_ref(plugin),
- GPLUGIN_GTK_STORE_MARKUP_COLUMN,
- str->str,
- -1);
-
- g_string_free(str, TRUE);
- g_object_unref(G_OBJECT(info));
-}
-
-static void
-gplugin_gtk_store_add_plugin_by_id(GPluginGtkStore *store, const gchar *id)
-{
- GPluginManager *manager = NULL;
- GSList *plugins = NULL, *l = NULL;
-
- manager = gplugin_manager_get_default();
-
- plugins = gplugin_manager_find_plugins(manager, id);
- for(l = plugins; l; l = l->next)
- gplugin_gtk_store_add_plugin(store, GPLUGIN_PLUGIN(l->data));
- g_slist_free_full(plugins, g_object_unref);
-}
-
-static gboolean
-gplugin_gtk_store_update_plugin_state_cb(
- GtkTreeModel *model,
- G_GNUC_UNUSED GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer data)
-{
- GPluginPlugin *plugin_a = GPLUGIN_PLUGIN(data);
- GPluginPlugin *plugin_b = NULL;
- gboolean ret = FALSE;
-
- gtk_tree_model_get(
- model,
- iter,
- GPLUGIN_GTK_STORE_PLUGIN_COLUMN,
- &plugin_b,
- -1);
-
- if(plugin_a == plugin_b) {
- GPluginPluginState state = gplugin_plugin_get_state(plugin_a);
- gboolean loaded = (state == GPLUGIN_PLUGIN_STATE_LOADED);
- gboolean enabled = TRUE;
-
- if(state == GPLUGIN_PLUGIN_STATE_UNLOAD_FAILED) {
- loaded = TRUE;
- enabled = FALSE;
- }
-
- gtk_list_store_set(
- GTK_LIST_STORE(model),
- iter,
- GPLUGIN_GTK_STORE_LOADED_COLUMN,
- loaded,
- GPLUGIN_GTK_STORE_ENABLED_COLUMN,
- enabled,
- -1);
-
- /* tell gplugin_gtk_store_update_plugin_state that we're done */
- ret = TRUE;
- }
-
- g_object_unref(G_OBJECT(plugin_b));
-
- return ret;
-}
-
-static void
-gplugin_gtk_store_update_plugin_state(
- GPluginGtkStore *store,
- GPluginPlugin *plugin)
-{
- gtk_tree_model_foreach(
- GTK_TREE_MODEL(store),
- gplugin_gtk_store_update_plugin_state_cb,
- plugin);
-}
-
-/******************************************************************************
- * Callbacks
- *****************************************************************************/
-static void
-gplugin_gtk_store_plugin_loaded_cb(
- G_GNUC_UNUSED GObject *manager,
- GPluginPlugin *plugin,
- gpointer data)
-{
- gplugin_gtk_store_update_plugin_state(GPLUGIN_GTK_STORE(data), plugin);
-}
-
-static void
-gplugin_gtk_store_plugin_unloaded_cb(
- G_GNUC_UNUSED GObject *manager,
- GPluginPlugin *plugin,
- gpointer data)
-{
- gplugin_gtk_store_update_plugin_state(GPLUGIN_GTK_STORE(data), plugin);
-}
-
-static void
-gplugin_gtk_store_plugin_unload_failed_cb(
- G_GNUC_UNUSED GObject *manager,
- GPluginPlugin *plugin,
- gpointer data)
-{
- gplugin_gtk_store_update_plugin_state(GPLUGIN_GTK_STORE(data), plugin);
-}
-
-/******************************************************************************
- * GObject Implementation
- *****************************************************************************/
-static void
-gplugin_gtk_store_constructed(GObject *obj)
-{
- GPluginManager *manager = NULL;
- GList *l, *ids = NULL;
-
- G_OBJECT_CLASS(gplugin_gtk_store_parent_class)->constructed(obj);
-
- manager = gplugin_manager_get_default();
-
- ids = gplugin_manager_list_plugins(manager);
- for(l = ids; l; l = l->next)
- gplugin_gtk_store_add_plugin_by_id(
- GPLUGIN_GTK_STORE(obj),
- (const gchar *)l->data);
- g_list_free(ids);
-
- g_signal_connect_object(
- manager,
- "loaded-plugin",
- G_CALLBACK(gplugin_gtk_store_plugin_loaded_cb),
- obj,
- 0);
- g_signal_connect_object(
- manager,
- "unloaded-plugin",
- G_CALLBACK(gplugin_gtk_store_plugin_unloaded_cb),
- obj,
- 0);
- g_signal_connect_object(
- manager,
- "unload-plugin-failed",
- G_CALLBACK(gplugin_gtk_store_plugin_unload_failed_cb),
- obj,
- 0);
-}
-
-static void
-gplugin_gtk_store_init(GPluginGtkStore *store)
-{
- GType *types = (GType *)gplugin_gtk_store_get_column_types();
-
- gtk_list_store_set_column_types(
- GTK_LIST_STORE(store),
- GPLUGIN_GTK_STORE_N_COLUMNS,
- types);
-}
-
-static void
-gplugin_gtk_store_class_init(GPluginGtkStoreClass *klass)
-{
- GObjectClass *obj_class = G_OBJECT_CLASS(klass);
-
- obj_class->constructed = gplugin_gtk_store_constructed;
-}
-
-/******************************************************************************
- * API
- *****************************************************************************/
-
-/**
- * gplugin_gtk_store_new:
- *
- * Create a new #GPluginGtkStore which is a prepopulated [class@Gtk.TreeStore].
- *
- * Returns: (transfer full): A new list store prepopulated with all of the
- * plugins.
- */
-GPluginGtkStore *
-gplugin_gtk_store_new(void)
-{
- return GPLUGIN_GTK_STORE(g_object_new(GPLUGIN_GTK_TYPE_STORE, NULL));
-}
-
-/**
- * gplugin_gtk_store_get_column_types:
- *
- * Returns the columns that #GPluginGtkStore's will use.
- *
- * Returns: (transfer none): A list of [type@GLib.Type]'s for the columns that
- * the store will use.
- */
-const GType *
-gplugin_gtk_store_get_column_types(void)
-{
- return column_types;
-}
--- a/gplugin-gtk3/gplugin-gtk-store.h Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && \
- !defined(GPLUGIN_GTK_COMPILATION)
-#error "only <gplugin-gtk.h> may be included directly"
-#endif
-
-#ifndef GPLUGIN_GTK_STORE_H
-#define GPLUGIN_GTK_STORE_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-#define GPLUGIN_GTK_TYPE_STORE (gplugin_gtk_store_get_type())
-G_DECLARE_FINAL_TYPE(
- GPluginGtkStore,
- gplugin_gtk_store,
- GPLUGIN_GTK,
- STORE,
- GtkListStore)
-
-typedef enum {
- GPLUGIN_GTK_STORE_ENABLED_COLUMN,
- GPLUGIN_GTK_STORE_LOADED_COLUMN,
- GPLUGIN_GTK_STORE_PLUGIN_COLUMN,
- GPLUGIN_GTK_STORE_MARKUP_COLUMN,
-
- /*< private >*/
- GPLUGIN_GTK_STORE_N_COLUMNS,
-} GPluginGtkStoreColumns;
-
-GPluginGtkStore *gplugin_gtk_store_new(void);
-
-const GType *gplugin_gtk_store_get_column_types(void);
-
-G_END_DECLS
-
-#endif /* GPLUGIN_GTK_STORE_H */
--- a/gplugin-gtk3/gplugin-gtk-view.c Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#include <gplugin.h>
-
-#include <gplugin-gtk-store.h>
-#include <gplugin-gtk-view.h>
-
-/**
- * GPluginGtkView:
- *
- * A [class@Gtk.TreeView] widget that displays all the plugins and some basic
- * information about them.
- */
-
-/******************************************************************************
- * Structs
- *****************************************************************************/
-struct _GPluginGtkView {
- GtkTreeView parent;
-
- gboolean show_internal;
-};
-
-/******************************************************************************
- * Enums
- *****************************************************************************/
-enum {
- PROP_ZERO,
- PROP_SHOW_INTERNAL,
- N_PROPERTIES,
-};
-static GParamSpec *properties[N_PROPERTIES] = {
- NULL,
-};
-
-/******************************************************************************
- * Callbacks
- *****************************************************************************/
-static void
-gplugin_gtk_view_plugin_toggled_cb(
- G_GNUC_UNUSED GtkCellRendererToggle *rend,
- gchar *path,
- gpointer data)
-{
- GPluginGtkView *view = GPLUGIN_GTK_VIEW(data);
- GPluginManager *manager = NULL;
- GPluginPlugin *plugin = NULL;
- GPluginPluginState state;
- GtkTreeModel *model = NULL;
- GtkTreeIter iter;
- GtkTreePath *tree_path = NULL;
-
- manager = gplugin_manager_get_default();
-
- tree_path = gtk_tree_path_new_from_string(path);
-
- model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
- gtk_tree_model_get_iter(model, &iter, tree_path);
- gtk_tree_path_free(tree_path);
-
- gtk_tree_model_get(
- model,
- &iter,
- GPLUGIN_GTK_STORE_PLUGIN_COLUMN,
- &plugin,
- -1);
-
- if(!GPLUGIN_IS_PLUGIN(plugin)) {
- return;
- }
-
- state = gplugin_plugin_get_state(plugin);
- if(state == GPLUGIN_PLUGIN_STATE_LOADED) {
- GError *error = NULL;
-
- gplugin_manager_unload_plugin(manager, plugin, &error);
-
- if(error != NULL) {
- g_warning("Failed to unload plugin: %s", error->message);
-
- g_error_free(error);
- }
- } else {
- GError *error = NULL;
-
- gplugin_manager_load_plugin(manager, plugin, &error);
-
- if(error != NULL) {
- g_warning("Failed to load plugin: %s", error->message);
-
- g_error_free(error);
- }
- }
-
- g_object_unref(G_OBJECT(plugin));
-}
-
-/******************************************************************************
- * GObject Implementation
- *****************************************************************************/
-G_DEFINE_TYPE(GPluginGtkView, gplugin_gtk_view, GTK_TYPE_TREE_VIEW)
-
-static void
-gplugin_gtk_view_set_property(
- GObject *obj,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GPluginGtkView *view = GPLUGIN_GTK_VIEW(obj);
-
- switch(prop_id) {
- case PROP_SHOW_INTERNAL:
- gplugin_gtk_view_set_show_internal(
- view,
- g_value_get_boolean(value));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, prop_id, pspec);
- break;
- }
-}
-
-static void
-gplugin_gtk_view_get_property(
- GObject *obj,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GPluginGtkView *view = GPLUGIN_GTK_VIEW(obj);
-
- switch(prop_id) {
- case PROP_SHOW_INTERNAL:
- g_value_set_boolean(
- value,
- gplugin_gtk_view_get_show_internal(view));
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, prop_id, pspec);
- break;
- }
-}
-
-static void
-gplugin_gtk_view_init(GPluginGtkView *view)
-{
- GtkTreeViewColumn *col = NULL;
- GtkCellRenderer *rend = NULL;
-
- /* create the first column */
- col = gtk_tree_view_column_new();
- gtk_tree_view_column_set_title(col, "Enabled");
- gtk_tree_view_column_set_resizable(col, FALSE);
-
- rend = gtk_cell_renderer_toggle_new();
- gtk_tree_view_column_pack_start(col, rend, FALSE);
- g_signal_connect(
- G_OBJECT(rend),
- "toggled",
- G_CALLBACK(gplugin_gtk_view_plugin_toggled_cb),
- view);
-
- gtk_tree_view_append_column(GTK_TREE_VIEW(view), col);
- gtk_tree_view_column_set_attributes(
- col,
- rend,
- "active",
- GPLUGIN_GTK_STORE_LOADED_COLUMN,
- "sensitive",
- GPLUGIN_GTK_STORE_ENABLED_COLUMN,
- NULL);
-
- /* create the markup column */
- col = gtk_tree_view_column_new();
- gtk_tree_view_column_set_title(col, "Name");
- gtk_tree_view_column_set_resizable(col, FALSE);
-
- rend = gtk_cell_renderer_text_new();
- gtk_tree_view_column_pack_start(col, rend, TRUE);
-
- gtk_tree_view_append_column(GTK_TREE_VIEW(view), col);
- gtk_tree_view_column_set_attributes(
- col,
- rend,
- "markup",
- GPLUGIN_GTK_STORE_MARKUP_COLUMN,
- "sensitive",
- GPLUGIN_GTK_STORE_ENABLED_COLUMN,
- NULL);
-}
-
-static void
-gplugin_gtk_view_class_init(GPluginGtkViewClass *klass)
-{
- GObjectClass *obj_class = G_OBJECT_CLASS(klass);
-
- obj_class->get_property = gplugin_gtk_view_get_property;
- obj_class->set_property = gplugin_gtk_view_set_property;
-
- /* properties */
-
- /**
- * GPluginGtkView:show-internal:
- *
- * Whether or not to show internal plugins.
- */
- properties[PROP_SHOW_INTERNAL] = g_param_spec_boolean(
- "show-internal",
- "show-internal",
- "Whether or not to show internal plugins",
- FALSE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
-
- g_object_class_install_properties(obj_class, N_PROPERTIES, properties);
-}
-
-/******************************************************************************
- * API
- *****************************************************************************/
-
-/**
- * gplugin_gtk_view_new:
- *
- * Creates a new [class@GPluginGtk3.View].
- *
- * Returns: (transfer full): The new view.
- */
-GtkWidget *
-gplugin_gtk_view_new(void)
-{
- GObject *ret = NULL;
- GPluginGtkStore *store = gplugin_gtk_store_new();
-
- /* clang-format off */
- ret = g_object_new(
- GPLUGIN_GTK_TYPE_VIEW,
- "model", GTK_TREE_MODEL(store),
- NULL);
- /* clang-format on */
-
- return GTK_WIDGET(ret);
-}
-
-/**
- * gplugin_gtk_view_set_show_internal:
- * @view: The GTK view instance.
- * @show_internal: Whether or not to show internal plugins.
- *
- * This function will toggle whether or not the widget will show internal
- * plugins.
- */
-void
-gplugin_gtk_view_set_show_internal(GPluginGtkView *view, gboolean show_internal)
-{
- g_return_if_fail(GPLUGIN_GTK_IS_VIEW(view));
-
- view->show_internal = show_internal;
-
- g_object_notify(G_OBJECT(view), "show-internal");
-}
-
-/**
- * gplugin_gtk_view_get_show_internal:
- * @view: The GTK view instance.
- *
- * Returns whether or not @view is showing internal plugins.
- */
-gboolean
-gplugin_gtk_view_get_show_internal(GPluginGtkView *view)
-{
- g_return_val_if_fail(GPLUGIN_GTK_IS_VIEW(view), FALSE);
-
- return view->show_internal;
-}
--- a/gplugin-gtk3/gplugin-gtk-view.h Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-
-#if !defined(GPLUGIN_GTK_GLOBAL_HEADER_INSIDE) && \
- !defined(GPLUGIN_GTK_COMPILATION)
-#error "only <gplugin-gtk.h> may be included directly"
-#endif
-
-#ifndef GPLUGIN_GTK_VIEW_H
-#define GPLUGIN_GTK_VIEW_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <gtk/gtk.h>
-
-G_BEGIN_DECLS
-
-#define GPLUGIN_GTK_TYPE_VIEW (gplugin_gtk_view_get_type())
-G_DECLARE_FINAL_TYPE(
- GPluginGtkView,
- gplugin_gtk_view,
- GPLUGIN_GTK,
- VIEW,
- GtkTreeView)
-
-GtkWidget *gplugin_gtk_view_new(void);
-
-void gplugin_gtk_view_set_show_internal(
- GPluginGtkView *view,
- gboolean show_internal);
-gboolean gplugin_gtk_view_get_show_internal(GPluginGtkView *view);
-
-G_END_DECLS
-
-#endif /* GPLUGIN_GTK_VIEW_H */
--- a/gplugin-gtk3/gplugin-gtk.h.in Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <https://www.gnu.org/licenses/>.
- */
-#ifndef GPLUGIN_GTK_H
-#define GPLUGIN_GTK_H
-
-#ifndef __GI_SCANNER__
-# ifdef GPLUGIN_GTK_COMPILATION
-# error "gplugin-gtk source files should not include gplugin-gtk.h"
-# endif /* GPLUGIN_GTK_COMPILATION */
-#endif /* __GI_SCANNER__ */
-
-#ifndef GPLUGIN_GTK_GLOBAL_HEADER_INSIDE
-# define GPLUGIN_GTK_GLOBAL_HEADER_INSIDE
-#endif /* GPLUGIN_GTK_GLOBAL_HEADER_INSIDE */
-
-@GPLUGIN_GTK_H_INCLUDES@
-
-#undef GPLUGIN_GTK_GLOBAL_HEADER_INSIDE
-
-#endif /* GPLUGIN_GTK_H */
--- a/gplugin-gtk3/gplugin-gtk3.xml.in Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<glade-catalog name="gplugin-gtk"
- version="@GPLUGIN_VERSION@"
- library="gplugin-gtk3"
- domain="gplugin"
- depends="gtk+"
- book="GPlugin">
- <glade-widget-classes>
- <!-- the get-type-function's are needed due to gplugin's weirdo namespace.
- Without them, Glade is going to look for g_plugin_*_get_type and not
- gplugin_*_get_type.
- -->
- <glade-widget-class
- name="GPluginGtkPluginInfo"
- generic-name="plugininfo"
- title="Plugin Info"
- get-type-function="gplugin_gtk_plugin_info_get_type"/>
- <glade-widget-class
- name="GPluginGtkView"
- generic-name="pluginview"
- title="Plugin View"
- get-type-function="gplugin_gtk_view_get_type"/>
- <glade-widget-class
- name="GPluginGtkStore"
- generic-name="pluginstore"
- title="Plugin Store"
- get-type-function="gplugin_gtk_store_get_type"
- toplevel="True"/>
- </glade-widget-classes>
-
- <glade-widget-group name="gplugin-gtk" title="GPlugin Gtk Widgets">
- <glade-widget-class-ref name="GPluginGtkPluginInfo"/>
- <glade-widget-class-ref name="GPluginGtkView"/>
- <glade-widget-class-ref name="GPluginGtkStore"/>
- </glade-widget-group>
-</glade-catalog>
--- a/gplugin-gtk3/meson.build Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-if get_option('gtk3')
-
-###############################################################################
-# Build Info
-###############################################################################
-GTK3 = dependency('gtk+-3.0', version : '>=3.0.0')
-
-GPLUGIN_GTK3_LIBRARY_VERSION = '0.1.0'
-
-GPLUGIN_GTK3_SOURCES = [
- 'gplugin-gtk-plugin-info.c',
- 'gplugin-gtk-store.c',
- 'gplugin-gtk-view.c',
-]
-
-GPLUGIN_GTK3_HEADERS = [
- 'gplugin-gtk-plugin-info.h',
- 'gplugin-gtk-store.h',
- 'gplugin-gtk-view.h',
-]
-
-GPLUGIN_GTK3_PRIVATE_SOURCES = [
-]
-
-GPLUGIN_GTK3_PRIVATE_HEADERS = [
-]
-
-GPLUGIN_GTK3_PUBLIC_BUILT_SOURCES = [
-]
-
-GPLUGIN_GTK3_PUBLIC_BUILT_HEADERS = [
-]
-
-GPLUGIN_GTK3_GENERATED_TARGETS = [
-]
-
-###############################################################################
-# Configure Files
-###############################################################################
-GPLUGIN_GTK3_H_INCLUDES = ''
-foreach header : GPLUGIN_GTK3_HEADERS
- GPLUGIN_GTK3_H_INCLUDES = '@0@\n#include <gplugin-gtk3/@1@>'.format(
- GPLUGIN_GTK3_H_INCLUDES,
- header)
-endforeach
-
-conf = configuration_data()
-conf.set('GPLUGIN_GTK_H_INCLUDES', GPLUGIN_GTK3_H_INCLUDES)
-gplugin_gtk3_h = configure_file(
- input : 'gplugin-gtk.h.in',
- output : 'gplugin-gtk.h',
- configuration : conf,
- install : true,
- install_dir : get_option('includedir') / 'gplugin-gtk3-1.0')
-
-###############################################################################
-# Glade Catalog
-###############################################################################
-gplugin_gtk3_xml = configure_file(
- input : 'gplugin-gtk3.xml.in',
- output: 'gplugin-gtk3.xml',
- configuration : version_conf,
- install: true,
- install_dir : get_option('datadir') / 'glade' / 'catalogs',
-)
-
-devenv.append('GLADE_CATALOG_SEARCH_PATH', meson.current_build_dir())
-
-###############################################################################
-# Resource Target
-###############################################################################
-gplugin_gtk3_resources = gnome.compile_resources(
- 'gplugin-gtk3-resources',
- 'data/gplugin-gtk.gresource.xml',
- c_name: 'gplugin_gtk',
- source_dir: 'data')
-
-###############################################################################
-# Library Target
-###############################################################################
-gplugin_gtk3 = library('gplugin-gtk3',
- GPLUGIN_GTK3_SOURCES,
- GPLUGIN_GTK3_HEADERS,
- GPLUGIN_GTK3_PRIVATE_SOURCES,
- GPLUGIN_GTK3_PRIVATE_HEADERS,
- GPLUGIN_GTK3_PUBLIC_BUILT_SOURCES,
- GPLUGIN_GTK3_PUBLIC_BUILT_HEADERS,
- gplugin_gtk3_resources,
- c_args : ['-DGPLUGIN_GTK_COMPILATION', '-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="GPlugin-Gtk"'],
- include_directories : toplevel_inc,
- dependencies : [gplugin_dep, GTK3],
- version : GPLUGIN_GTK3_LIBRARY_VERSION,
- install : true
-)
-
-gplugin_gtk3_inc = include_directories('.')
-
-pkgconfig.generate(
- gplugin_gtk3,
- name : 'gplugin-gtk3',
- description : 'Gtk3 widgets for GPlugin',
- filebase : 'gplugin-gtk3',
- subdirs : 'gplugin-gtk3-1.0',
- libraries : [gplugin],
- requires : [GLIB, GOBJECT, GMODULE, GTK3],
-)
-
-###############################################################################
-# GObject Introspection
-###############################################################################
-if get_option('introspection')
- gplugin_gtk3_gir = gnome.generate_gir(
- gplugin_gtk3,
- sources : GPLUGIN_GTK3_SOURCES + GPLUGIN_GTK3_HEADERS +
- GPLUGIN_GTK3_PUBLIC_BUILT_SOURCES +
- GPLUGIN_GTK3_PUBLIC_BUILT_HEADERS,
- includes : [gplugin_gir[0], 'Gtk-3.0'],
- namespace : 'GPluginGtk3',
- nsversion : '1.0',
- symbol_prefix : 'gplugin_gtk',
- identifier_prefix : 'GPluginGtk',
- install : true,
- header : 'gplugin-gtk.h',
- export_packages: ['gplugin-gtk3'],
- dependencies : [gplugin_dep],
- extra_args : ['--quiet', '-DGPLUGIN_GTK_COMPILATION'])
- GPLUGIN_GTK3_GENERATED_TARGETS += gplugin_gtk3_gir
-endif
-
-###############################################################################
-# Library Dependency Object
-###############################################################################
-gplugin_gtk3_dep = declare_dependency(
- include_directories: [toplevel_inc, gplugin_gtk3_inc],
- link_with : [gplugin, gplugin_gtk3],
- sources : GPLUGIN_GTK3_PUBLIC_BUILT_HEADERS + GPLUGIN_GTK3_GENERATED_TARGETS,
- dependencies : [GLIB, GOBJECT, GTK3],
-)
-
-meson.override_dependency('gplugin-gtk3', gplugin_gtk3_dep)
-
-###############################################################################
-# Install Stuff
-###############################################################################
-install_headers(
- GPLUGIN_GTK3_HEADERS,
- subdir : 'gplugin-gtk3-1.0/gplugin-gtk3'
-)
-
-###############################################################################
-# subdirectories
-###############################################################################
-subdir('reference')
-
-endif # gtk3
--- a/gplugin-gtk3/reference/gplugin-gtk3.toml.in Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-[library]
-version = "@GPLUGIN_VERSION@"
-browse_url = "https://keep.imfreedom.org/gplugin/gplugin/"
-repository_url = "https://keep.imfreedom.org/gplugin/gplugin/"
-website_url = "https://keep.imfreedom.org/gplugin/gplugin/"
-authors = "GPlugin Developers"
-logo_url = ""
-license = "LGPL-2.1-or-later"
-description = "GPlugin Gtk Library"
-dependencies = [ "GLib-2.0", "GObject-2.0", "GPlugin-1.0", "Gtk-3.0" ]
-devhelp = true
-search_index = true
-
- [dependencies."GLib-2.0"]
- name = "GLib"
- description = "General-purpose, portable utility library."
- docs_url = "https://docs.gtk.org/glib/"
-
- [dependencies."GObject-2.0"]
- name = "GObject"
- description = "The base type system library"
- docs_url = "https://docs.gtk.org/gobject/"
-
- [dependencies."GPlugin-1.0"]
- name = "GPlugin"
- description = "Plugin library"
- docs_url = "https://docs.imfreedom.org/gplugin/"
-
- [dependencies."Gtk-3.0"]
- name = "Gtk3"
- description = "Gtk Widget Toolkit"
- docs_url = "https://docs.gtk.org/gtk3/"
-
-[theme]
-name = "basic"
-show_index_summary = true
-show_class_hierarchy = true
-
-[source-location]
-base_url = "https://keep.imfreedom.org/gplugin/gplugin/file/default/"
-
-[extra]
-# The same order will be used when generating the index
-content_files = [
-]
-content_images = [
-]
-urlmap_file = "urlmap.js"
--- a/gplugin-gtk3/reference/meson.build Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-if get_option('doc')
- gplugin_gtk3_toml = configure_file(
- input : 'gplugin-gtk3.toml.in',
- output : 'gplugin-gtk3.toml',
- configuration : version_conf,
- install : true,
- install_dir : docs_dir / 'gplugin-gtk3',
- )
-
- gplugin_gtk3_doc = custom_target('gplugin-gtk3-doc',
- input : [ gplugin_gtk3_toml, gplugin_gtk3_gir[0] ],
- output : 'gplugin-gtk3',
- command : [
- gidocgen,
- 'generate',
- '--quiet',
- '--fatal-warnings',
- '--add-include-path=@0@'.format(meson.project_build_root() / 'gplugin'),
- '--config=@INPUT0@',
- '--output-dir=@OUTPUT@',
- '--no-namespace-dir',
- '--content-dir=@0@'.format(meson.current_source_dir()),
- '@INPUT1@'
- ],
- depends : [ gplugin_gir[0] ],
- build_by_default : true,
- install : true,
- install_dir : docs_dir,
- )
-endif
-
--- a/gplugin-gtk3/reference/urlmap.js Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-// SPDX-FileCopyrightText: 2021 GNOME Foundation
-// SPDX-License-Identifier: LGPL-2.1-or-later
-
-// A map between namespaces and base URLs for their online documentation
-baseURLs = [
- [ 'GLib', 'https://docs.gtk.org/glib/' ],
- [ 'GObject', 'https://docs.gtk.org/gobject/' ],
- [ 'GPlugin', 'https://docs.imfreedom.org/gplugin/' ],
- [ 'GModule', 'https://docs.gtk.org/gmodule/' ],
- [ 'Gtk3', 'https://docs.gtk.org/gtk3/' ],
-]
--- a/meson.build Wed Sep 14 03:17:31 2022 -0500
+++ b/meson.build Thu Sep 15 02:14:36 2022 -0500
@@ -119,8 +119,6 @@
# Subdirectories
###############################################################################
subdir('gplugin')
-subdir('gplugin-gtk3')
-subdir('gplugin-gtk3-viewer')
subdir('gplugin-gtk4')
subdir('gplugin-gtk4-viewer')
subdir('gplugin-query')
@@ -136,9 +134,6 @@
if get_option('doc')
doc_targets = [gplugin_doc]
- if get_option('gtk3')
- doc_targets += gplugin_gtk3_doc
- endif
if GTK4.found()
doc_targets += gplugin_gtk4_doc
endif
@@ -155,7 +150,6 @@
summary({
'api reference' : get_option('doc'),
- 'GTK3 widgets' : get_option('gtk3'),
'GTK4 widgets' : GTK4.found(),
'man pages' : get_option('help2man'),
}, bool_yn : true, section : 'Miscellaneous')
--- a/meson_options.txt Wed Sep 14 03:17:31 2022 -0500
+++ b/meson_options.txt Thu Sep 15 02:14:36 2022 -0500
@@ -17,12 +17,6 @@
)
option(
- 'gtk3',
- type : 'boolean', value : true,
- description : 'Whether or not to build the GTK3 library'
-)
-
-option(
'gtk4',
type : 'feature',
description : 'Whether or not to build the GTK4 library'
@@ -35,12 +29,6 @@
)
option(
- 'install-gplugin-gtk3-viewer',
- type : 'boolean', value : true,
- description : 'Whether or not to install the GTK3 viewer application'
-)
-
-option(
'install-gplugin-gtk4-viewer',
type : 'boolean', value : true,
description : 'Whether or not to install the GTK4 viewer application'
--- a/packaging/debian/changelog Wed Sep 14 03:17:31 2022 -0500
+++ b/packaging/debian/changelog Thu Sep 15 02:14:36 2022 -0500
@@ -1,11 +1,17 @@
-gplugin (0.35.0) UNRELEASED; urgency=medium
+gplugin (0.38.1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+
+ -- Gary Kramlich <grim@reaperworld.com> Fri, 02 Sep 2022 19:45:54 -0500
+
+gplugin (0.35.0) unstable; urgency=medium
* Renamed gir1.2-gplugin-gtk-1.0 to gir1.2-gplugin-gtk3-1.0
* Renamed libgplugin-gtk-bin to libgplugin-gtk3-bin
* Renamed libgplugin-gtk-dev to libgplugin-gtk3-dev
* Renamed libgplugin-gtk0 to libgplugin-gtk3-0
- -- Gary Kramlich <grim@reaperworld.com> Wed, 29 Sep 2021 23:35:01 -0500
+ -- Gary Kramlich <grim@reaperworld.com> Fri, 02 Sep 2022 19:45:51 -0500
gplugin (0.28.3) unstable; urgency=medium
--- a/packaging/debian/control Wed Sep 14 03:17:31 2022 -0500
+++ b/packaging/debian/control Thu Sep 15 02:14:36 2022 -0500
@@ -4,7 +4,7 @@
Maintainer: Gary Kramlich <grim@reaperworld.com>
Build-Depends: debhelper (>=9),
meson (>=0.56.0), libglib2.0-dev,
- libgtk-3-dev, libgtk-4-dev,
+ libgtk-4-dev,
gettext, help2man,
gobject-introspection, libgirepository1.0-dev,
liblua5.3-dev, lua-lgi,
@@ -73,62 +73,10 @@
.
This package will install all of the gplugin loaders.
-Package: libgplugin-gtk3-0
-Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, libgtk-3-0, libgplugin0
-Conflicts: libgplugin-gtk0
-Replaces: libgplugin-gtk0
-Provides: libgplugin-gtk0
-Description: GTK3 bindings for GPlugin
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- .
- This library provides some default GTK3 widgets for GPlugin.
-
-Package: libgplugin-gtk3-dev
-Architecture: any
-Section: libdevel
-Depends: ${misc:Depends}, libgtk-3-dev, libgplugin-gtk3-0 (= ${binary:Version})
-Conflicts: libgplugin-gtk-dev
-Replaces: libgplugin-gtk-dev
-Description: Development file for libgplugin-gtk3-0
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- .
- This library provides the developmental headers for the GPlugin GTK3 bindings.
-
-Package: libgplugin-gtk3-bin
-Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, libgplugin-gtk0
-Conflicts: libgplugin-gtk-bin
-Replaces: libgplugin-gtk-bin
-Description: Programs for the GTK3 interface to GPlugin
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- .
- This package contains the gplugin-gtk3-viewer application for viewing plugins.
-
-Package: gir1.2-gplugin-gtk3-1.0
-Architecture: any
-Depends: ${gir:Depends}, ${misc:Depends}, libgplugin0, libgplugin-gtk3-0
-Conflicts: gir1.2-gplugin-gtk-1.0
-Replaces: gir1.2-gplugin-gtk-1.0
-Section: introspection
-Description: typelib for libgplugin
- GPlugin is a GObject based library that implements a reusable plugin system
- which supports loading plugins in other languages via loaders. It relies
- heavily on GObjectIntrospection to expose its API to the other languages.
- .
- This package can be used by other packages using the GIRepository format to
- generate dynamic bindings for libgplugin-gtk3.
-
Package: libgplugin-gtk4-0
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, libgtk-4-1, libgplugin0
-Description: GTK3 bindings for GPlugin
+Description: GTK4 bindings for GPlugin
GPlugin is a GObject based library that implements a reusable plugin system
which supports loading plugins in other languages via loaders. It relies
heavily on GObjectIntrospection to expose its API to the other languages.
@@ -148,6 +96,18 @@
.
This library provides the developmental headers for the GPlugin GTK4 bindings.
+Package: libgplugin-gtk4-bin
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libgplugin-gtk4-0
+Conflicts: libgplugin-gtk-bin
+Replaces: libgplugin-gtk-bin
+Description: Programs for the GTK4 interface to GPlugin
+ GPlugin is a GObject based library that implements a reusable plugin system
+ which supports loading plugins in other languages via loaders. It relies
+ heavily on GObjectIntrospection to expose its API to the other languages.
+ .
+ This package contains the gplugin-gtk4-viewer application for viewing plugins.
+
Package: gir1.2-gplugin-gtk4-1.0
Architecture: any
Depends: ${gir:Depends}, ${misc:Depends}, libgplugin0, libgplugin-gtk4-0
--- a/packaging/debian/gir1.2-gplugin-gtk3-1.0.install Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-debian/tmp/usr/lib/*/girepository-1.0/GPluginGtk3-1.0.typelib
--- a/packaging/debian/libgplugin-gtk3-0.install Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-debian/tmp/usr/lib/*/libgplugin-gtk3.so.*
--- a/packaging/debian/libgplugin-gtk3-0.triggers Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-activate-noawait ldconfig
--- a/packaging/debian/libgplugin-gtk3-bin.install Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-debian/tmp/usr/bin/gplugin-gtk3-viewer
-debian/tmp/usr/share/man/man1/gplugin-gtk3-viewer.1
--- a/packaging/debian/libgplugin-gtk3-dev.install Wed Sep 14 03:17:31 2022 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-usr/include/gplugin-gtk3-1.0
-debian/tmp/usr/lib/*/libgplugin-gtk3.so
-debian/tmp/usr/lib/*/pkgconfig/gplugin-gtk3.pc
-debian/tmp/usr/share/gir-1.0/GPluginGtk3-1.0.gir
-debian/tmp/usr/share/vala/vapi/gplugin-gtk3.deps
-debian/tmp/usr/share/vala/vapi/gplugin-gtk3.vapi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packaging/debian/libgplugin-gtk4-bin.install Thu Sep 15 02:14:36 2022 -0500
@@ -0,0 +1,3 @@
+debian/tmp/usr/bin/gplugin-gtk4-viewer
+debian/tmp/usr/share/man/man1/gplugin-gtk4-viewer.1
+
--- a/packaging/gplugin.spec.in Wed Sep 14 03:17:31 2022 -0500
+++ b/packaging/gplugin.spec.in Thu Sep 15 02:14:36 2022 -0500
@@ -14,7 +14,6 @@
BuildRequires: glib2-devel >= 2.44.0
BuildRequires: gobject-introspection-devel
BuildRequires: gettext
-BuildRequires: gtk3-devel
BuildRequires: gtk4-devel
BuildRequires: help2man
BuildRequires: libxslt
@@ -41,22 +40,6 @@
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
-%package gtk3
-Summary: A GObject based library that implements a reusable plugin system
-Group: Development/Libraries
-
-%package gtk3-devel
-Summary: A GObject based library that implements a reusable plugin system
-Group: Development/Libraries
-Requires: %{name}-gtk3%{?_isa} = %{version}-%{release}
-Requires: %{name}-devel%{?_isa} = %{version}-%{release}
-
-%package gtk3-vala
-Summary: A GObject based library that implements a reusable plugin system
-Group: Development/Libraries
-Requires: %{name}-gtk3%{?_isa} = %{version}-%{release}
-Requires: %{name}-devel%{?_isa} = %{version}-%{release}
-
%package gtk4
Summary: A GObject based library that implements a reusable plugin system
Group: Development/Libraries
@@ -67,6 +50,12 @@
Requires: %{name}-gtk4%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
+%package gtk4-vala
+Summary: A GObject based library that implements a reusable plugin system
+Group: Development/Libraries
+Requires: %{name}-gtk4%{?_isa} = %{version}-%{release}
+Requires: %{name}-vala%{?_isa} = %{version}-%{release}
+
%package lua
Summary: A GObject based library that implements a reusable plugin system
Group: Development/Libraries
@@ -102,29 +91,6 @@
This package contains all necessary include files and libraries needed
to develop applications that require these.
-%description gtk3
-GPlugin is a GObject based library that implements a reusable plugin system
-that supports loading plugins in other languages via loaders. GPlugin also
-implements dependencies among the plugins.
-
-This package contains additional GTK3 dependencies for %{name} library.
-
-%description gtk3-devel
-GPlugin is a GObject based library that implements a reusable plugin system
-that supports loading plugins in other languages via loaders. GPlugin also
-implements dependencies among the plugins.
-
-This package contains all necessary include files and libraries needed
-to develop GTK3 applications that require these.
-
-%description gtk3-vala
-GPlugin is a GObject based library that implements a reusable plugin system
-that supports loading plugins in other languages via loaders. GPlugin also
-implements dependencies among the plugins.
-
-This package contains the vapi bindings allowing GPluginGtk3 to be used from
-vala.
-
%description gtk4
GPlugin is a GObject based library that implements a reusable plugin system
that supports loading plugins in other languages via loaders. GPlugin also
@@ -140,6 +106,14 @@
This package contains all necessary include files and libraries needed
to develop GTK4 applications that require these.
+%description gtk4-vala
+GPlugin is a GObject based library that implements a reusable plugin system
+that supports loading plugins in other languages via loaders. GPlugin also
+implements dependencies among the plugins.
+
+This package contains the vapi bindings allowing GPluginGtk4 to be used from
+vala.
+
%description lua
GPlugin is a GObject based library that implements a reusable plugin system
that supports loading plugins in other languages via loaders. GPlugin also
@@ -185,9 +159,9 @@
%postun -n libgplugin0 -p /sbin/ldconfig
-%post -n gplugin-gtk3 -p /sbin/ldconfig
+%post -n gplugin-gtk4 -p /sbin/ldconfig
-%postun -n gplugin-gtk3 -p /sbin/ldconfig
+%postun -n gplugin-gtk4 -p /sbin/ldconfig
%files
%defattr(-,root,root)
@@ -216,35 +190,6 @@
%{_libdir}/libgplugin.so.0
%{_libdir}/pkgconfig/gplugin.pc
-%files gtk3
-%defattr(-,root,root)
-%doc README.md
-%license COPYING
-%{_bindir}/gplugin-gtk3-viewer
-%{_libdir}/libgplugin-gtk3.so.0.1.0
-%{_mandir}/man1/gplugin-gtk3-viewer.1*
-
-%files gtk3-devel
-%defattr(-,root,root)
-%dir %{_datadir}/glade/catalogs/
-%doc README.md
-%license COPYING
-%{_datadir}/gir-1.0/GPluginGtk3-1.0.gir
-%{_datadir}/glade/catalogs/gplugin-gtk3.xml
-%{_datadir}/doc/gplugin-gtk3/
-%{_includedir}/gplugin-gtk3-1.0/
-%{_libdir}/girepository-1.0/GPluginGtk3-1.0.typelib
-%{_libdir}/libgplugin-gtk3.so
-%{_libdir}/libgplugin-gtk3.so.0
-%{_libdir}/pkgconfig/gplugin-gtk3.pc
-
-%files gtk3-vala
-%defattr(-,root,root)
-%doc README.md
-%license COPYING
-%{_datadir}/vala/vapi/gplugin-gtk3.vapi
-%{_datadir}/vala/vapi/gplugin-gtk3.deps
-
%files gtk4
%defattr(-,root,root)
%doc README.md
@@ -265,6 +210,13 @@
%{_libdir}/libgplugin-gtk4.so.0
%{_libdir}/pkgconfig/gplugin-gtk4.pc
+%files gtk4-vala
+%defattr(-,root,root)
+%doc README.md
+%license COPYING
+%{_datadir}/vala/vapi/gplugin-gtk4.vapi
+%{_datadir}/vala/vapi/gplugin-gtk4.deps
+
%files lua
%defattr(-,root,root)
%doc README.md
@@ -291,6 +243,11 @@
%{_datadir}/vala/vapi/gplugin.deps
%changelog
+* Fri Sep 02 2022 Gary Kramlich <grim@reaperworld.com>
+- Removed gplugin-gtk3
+- Removed gplugin-gtk3-devel
+- Removed gplugin-gtk3-vala
+
* Wed Sep 29 2021 Gary Kramlich <grim@reaperworld.com>
- Renamed gplugin-gtk to gplugin-gtk3
- Renamed gplugin-gtk-devel to gplugin-gtk3-devel
--- a/vala/meson.build Wed Sep 14 03:17:31 2022 -0500
+++ b/vala/meson.build Thu Sep 15 02:14:36 2022 -0500
@@ -10,15 +10,6 @@
install : true,
)
- if get_option('gtk3')
- gplugin_gtk3_vapi = gnome.generate_vapi('gplugin-gtk3',
- sources : gplugin_gtk3_gir[0],
- packages : [ 'gtk+-3.0' ],
- install : true,
- gir_dirs : meson.current_build_dir() / '..' / 'gplugin',
- )
- endif
-
if get_option('gtk4').allowed()
gplugin_gtk4_vapi = gnome.generate_vapi('gplugin-gtk4',
sources : gplugin_gtk4_gir[0],