1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-04 20:07:36 +00:00

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">

View file

@ -33,7 +33,7 @@
struct _CallsCallSelectorItem {
GtkBox parent_instance;
AdwBin parent_instance;
CuiCallDisplay *display;
@ -42,7 +42,7 @@ struct _CallsCallSelectorItem {
GtkLabel *status;
};
G_DEFINE_TYPE (CallsCallSelectorItem, calls_call_selector_item, GTK_TYPE_BOX);
G_DEFINE_TYPE (CallsCallSelectorItem, calls_call_selector_item, ADW_TYPE_BIN);
enum {
PROP_0,

View file

@ -25,6 +25,7 @@
#ifndef CALLS_CALL_SELECTOR_ITEM_H__
#define CALLS_CALL_SELECTOR_ITEM_H__
#include <adwaita.h>
#include <call-ui.h>
#include <gtk/gtk.h>
@ -33,7 +34,7 @@ G_BEGIN_DECLS
#define CALLS_TYPE_CALL_SELECTOR_ITEM (calls_call_selector_item_get_type ())
G_DECLARE_FINAL_TYPE (CallsCallSelectorItem, calls_call_selector_item,
CALLS, CALL_SELECTOR_ITEM, GtkBox);
CALLS, CALL_SELECTOR_ITEM, AdwBin);
CallsCallSelectorItem *calls_call_selector_item_new (CuiCallDisplay *display);
CuiCallDisplay *calls_call_selector_item_get_display (CallsCallSelectorItem *item);

View file

@ -32,7 +32,7 @@
#include <adwaita.h>
struct _CallsContactsBox {
GtkWidget parent_instance;
AdwBin parent_instance;
GtkWidget *child;
@ -44,7 +44,7 @@ struct _CallsContactsBox {
FolksSimpleQuery *search_query;
};
G_DEFINE_TYPE (CallsContactsBox, calls_contacts_box, GTK_TYPE_WIDGET);
G_DEFINE_TYPE (CallsContactsBox, calls_contacts_box, ADW_TYPE_BIN);
static void
search_changed_cb (CallsContactsBox *self,
@ -187,8 +187,6 @@ calls_contacts_box_class_init (CallsContactsBoxClass *klass)
gtk_widget_class_bind_template_child (widget_class, CallsContactsBox, contacts_frame);
gtk_widget_class_bind_template_child (widget_class, CallsContactsBox, search_entry);
gtk_widget_class_bind_template_child (widget_class, CallsContactsBox, placeholder_empty);
gtk_widget_class_set_layout_manager_type(widget_class, GTK_TYPE_BOX_LAYOUT);
}

View file

@ -25,13 +25,14 @@
#ifndef CALLS_CONTACTS_BOX_H__
#define CALLS_CONTACTS_BOX_H__
#include <adwaita.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define CALLS_TYPE_CONTACTS_BOX (calls_contacts_box_get_type ())
G_DECLARE_FINAL_TYPE (CallsContactsBox, calls_contacts_box, CALLS, CONTACTS_BOX, GtkWidget);
G_DECLARE_FINAL_TYPE (CallsContactsBox, calls_contacts_box, CALLS, CONTACTS_BOX, AdwBin);
GtkWidget *calls_contacts_box_new (void);

View file

@ -38,7 +38,7 @@
#define CALLS_HISTORY_INCREASE_N_PAGES_THRESHOLD 2
struct _CallsHistoryBox {
GtkWidget parent_instance;
AdwBin parent_instance;
GtkStack *stack;
GtkListBox *history;
@ -54,7 +54,7 @@ struct _CallsHistoryBox {
};
G_DEFINE_TYPE (CallsHistoryBox, calls_history_box, GTK_TYPE_WIDGET);
G_DEFINE_TYPE (CallsHistoryBox, calls_history_box, ADW_TYPE_BIN);
enum {
@ -262,8 +262,6 @@ calls_history_box_class_init (CallsHistoryBoxClass *klass)
gtk_widget_class_bind_template_child (widget_class, CallsHistoryBox, stack);
gtk_widget_class_bind_template_child (widget_class, CallsHistoryBox, history);
gtk_widget_class_bind_template_child (widget_class, CallsHistoryBox, scrolled_window);
gtk_widget_class_set_layout_manager_type(widget_class, GTK_TYPE_BOX_LAYOUT);
}

View file

@ -27,13 +27,14 @@
#include "calls-new-call-box.h"
#include <adwaita.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define CALLS_TYPE_HISTORY_BOX (calls_history_box_get_type ())
G_DECLARE_FINAL_TYPE (CallsHistoryBox, calls_history_box, CALLS, HISTORY_BOX, GtkWidget);
G_DECLARE_FINAL_TYPE (CallsHistoryBox, calls_history_box, CALLS, HISTORY_BOX, AdwBin);
CallsHistoryBox *calls_history_box_new (GListModel *model);

View file

@ -44,7 +44,7 @@ enum {
static GParamSpec *props[PROP_LAST_PROP];
struct _CallsNewCallBox {
GtkWidget parent_instance;
AdwBin parent_instance;
GtkWidget *child;
@ -60,7 +60,7 @@ struct _CallsNewCallBox {
gboolean numeric_input_only;
};
G_DEFINE_TYPE (CallsNewCallBox, calls_new_call_box, GTK_TYPE_WIDGET);
G_DEFINE_TYPE (CallsNewCallBox, calls_new_call_box, ADW_TYPE_BIN);
static CallsOrigin *
@ -379,8 +379,6 @@ calls_new_call_box_class_init (CallsNewCallBoxClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, PROP_LAST_PROP, props);
gtk_widget_class_set_layout_manager_type(widget_class, GTK_TYPE_BOX_LAYOUT);
}

View file

@ -24,13 +24,14 @@
#pragma once
#include <adwaita.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define CALLS_TYPE_NEW_CALL_BOX (calls_new_call_box_get_type ())
G_DECLARE_FINAL_TYPE (CallsNewCallBox, calls_new_call_box, CALLS, NEW_CALL_BOX, GtkWidget)
G_DECLARE_FINAL_TYPE (CallsNewCallBox, calls_new_call_box, CALLS, NEW_CALL_BOX, AdwBin)
CallsNewCallBox *calls_new_call_box_new (void);
void calls_new_call_box_dial (CallsNewCallBox *self,

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="CallsCallSelectorItem" parent="GtkBox">
<template class="CallsCallSelectorItem" parent="AdwBin">
<child>
<object class="GtkFrame">
<property name="child">

View file

@ -2,7 +2,7 @@
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="libadwaita" version="0.0"/>
<template class="CallsContactsBox" parent="GtkWidget">
<template class="CallsContactsBox" parent="AdwBin">
<child>
<object class="GtkScrolledWindow" id="child">
<property name="hexpand">True</property>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<template class="CallsHistoryBox" parent="GtkWidget">
<template class="CallsHistoryBox" parent="AdwBin">
<child>
<object class="GtkStack" id="stack">
<property name="hexpand">True</property>

View file

@ -2,7 +2,7 @@
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="libadwaita" version="1.0"/>
<template class="CallsNewCallBox" parent="GtkWidget">
<template class="CallsNewCallBox" parent="AdwBin">
<child>
<object class="GtkBox" id="child">
<property name="margin-start">24</property>