treewide: Parent from AdwBin where possible

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
Anton Lazarev
2024-01-12 17:23:44 -08:00
parent 4fc1374fe8
commit 001d599495
15 changed files with 24 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ static GParamSpec *props[PROP_LAST_PROP];
struct _CallsSipAccountWidget {
GtkWidget parent;
AdwBin parent;
GtkWidget *child;
@@ -89,7 +89,7 @@ struct _CallsSipAccountWidget {
gboolean port_self_change;
};
G_DEFINE_TYPE (CallsSipAccountWidget, calls_sip_account_widget, GTK_TYPE_WIDGET)
G_DEFINE_TYPE (CallsSipAccountWidget, calls_sip_account_widget, ADW_TYPE_BIN)
static gboolean
@@ -650,8 +650,6 @@ calls_sip_account_widget_class_init (CallsSipAccountWidgetClass *klass)
gtk_widget_class_bind_template_callback (widget_class, on_password_visibility_changed);
gtk_widget_class_bind_template_callback (widget_class, on_port_entry_insert_text);
gtk_widget_class_bind_template_callback (widget_class, on_port_entry_after_insert_text);
gtk_widget_class_set_layout_manager_type(widget_class, GTK_TYPE_BOX_LAYOUT);
}

View File

@@ -32,7 +32,7 @@ G_BEGIN_DECLS
#define CALLS_TYPE_SIP_ACCOUNT_WIDGET (calls_sip_account_widget_get_type ())
G_DECLARE_FINAL_TYPE (CallsSipAccountWidget, calls_sip_account_widget, CALLS, SIP_ACCOUNT_WIDGET, GtkWidget)
G_DECLARE_FINAL_TYPE (CallsSipAccountWidget, calls_sip_account_widget, CALLS, SIP_ACCOUNT_WIDGET, AdwBin)
CallsSipAccountWidget *calls_sip_account_widget_new (CallsSipProvider *provider);
void calls_sip_account_widget_set_origin (CallsSipAccountWidget *self,

View File

@@ -2,7 +2,7 @@
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="libadwaita" version="1.0"/>
<template class="CallsSipAccountWidget" parent="GtkWidget">
<template class="CallsSipAccountWidget" parent="AdwBin">
<child>
<object class="AdwToolbarView" id="child">
<child type="top">