[xdg-desktop-portal-gnome/gbsneto/screencast-cleanup: 2/6] screencast: Remove init_screen_cast_widget()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [xdg-desktop-portal-gnome/gbsneto/screencast-cleanup: 2/6] screencast: Remove init_screen_cast_widget()
- Date: Wed, 10 Nov 2021 22:56:27 +0000 (UTC)
commit d1f7cf3bd5c10e853f166e89ebac1a5f0aef3151
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Nov 10 15:37:56 2021 -0300
screencast: Remove init_screen_cast_widget()
Use g_type_ensure() directly.
src/remotedesktopdialog.c | 2 +-
src/screencastdialog.c | 2 +-
src/screencastwidget.c | 6 ------
src/screencastwidget.h | 2 --
4 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/src/remotedesktopdialog.c b/src/remotedesktopdialog.c
index a21b008..880546b 100644
--- a/src/remotedesktopdialog.c
+++ b/src/remotedesktopdialog.c
@@ -379,7 +379,7 @@ remote_desktop_dialog_class_init (RemoteDesktopDialogClass *klass)
G_TYPE_INT,
G_TYPE_VARIANT);
- init_screen_cast_widget ();
+ g_type_ensure (SCREEN_CAST_TYPE_WIDGET);
gtk_widget_class_set_template_from_resource (widget_class,
"/org/freedesktop/portal/desktop/gnome/remotedesktopdialog.ui");
gtk_widget_class_bind_template_child (widget_class, RemoteDesktopDialog, accept_button);
diff --git a/src/screencastdialog.c b/src/screencastdialog.c
index 56d4d49..991b711 100644
--- a/src/screencastdialog.c
+++ b/src/screencastdialog.c
@@ -129,7 +129,7 @@ screen_cast_dialog_class_init (ScreenCastDialogClass *klass)
G_TYPE_INT,
G_TYPE_VARIANT);
- init_screen_cast_widget ();
+ g_type_ensure (SCREEN_CAST_TYPE_WIDGET);
gtk_widget_class_set_template_from_resource (widget_class,
"/org/freedesktop/portal/desktop/gnome/screencastdialog.ui");
gtk_widget_class_bind_template_child (widget_class, ScreenCastDialog, accept_button);
diff --git a/src/screencastwidget.c b/src/screencastwidget.c
index a311ef7..94a50c6 100644
--- a/src/screencastwidget.c
+++ b/src/screencastwidget.c
@@ -597,12 +597,6 @@ screen_cast_widget_init (ScreenCastWidget *widget)
gtk_widget_show (widget->virtual_switch);
}
-void
-init_screen_cast_widget (void)
-{
- g_type_ensure (screen_cast_widget_get_type ());
-}
-
void
screen_cast_widget_add_selections (ScreenCastWidget *widget,
GVariantBuilder *selections_builder)
diff --git a/src/screencastwidget.h b/src/screencastwidget.h
index 34360a3..64f94e5 100644
--- a/src/screencastwidget.h
+++ b/src/screencastwidget.h
@@ -28,8 +28,6 @@ typedef struct _ScreenCastWidget ScreenCastWidget;
G_DECLARE_FINAL_TYPE (ScreenCastWidget, screen_cast_widget,
SCREEN_CAST, WIDGET, GtkBox)
-void init_screen_cast_widget (void);
-
void screen_cast_widget_set_app_id (ScreenCastWidget *widget,
const char *app_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]