Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 25 Apr 2024 20:38:08 UTC Commit: 52ab3ebefc8fdf805b081bac74efaec442c82529 https://github.com/geany/geany-plugins/commit/52ab3ebefc8fdf805b081bac74efae...
Log Message: ----------- webhelper: Use modern GObject private data
Modified Paths: -------------- build/webhelper.m4 webhelper/src/gwh-browser.c webhelper/src/gwh-settings.c
Modified: build/webhelper.m4 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -4,7 +4,7 @@ AC_DEFUN([GP_CHECK_WEBHELPER],
GTK_VERSION=2.16 dnl 2.22 for glib-mkenums' @basename@ template - GLIB_VERSION=2.22 + GLIB_VERSION=2.38 GIO_VERSION=2.18 GDK_PIXBUF_VERSION=2.0 WEBKIT_VERSION=1.1.18
Modified: webhelper/src/gwh-browser.c 7 lines changed, 2 insertions(+), 5 deletions(-) =================================================================== @@ -78,7 +78,7 @@ static const gdouble zoom_in_factor = 1.2; static const gdouble zoom_out_factor = 1.0 / 1.2;
-G_DEFINE_TYPE (GwhBrowser, gwh_browser, GTK_TYPE_VBOX) +G_DEFINE_TYPE_WITH_PRIVATE (GwhBrowser, gwh_browser, GTK_TYPE_VBOX)
static void @@ -685,8 +685,6 @@ gwh_browser_class_init (GwhBrowserClass *klass) "The browser's toolbar", GTK_TYPE_TOOLBAR, G_PARAM_READABLE)); - - g_type_class_add_private (klass, sizeof (GwhBrowserPrivate)); }
/* a GtkEntryCompletionMatchFunc matching anywhere in the haystack */ @@ -893,8 +891,7 @@ gwh_browser_init (GwhBrowser *self) WebKitWebContext *wkcontext; gboolean inspector_detached;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GWH_TYPE_BROWSER, - GwhBrowserPrivate); + self->priv = gwh_browser_get_instance_private (self);
self->priv->default_icon = NULL; /* web view need to be created first because we use it in create_toolbar() */
Modified: webhelper/src/gwh-settings.c 7 lines changed, 2 insertions(+), 5 deletions(-) =================================================================== @@ -35,7 +35,7 @@ struct _GwhSettingsPrivate };
-G_DEFINE_TYPE (GwhSettings, gwh_settings, G_TYPE_OBJECT) +G_DEFINE_TYPE_WITH_PRIVATE (GwhSettings, gwh_settings, G_TYPE_OBJECT)
static void @@ -124,15 +124,12 @@ gwh_settings_class_init (GwhSettingsClass *klass) object_class->finalize = gwh_settings_finalize; object_class->get_property = gwh_settings_get_property; object_class->set_property = gwh_settings_set_property; - - g_type_class_add_private (klass, sizeof (GwhSettingsPrivate)); }
static void gwh_settings_init (GwhSettings *self) { - self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, GWH_TYPE_SETTINGS, - GwhSettingsPrivate); + self->priv = gwh_settings_get_instance_private (self); self->priv->prop_array = g_ptr_array_new (); }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org