1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-04 18:47:37 +00:00

treewide: Replace libhandy with libadwaita

Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
Anton Lazarev 2023-12-13 12:56:46 -08:00
parent 4ed1bba0b8
commit ee3abc009a
28 changed files with 117 additions and 118 deletions

View file

@ -26,7 +26,7 @@ While much of the original codebase was written using [GNU's Coding Style][1],
please try to follow this document for newly written code. please try to follow this document for newly written code.
For existing code you should probably try to not mix different code styles too much. For existing code you should probably try to not mix different code styles too much.
This coding style is heavily inspired/copied from [phosh's Coding Style][2] This coding style is heavily inspired/copied from [phosh's Coding Style][2]
which itself is mostly using [libhandy's Coding Style][3]. which itself is mostly using [libadwaita's Coding Style][3].
These are the differences: These are the differences:
@ -124,8 +124,8 @@ individual C files should be structured as (top to bottom of file):
The reason public methods go at the bottom is that they have declarations in The reason public methods go at the bottom is that they have declarations in
the header file and can thus be referenced from anywhere else in the source the header file and can thus be referenced from anywhere else in the source
file. file.
Try to avoid forward declarations where possible. Try to avoid forward declarations where possible.
[1]: https://www.gnu.org/prep/standards/standards.html#Formatting [1]: https://www.gnu.org/prep/standards/standards.html#Formatting
[2]: https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/HACKING.md#coding-style [2]: https://gitlab.gnome.org/World/Phosh/phosh/-/blob/main/HACKING.md#coding-style
[3]: https://gitlab.gnome.org/GNOME/libhandy/-/blob/main/HACKING.md#coding-style [3]: https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/HACKING.md#coding-style

2
debian/control vendored
View file

@ -11,6 +11,7 @@ Build-Depends:
gstreamer1.0-plugins-bad, gstreamer1.0-plugins-bad,
gstreamer1.0-plugins-good, gstreamer1.0-plugins-good,
gtk-doc-tools <!nodoc>, gtk-doc-tools <!nodoc>,
libadwaita-1-dev (>= 1.2),
libcallaudio-dev (>= 0.0.5), libcallaudio-dev (>= 0.0.5),
libebook-contacts1.2-dev, libebook-contacts1.2-dev,
libfeedback-dev (>= 0.0.1), libfeedback-dev (>= 0.0.1),
@ -19,7 +20,6 @@ Build-Depends:
libgstreamer1.0-dev, libgstreamer1.0-dev,
libgtk-3-dev, libgtk-3-dev,
libgtk-3-doc <!nodoc>, libgtk-3-doc <!nodoc>,
libhandy-1-dev (>= 1.1.90),
libmm-glib-dev (>= 1.12.0), libmm-glib-dev (>= 1.12.0),
libpeas-dev, libpeas-dev,
librsvg2-common, librsvg2-common,

View file

@ -69,9 +69,9 @@ struct _CallsSipAccountWidget {
GtkEntry *password; GtkEntry *password;
GtkEntry *port; GtkEntry *port;
char *last_port; char *last_port;
HdyComboRow *protocol; AdwComboRow *protocol;
GListStore *protocols_store; /* bound model for protocol HdyComboRow */ GListStore *protocols_store; /* bound model for protocol AdwComboRow */
HdyComboRow *media_encryption; AdwComboRow *media_encryption;
GListStore *media_encryption_store; GListStore *media_encryption_store;
GtkSwitch *tel_switch; GtkSwitch *tel_switch;
GtkSwitch *auto_connect_switch; GtkSwitch *auto_connect_switch;
@ -114,13 +114,13 @@ is_form_filled (CallsSipAccountWidget *self)
static const char * static const char *
get_selected_protocol (CallsSipAccountWidget *self) get_selected_protocol (CallsSipAccountWidget *self)
{ {
g_autoptr (HdyValueObject) obj = NULL; g_autoptr (AdwValueObject) obj = NULL;
const char *protocol = NULL; const char *protocol = NULL;
gint i; gint i;
if ((i = hdy_combo_row_get_selected_index (self->protocol)) != -1) { if ((i = adw_combo_row_get_selected_index (self->protocol)) != -1) {
obj = g_list_model_get_item (G_LIST_MODEL (self->protocols_store), i); obj = g_list_model_get_item (G_LIST_MODEL (self->protocols_store), i);
protocol = hdy_value_object_get_string (obj); protocol = adw_value_object_get_string (obj);
} }
return protocol; return protocol;
} }
@ -129,11 +129,11 @@ get_selected_protocol (CallsSipAccountWidget *self)
static SipMediaEncryption static SipMediaEncryption
get_selected_media_encryption (CallsSipAccountWidget *self) get_selected_media_encryption (CallsSipAccountWidget *self)
{ {
g_autoptr (HdyValueObject) obj = NULL; g_autoptr (AdwValueObject) obj = NULL;
SipMediaEncryption media_encryption = SIP_MEDIA_ENCRYPTION_NONE; SipMediaEncryption media_encryption = SIP_MEDIA_ENCRYPTION_NONE;
gint i; gint i;
if ((i = hdy_combo_row_get_selected_index (self->media_encryption)) != -1) { if ((i = adw_combo_row_get_selected_index (self->media_encryption)) != -1) {
obj = g_list_model_get_item (G_LIST_MODEL (self->media_encryption_store), i); obj = g_list_model_get_item (G_LIST_MODEL (self->media_encryption_store), i);
media_encryption = (SipMediaEncryption) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (obj), "value")); media_encryption = (SipMediaEncryption) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (obj), "value"));
} }
@ -158,7 +158,7 @@ update_media_encryption (CallsSipAccountWidget *self)
transport_is_tls | sdes_always_allowed); transport_is_tls | sdes_always_allowed);
if (!transport_is_tls && !sdes_always_allowed) if (!transport_is_tls && !sdes_always_allowed)
hdy_combo_row_set_selected_index (self->media_encryption, 0); adw_combo_row_set_selected_index (self->media_encryption, 0);
} }
@ -335,9 +335,9 @@ find_protocol (CallsSipAccountWidget *self,
len = g_list_model_get_n_items (G_LIST_MODEL (self->protocols_store)); len = g_list_model_get_n_items (G_LIST_MODEL (self->protocols_store));
for (guint i = 0; i < len; i++) { for (guint i = 0; i < len; i++) {
g_autoptr (HdyValueObject) obj = g_autoptr (AdwValueObject) obj =
g_list_model_get_item (G_LIST_MODEL (self->protocols_store), i); g_list_model_get_item (G_LIST_MODEL (self->protocols_store), i);
const char *prot = hdy_value_object_get_string (obj); const char *prot = adw_value_object_get_string (obj);
if (g_strcmp0 (protocol, prot) == 0) { if (g_strcmp0 (protocol, prot) == 0) {
if (index) if (index)
@ -363,7 +363,7 @@ find_media_encryption (CallsSipAccountWidget *self,
len = g_list_model_get_n_items (G_LIST_MODEL (self->media_encryption_store)); len = g_list_model_get_n_items (G_LIST_MODEL (self->media_encryption_store));
for (guint i = 0; i < len; i++) { for (guint i = 0; i < len; i++) {
g_autoptr (HdyValueObject) obj = g_autoptr (AdwValueObject) obj =
g_list_model_get_item (G_LIST_MODEL (self->media_encryption_store), i); g_list_model_get_item (G_LIST_MODEL (self->media_encryption_store), i);
SipMediaEncryption obj_enc = SipMediaEncryption obj_enc =
(SipMediaEncryption) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (obj), "value")); (SipMediaEncryption) GPOINTER_TO_INT (g_object_get_data (G_OBJECT (obj), "value"));
@ -390,9 +390,9 @@ clear_form (CallsSipAccountWidget *self)
gtk_entry_set_text (self->user, ""); gtk_entry_set_text (self->user, "");
gtk_entry_set_text (self->password, ""); gtk_entry_set_text (self->password, "");
gtk_entry_set_text (self->port, "0"); gtk_entry_set_text (self->port, "0");
hdy_combo_row_set_selected_index (self->protocol, 0); adw_combo_row_set_selected_index (self->protocol, 0);
gtk_widget_set_sensitive (GTK_WIDGET (self->media_encryption), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (self->media_encryption), FALSE);
hdy_combo_row_set_selected_index (self->media_encryption, 0); adw_combo_row_set_selected_index (self->media_encryption, 0);
gtk_switch_set_state (self->tel_switch, FALSE); gtk_switch_set_state (self->tel_switch, FALSE);
gtk_switch_set_state (self->auto_connect_switch, TRUE); gtk_switch_set_state (self->auto_connect_switch, TRUE);
@ -464,8 +464,8 @@ edit_form (CallsSipAccountWidget *self,
gtk_entry_set_text (self->password, password); gtk_entry_set_text (self->password, password);
set_password_visibility (self, FALSE); set_password_visibility (self, FALSE);
gtk_entry_set_text (self->port, port_str); gtk_entry_set_text (self->port, port_str);
hdy_combo_row_set_selected_index (self->protocol, protocol_index); adw_combo_row_set_selected_index (self->protocol, protocol_index);
hdy_combo_row_set_selected_index (self->media_encryption, encryption_index); adw_combo_row_set_selected_index (self->media_encryption, encryption_index);
gtk_switch_set_state (self->tel_switch, can_tel); gtk_switch_set_state (self->tel_switch, can_tel);
gtk_switch_set_state (self->auto_connect_switch, auto_connect); gtk_switch_set_state (self->auto_connect_switch, auto_connect);
@ -652,7 +652,7 @@ calls_sip_account_widget_class_init (CallsSipAccountWidgetClass *klass)
static void static void
calls_sip_account_widget_init (CallsSipAccountWidget *self) calls_sip_account_widget_init (CallsSipAccountWidget *self)
{ {
HdyValueObject *obj; AdwValueObject *obj;
self->settings = calls_settings_get_default (); self->settings = calls_settings_get_default ();
@ -663,43 +663,43 @@ calls_sip_account_widget_init (CallsSipAccountWidget *self)
gtk_widget_init_template (GTK_WIDGET (self)); gtk_widget_init_template (GTK_WIDGET (self));
self->media_encryption_store = g_list_store_new (HDY_TYPE_VALUE_OBJECT); self->media_encryption_store = g_list_store_new (ADW_TYPE_VALUE_OBJECT);
obj = hdy_value_object_new_string (_("No encryption")); obj = adw_value_object_new_string (_("No encryption"));
g_object_set_data (G_OBJECT (obj), g_object_set_data (G_OBJECT (obj),
"value", GINT_TO_POINTER (SIP_MEDIA_ENCRYPTION_NONE)); "value", GINT_TO_POINTER (SIP_MEDIA_ENCRYPTION_NONE));
g_list_store_insert (self->media_encryption_store, 0, obj); g_list_store_insert (self->media_encryption_store, 0, obj);
g_clear_object (&obj); g_clear_object (&obj);
/* TODO Optional encryption */ /* TODO Optional encryption */
obj = hdy_value_object_new_string (_("Force encryption")); obj = adw_value_object_new_string (_("Force encryption"));
g_object_set_data (G_OBJECT (obj), g_object_set_data (G_OBJECT (obj),
"value", GINT_TO_POINTER (SIP_MEDIA_ENCRYPTION_FORCED)); "value", GINT_TO_POINTER (SIP_MEDIA_ENCRYPTION_FORCED));
g_list_store_insert (self->media_encryption_store, 1, obj); g_list_store_insert (self->media_encryption_store, 1, obj);
g_clear_object (&obj); g_clear_object (&obj);
hdy_combo_row_bind_name_model (self->media_encryption, adw_combo_row_bind_name_model (self->media_encryption,
G_LIST_MODEL (self->media_encryption_store), G_LIST_MODEL (self->media_encryption_store),
(HdyComboRowGetNameFunc) hdy_value_object_dup_string, (AdwComboRowGetNameFunc) adw_value_object_dup_string,
NULL, NULL); NULL, NULL);
self->protocols_store = g_list_store_new (HDY_TYPE_VALUE_OBJECT); self->protocols_store = g_list_store_new (ADW_TYPE_VALUE_OBJECT);
obj = hdy_value_object_new_string ("UDP"); obj = adw_value_object_new_string ("UDP");
g_list_store_insert (self->protocols_store, 0, obj); g_list_store_insert (self->protocols_store, 0, obj);
g_clear_object (&obj); g_clear_object (&obj);
obj = hdy_value_object_new_string ("TCP"); obj = adw_value_object_new_string ("TCP");
g_list_store_insert (self->protocols_store, 1, obj); g_list_store_insert (self->protocols_store, 1, obj);
g_clear_object (&obj); g_clear_object (&obj);
obj = hdy_value_object_new_string ("TLS"); obj = adw_value_object_new_string ("TLS");
g_list_store_insert (self->protocols_store, 2, obj); g_list_store_insert (self->protocols_store, 2, obj);
g_clear_object (&obj); g_clear_object (&obj);
hdy_combo_row_bind_name_model (self->protocol, adw_combo_row_bind_name_model (self->protocol,
G_LIST_MODEL (self->protocols_store), G_LIST_MODEL (self->protocols_store),
(HdyComboRowGetNameFunc) hdy_value_object_dup_string, (AdwComboRowGetNameFunc) adw_value_object_dup_string,
NULL, NULL); NULL, NULL);
} }

View file

@ -26,7 +26,7 @@
#include "calls-sip-provider.h" #include "calls-sip-provider.h"
#include <handy.h> #include <adwaita.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View file

@ -46,7 +46,7 @@ sip_deps = [
dependency('gobject-2.0'), dependency('gobject-2.0'),
dependency('gstreamer-1.0'), dependency('gstreamer-1.0'),
dependency('gtk4'), dependency('gtk4'),
dependency('libhandy-1', version: '>= 1.1.90'), dependency('libadwaita-1', version: '>= 1.2'),
dependency('libpeas-1.0'), dependency('libpeas-1.0'),
dependency('sofia-sip-ua-glib'), dependency('sofia-sip-ua-glib'),
dependency('libsecret-1'), dependency('libsecret-1'),

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<requires lib="libhandy" version="1.0"/> <requires lib="libadwaita" version="1.0"/>
<template class="CallsSipAccountWidget" parent="GtkWidget"> <template class="CallsSipAccountWidget" parent="GtkWidget">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
@ -10,7 +10,7 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="HdyHeaderBar" id="header_add"> <object class="AdwHeaderBar" id="header_add">
<property name="title" translatable="yes">Add Account</property> <property name="title" translatable="yes">Add Account</property>
<property name="show-close-button">True</property> <property name="show-close-button">True</property>
<child> <child>
@ -39,7 +39,7 @@
</child> </child>
<child> <child>
<object class="HdyHeaderBar" id="header_edit"> <object class="AdwHeaderBar" id="header_edit">
<property name="visible">True</property> <property name="visible">True</property>
<property name="show-close-button">True</property> <property name="show-close-button">True</property>
<property name="title" translatable="yes">Manage Account</property> <property name="title" translatable="yes">Manage Account</property>
@ -83,13 +83,13 @@
</child> </child>
<child> <child>
<object class="HdyPreferencesPage"> <object class="AdwPreferencesPage">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyPreferencesGroup"> <object class="AdwPreferencesGroup">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyActionRow"> <object class="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Server</property> <property name="title" translatable="yes">Server</property>
<child> <child>
@ -104,10 +104,10 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyPreferencesGroup"> <object class="AdwPreferencesGroup">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyActionRow"> <object class="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Display Name</property> <property name="title" translatable="yes">Display Name</property>
<property name="subtitle" translatable="yes">Optional</property> <property name="subtitle" translatable="yes">Optional</property>
@ -123,10 +123,10 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyPreferencesGroup"> <object class="AdwPreferencesGroup">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyActionRow"> <object class="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">User ID</property> <property name="title" translatable="yes">User ID</property>
<child> <child>
@ -139,7 +139,7 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyActionRow"> <object class="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Password</property> <property name="title" translatable="yes">Password</property>
<child> <child>
@ -161,10 +161,10 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyPreferencesGroup"> <object class="AdwPreferencesGroup">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyActionRow"> <object class="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Port</property> <property name="title" translatable="yes">Port</property>
<child> <child>
@ -180,14 +180,14 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyComboRow" id="protocol"> <object class="AdwComboRow" id="protocol">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Transport</property> <property name="title" translatable="yes">Transport</property>
<signal name="notify::selected-index" handler="on_user_changed" swapped="yes"/> <signal name="notify::selected-index" handler="on_user_changed" swapped="yes"/>
</object> </object>
</child> </child>
<child> <child>
<object class="HdyComboRow" id="media_encryption"> <object class="AdwComboRow" id="media_encryption">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Media Encryption</property> <property name="title" translatable="yes">Media Encryption</property>
<signal name="notify::selected-index" handler="on_user_changed" swapped="yes"/> <signal name="notify::selected-index" handler="on_user_changed" swapped="yes"/>
@ -196,10 +196,10 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyPreferencesGroup"> <object class="AdwPreferencesGroup">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyActionRow"> <object class="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Use for Phone Calls</property> <property name="title" translatable="yes">Use for Phone Calls</property>
<child> <child>
@ -212,7 +212,7 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyActionRow"> <object class="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Automatically Connect</property> <property name="title" translatable="yes">Automatically Connect</property>
<child> <child>

View file

@ -40,10 +40,10 @@
/** /**
* Section:calls-account-overview * Section:calls-account-overview
* short_description: A #HdyWindow to manage VoIP accounts * short_description: A #AdwWindow to manage VoIP accounts
* @Title: CallsAccountOverview * @Title: CallsAccountOverview
* *
* This is a #HdyWindow derived window to display and manage the * This is a #AdwWindow derived window to display and manage the
* VoIP accounts. Each available #CallsAccount from any #CallsAccountProvider * VoIP accounts. Each available #CallsAccount from any #CallsAccountProvider
* will be listed as a #CallsAccountRow. * will be listed as a #CallsAccountRow.
*/ */
@ -55,7 +55,7 @@ typedef enum {
struct _CallsAccountOverview { struct _CallsAccountOverview {
HdyWindow parent; AdwWindow parent;
/* UI widgets */ /* UI widgets */
GtkStack *stack; GtkStack *stack;
@ -81,7 +81,7 @@ struct _CallsAccountOverview {
CallsInAppNotification *in_app_notification; CallsInAppNotification *in_app_notification;
}; };
G_DEFINE_TYPE (CallsAccountOverview, calls_account_overview, HDY_TYPE_WINDOW) G_DEFINE_TYPE (CallsAccountOverview, calls_account_overview, ADW_TYPE_WINDOW)
static void static void

View file

@ -24,13 +24,13 @@
#pragma once #pragma once
#include <handy.h> #include <adwaita.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define CALLS_TYPE_ACCOUNT_OVERVIEW (calls_account_overview_get_type ()) #define CALLS_TYPE_ACCOUNT_OVERVIEW (calls_account_overview_get_type ())
G_DECLARE_FINAL_TYPE (CallsAccountOverview, calls_account_overview, CALLS, ACCOUNT_OVERVIEW, HdyWindow) G_DECLARE_FINAL_TYPE (CallsAccountOverview, calls_account_overview, CALLS, ACCOUNT_OVERVIEW, AdwWindow)
CallsAccountOverview *calls_account_overview_new (void); CallsAccountOverview *calls_account_overview_new (void);

View file

@ -30,10 +30,10 @@
/** /**
* Section:calls-account-row * Section:calls-account-row
* short_description: A #HdyActionRow for use in #CallsAccountOverview * short_description: A #AdwActionRow for use in #CallsAccountOverview
* @Title: CallsAccountRow * @Title: CallsAccountRow
* *
* This is a #HdyActionRow derived widget representing a #CallsAccount * This is a #AdwActionRow derived widget representing a #CallsAccount
* for VoIP accounts (currently only SIP). * for VoIP accounts (currently only SIP).
*/ */
@ -48,18 +48,18 @@ enum {
static GParamSpec *props[PROP_LAST_PROP]; static GParamSpec *props[PROP_LAST_PROP];
struct _CallsAccountRow { struct _CallsAccountRow {
HdyActionRow parent; AdwActionRow parent;
CallsAccountProvider *provider; CallsAccountProvider *provider;
CallsAccount *account; CallsAccount *account;
gboolean online; gboolean online;
/* UI elements */ /* UI elements */
HdyAvatar *avatar; AdwAvatar *avatar;
GtkSwitch *online_switch; GtkSwitch *online_switch;
}; };
G_DEFINE_TYPE (CallsAccountRow, calls_account_row, HDY_TYPE_ACTION_ROW) G_DEFINE_TYPE (CallsAccountRow, calls_account_row, ADW_TYPE_ACTION_ROW)
static void static void

View file

@ -27,14 +27,14 @@
#include "calls-account.h" #include "calls-account.h"
#include "calls-account-provider.h" #include "calls-account-provider.h"
#include <handy.h> #include <adwaita.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define CALLS_TYPE_ACCOUNT_ROW (calls_account_row_get_type ()) #define CALLS_TYPE_ACCOUNT_ROW (calls_account_row_get_type ())
G_DECLARE_FINAL_TYPE (CallsAccountRow, calls_account_row, CALLS, ACCOUNT_ROW, HdyActionRow); G_DECLARE_FINAL_TYPE (CallsAccountRow, calls_account_row, CALLS, ACCOUNT_ROW, AdwActionRow);
CallsAccountRow *calls_account_row_new (CallsAccountProvider *provider, CallsAccountRow *calls_account_row_new (CallsAccountProvider *provider,
CallsAccount *account); CallsAccount *account);

View file

@ -44,10 +44,10 @@
#include "calls-ringer.h" #include "calls-ringer.h"
#include "version.h" #include "version.h"
#include <adwaita.h>
#include <call-ui.h> #include <call-ui.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <glib-unix.h> #include <glib-unix.h>
#include <handy.h>
#include <libcallaudio.h> #include <libcallaudio.h>
/** /**
@ -474,18 +474,18 @@ startup (GApplication *application)
{ {
g_autoptr (GtkCssProvider) provider = NULL; g_autoptr (GtkCssProvider) provider = NULL;
g_autoptr (GError) error = NULL; g_autoptr (GError) error = NULL;
#if HDY_CHECK_VERSION (1, 5, 0) #if ADW_CHECK_VERSION (1, 5, 0)
HdyStyleManager *style_manager; AdwStyleManager *style_manager;
#endif #endif
G_APPLICATION_CLASS (calls_application_parent_class)->startup (application); G_APPLICATION_CLASS (calls_application_parent_class)->startup (application);
hdy_init (); adw_init ();
#if HDY_CHECK_VERSION (1, 5, 0) #if ADW_CHECK_VERSION (1, 5, 0)
style_manager = hdy_style_manager_get_default (); style_manager = adw_style_manager_get_default ();
hdy_style_manager_set_color_scheme (style_manager, HDY_COLOR_SCHEME_PREFER_LIGHT); adw_style_manager_set_color_scheme (style_manager, ADW_COLOR_SCHEME_PREFER_LIGHT);
#endif #endif
if (!call_audio_init (&error)) if (!call_audio_init (&error))

View file

@ -28,10 +28,10 @@
#include "calls-manager.h" #include "calls-manager.h"
#include "calls-util.h" #include "calls-util.h"
#include <adwaita.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <glib-object.h> #include <glib-object.h>
#include <glib.h> #include <glib.h>
#include <handy.h>
#include <sys/time.h> #include <sys/time.h>
#include <errno.h> #include <errno.h>

View file

@ -66,7 +66,7 @@ static void
set_party (CallsCallSelectorItem *self) set_party (CallsCallSelectorItem *self)
{ {
CuiCall *call; CuiCall *call;
// FIXME: use HdyAvatar and the contact avatar // FIXME: use AdwAvatar and the contact avatar
GtkWidget *image = gtk_image_new_from_icon_name ("avatar-default-symbolic", GTK_ICON_SIZE_DIALOG); GtkWidget *image = gtk_image_new_from_icon_name ("avatar-default-symbolic", GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (self->main_box, image, TRUE, TRUE, 0); gtk_box_pack_start (self->main_box, image, TRUE, TRUE, 0);

View file

@ -35,9 +35,9 @@
#include "calls-ui-call-data.h" #include "calls-ui-call-data.h"
#include "calls-util.h" #include "calls-util.h"
#include <adwaita.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <glib-object.h> #include <glib-object.h>
#include <handy.h>
struct _CallsCallWindow { struct _CallsCallWindow {

View file

@ -29,8 +29,7 @@
#include <glib/gi18n.h> #include <glib/gi18n.h>
#define HANDY_USE_UNSTABLE_API #include <adwaita.h>
#include <handy.h>
struct _CallsContactsBox { struct _CallsContactsBox {
GtkWidget parent_instance; GtkWidget parent_instance;

View file

@ -10,8 +10,8 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
#include <adwaita.h>
#include <folks/folks.h> #include <folks/folks.h>
#include <handy.h>
#include "calls-contacts-row.h" #include "calls-contacts-row.h"
#include "calls-contacts-provider.h" #include "calls-contacts-provider.h"
@ -103,7 +103,7 @@ avatar_changed_cb (CallsContactsRow *self)
if (icon == NULL) if (icon == NULL)
return; return;
hdy_avatar_set_loadable_icon (HDY_AVATAR (self->avatar), icon); adw_avatar_set_loadable_icon (ADW_AVATAR (self->avatar), icon);
} }
static void static void

View file

@ -36,19 +36,19 @@
#include "calls-util.h" #include "calls-util.h"
#include "version.h" #include "version.h"
#include <adwaita.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <glib-object.h> #include <glib-object.h>
#include <handy.h>
struct _CallsMainWindow { struct _CallsMainWindow {
HdyApplicationWindow parent_instance; AdwApplicationWindow parent_instance;
GListModel *record_store; GListModel *record_store;
CallsInAppNotification *in_app_notification; CallsInAppNotification *in_app_notification;
HdyViewSwitcherTitle *title_switcher; AdwViewSwitcherTitle *title_switcher;
GtkStack *main_stack; GtkStack *main_stack;
GtkRevealer *permanent_error_revealer; GtkRevealer *permanent_error_revealer;
@ -68,7 +68,7 @@ struct _CallsMainWindow {
GtkButton *ussd_reply_button; GtkButton *ussd_reply_button;
}; };
G_DEFINE_TYPE (CallsMainWindow, calls_main_window, HDY_TYPE_APPLICATION_WINDOW); G_DEFINE_TYPE (CallsMainWindow, calls_main_window, ADW_TYPE_APPLICATION_WINDOW);
enum { enum {
PROP_0, PROP_0,
@ -428,7 +428,7 @@ size_allocate (GtkWidget *widget,
{ {
CallsMainWindow *self = CALLS_MAIN_WINDOW (widget); CallsMainWindow *self = CALLS_MAIN_WINDOW (widget);
hdy_view_switcher_title_set_view_switcher_enabled (self->title_switcher, adw_view_switcher_title_set_view_switcher_enabled (self->title_switcher,
allocation->width > 400); allocation->width > 400);
GTK_WIDGET_CLASS (calls_main_window_parent_class)->size_allocate (widget, allocation); GTK_WIDGET_CLASS (calls_main_window_parent_class)->size_allocate (widget, allocation);

View file

@ -25,13 +25,13 @@
#ifndef CALLS_MAIN_WINDOW_H__ #ifndef CALLS_MAIN_WINDOW_H__
#define CALLS_MAIN_WINDOW_H__ #define CALLS_MAIN_WINDOW_H__
#include <handy.h> #include <adwaita.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define CALLS_TYPE_MAIN_WINDOW (calls_main_window_get_type ()) #define CALLS_TYPE_MAIN_WINDOW (calls_main_window_get_type ())
G_DECLARE_FINAL_TYPE (CallsMainWindow, calls_main_window, CALLS, MAIN_WINDOW, HdyApplicationWindow); G_DECLARE_FINAL_TYPE (CallsMainWindow, calls_main_window, CALLS, MAIN_WINDOW, AdwApplicationWindow);
CallsMainWindow *calls_main_window_new (GtkApplication *application, CallsMainWindow *calls_main_window_new (GtkApplication *application,
GListModel *record_store); GListModel *record_store);

View file

@ -32,9 +32,9 @@
#include "calls-ussd.h" #include "calls-ussd.h"
#include "calls-util.h" #include "calls-util.h"
#include <adwaita.h>
#include <call-ui.h> #include <call-ui.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
#include <handy.h>
enum { enum {
PROP_0, PROP_0,
@ -47,10 +47,10 @@ struct _CallsNewCallBox {
GtkWidget parent_instance; GtkWidget parent_instance;
GtkListBox *origin_list_box; GtkListBox *origin_list_box;
HdyComboRow *origin_list; AdwComboRow *origin_list;
CuiDialpad *dialpad; CuiDialpad *dialpad;
GtkEntry *address_entry; GtkEntry *address_entry;
HdyActionRow *result; AdwActionRow *result;
GtkButton *dial_result; GtkButton *dial_result;
GList *dial_queue; GList *dial_queue;
@ -65,11 +65,11 @@ static CallsOrigin *
get_selected_origin (CallsNewCallBox *self) get_selected_origin (CallsNewCallBox *self)
{ {
g_autoptr (CallsOrigin) origin = NULL; g_autoptr (CallsOrigin) origin = NULL;
GListModel *model = hdy_combo_row_get_model (self->origin_list); GListModel *model = adw_combo_row_get_model (self->origin_list);
gint index = -1; gint index = -1;
if (model) if (model)
index = hdy_combo_row_get_selected_index (self->origin_list); index = adw_combo_row_get_selected_index (self->origin_list);
if (model && index >= 0) if (model && index >= 0)
origin = g_list_model_get_item (model, index); origin = g_list_model_get_item (model, index);
@ -326,7 +326,7 @@ calls_new_call_box_init (CallsNewCallBox *self)
gtk_widget_init_template (GTK_WIDGET (self)); gtk_widget_init_template (GTK_WIDGET (self));
origins = calls_manager_get_origins (calls_manager_get_default ()); origins = calls_manager_get_origins (calls_manager_get_default ());
hdy_combo_row_bind_name_model (self->origin_list, origins, adw_combo_row_bind_name_model (self->origin_list, origins,
get_origin_name, self, NULL); get_origin_name, self, NULL);
g_signal_connect_object (origins, g_signal_connect_object (origins,

View file

@ -31,7 +31,7 @@ calls_includes = [ top_include, src_include ]
calls_deps = [ dependency('gobject-2.0', version: '>= 2.58'), calls_deps = [ dependency('gobject-2.0', version: '>= 2.58'),
dependency('gtk4'), dependency('gtk4'),
dependency('libhandy-1', version: '>= 1.4.0'), dependency('libadwaita-1', version: '>= 1.2'),
dependency('libfeedback-0.0'), dependency('libfeedback-0.0'),
dependency('libpeas-1.0'), dependency('libpeas-1.0'),
dependency('gom-1.0'), dependency('gom-1.0'),

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<requires lib="libhandy" version="1.0"/> <requires lib="libadwaita" version="1.0"/>
<template class="CallsAccountOverview" parent="HdyWindow"> <template class="CallsAccountOverview" parent="AdwWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="default-width">380</property> <property name="default-width">380</property>
<property name="default-height">660</property> <property name="default-height">660</property>
@ -12,7 +12,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="HdyHeaderBar"> <object class="AdwHeaderBar">
<property name="title" translatable="yes">VoIP Accounts</property> <property name="title" translatable="yes">VoIP Accounts</property>
<property name="show-close-button">True</property> <property name="show-close-button">True</property>
<property name="visible">True</property> <property name="visible">True</property>
@ -47,7 +47,7 @@
<!-- First child type: No accounts present: Show a blurb and a Add button --> <!-- First child type: No accounts present: Show a blurb and a Add button -->
<child> <child>
<object class="HdyStatusPage" id="intro"> <object class="AdwStatusPage" id="intro">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title" translatable="yes">Add VoIP Accounts</property> <property name="title" translatable="yes">Add VoIP Accounts</property>
<property name="icon-name">system-users-symbolic</property> <property name="icon-name">system-users-symbolic</property>
@ -115,7 +115,7 @@
</object> </object>
<object class="HdyWindow" id="account_window"> <object class="AdwWindow" id="account_window">
<property name="visible">False</property> <property name="visible">False</property>
<property name="default-width">380</property> <property name="default-width">380</property>
<property name="default-height">660</property> <property name="default-height">660</property>

View file

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<requires lib="gtk+" version="3.20"/> <requires lib="gtk+" version="3.20"/>
<requires lib="libhandy" version="1.0"/> <requires lib="libadwaita" version="1.0"/>
<template class="CallsAccountRow" parent="HdyActionRow"> <template class="CallsAccountRow" parent="AdwActionRow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="title">Title</property> <property name="title">Title</property>
<property name="subtitle">Subtitle</property> <property name="subtitle">Subtitle</property>
<property name="activatable">True</property> <property name="activatable">True</property>
<child type="prefix"> <child type="prefix">
<object class="HdyAvatar" id="avatar"> <object class="AdwAvatar" id="avatar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="show-initials">True</property> <property name="show-initials">True</property>
<property name="size">48</property> <property name="size">48</property>

View file

@ -13,7 +13,7 @@
<object class="GtkBox"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyAvatar" id="avatar"> <object class="AdwAvatar" id="avatar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="margin_left">8</property> <property name="margin_left">8</property>
<property name="margin_top">8</property> <property name="margin_top">8</property>

View file

@ -2,7 +2,7 @@
<!-- Generated with glade 3.22.0 --> <!-- Generated with glade 3.22.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.20"/> <requires lib="gtk+" version="3.20"/>
<requires lib="libhandy" version="0.0"/> <requires lib="libadwaita" version="0.0"/>
<template class="CallsContactsBox" parent="GtkWidget"> <template class="CallsContactsBox" parent="GtkWidget">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
@ -10,7 +10,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="expand">True</property> <property name="expand">True</property>
<child> <child>
<object class="HdyClamp"> <object class="AdwClamp">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">

View file

@ -13,7 +13,7 @@
<!-- Avatar --> <!-- Avatar -->
<child> <child>
<object class="HdyAvatar" id="avatar"> <object class="AdwAvatar" id="avatar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="valign">center</property> <property name="valign">center</property>
<property name="size">36</property> <property name="size">36</property>

View file

@ -7,7 +7,7 @@
<object class="GtkStack" id="stack"> <object class="GtkStack" id="stack">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyStatusPage"> <object class="AdwStatusPage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="icon-name">call-start-symbolic</property> <property name="icon-name">call-start-symbolic</property>
<property name="title" translatable="yes">No Recent Calls</property> <property name="title" translatable="yes">No Recent Calls</property>
@ -22,7 +22,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="hscrollbar-policy">never</property> <property name="hscrollbar-policy">never</property>
<child> <child>
<object class="HdyClamp"> <object class="AdwClamp">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="GtkListBox" id="history"> <object class="GtkListBox" id="history">

View file

@ -2,8 +2,8 @@
<!-- Generated with glade 3.22.0 --> <!-- Generated with glade 3.22.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.20"/> <requires lib="gtk+" version="3.20"/>
<requires lib="libhandy" version="1.0"/> <requires lib="libadwaita" version="1.0"/>
<template class="CallsMainWindow" parent="HdyApplicationWindow"> <template class="CallsMainWindow" parent="AdwApplicationWindow">
<property name="title" translatable="yes">Calls</property> <property name="title" translatable="yes">Calls</property>
<property name="hide_titlebar_when_maximized">True</property> <property name="hide_titlebar_when_maximized">True</property>
<property name="show_menubar">False</property> <property name="show_menubar">False</property>
@ -13,13 +13,13 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
<object class="HdyHeaderBar"> <object class="AdwHeaderBar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="centering_policy">strict</property> <property name="centering_policy">strict</property>
<property name="show_close_button">True</property> <property name="show_close_button">True</property>
<property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/> <property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/>
<child type="title"> <child type="title">
<object class="HdyViewSwitcherTitle" id="title_switcher"> <object class="AdwViewSwitcherTitle" id="title_switcher">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stack">main_stack</property> <property name="stack">main_stack</property>
<property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/> <property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/>
@ -81,7 +81,7 @@
</object> </object>
</child> </child>
<child> <child>
<object class="HdyViewSwitcherBar" id="switcher_bar"> <object class="AdwViewSwitcherBar" id="switcher_bar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="stack">main_stack</property> <property name="stack">main_stack</property>
<property name="reveal" bind-source="title_switcher" bind-property="title-visible" bind-flags="sync-create"/> <property name="reveal" bind-source="title_switcher" bind-property="title-visible" bind-flags="sync-create"/>
@ -102,7 +102,7 @@
<property name="default-height">200</property> <property name="default-height">200</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete" object="ussd_dialog" swapped="yes"/> <signal name="delete-event" handler="gtk_widget_hide_on_delete" object="ussd_dialog" swapped="yes"/>
<child type="titlebar"> <child type="titlebar">
<object class="HdyHeaderBar"> <object class="AdwHeaderBar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="show-close-button">False</property> <property name="show-close-button">False</property>
<property name="title" translatable="yes">USSD</property> <property name="title" translatable="yes">USSD</property>

View file

@ -2,7 +2,7 @@
<!-- Generated with glade 3.22.0 --> <!-- Generated with glade 3.22.0 -->
<interface> <interface>
<requires lib="gtk+" version="3.22"/> <requires lib="gtk+" version="3.22"/>
<requires lib="libhandy" version="1.0"/> <requires lib="libadwaita" version="1.0"/>
<template class="CallsNewCallBox" parent="GtkWidget"> <template class="CallsNewCallBox" parent="GtkWidget">
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
@ -14,7 +14,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<child> <child>
<object class="HdyClamp"> <object class="AdwClamp">
<property name="visible">True</property> <property name="visible">True</property>
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<child> <child>
@ -27,7 +27,7 @@
<property name="selection-mode">none</property> <property name="selection-mode">none</property>
<property name="halign">center</property> <property name="halign">center</property>
<child> <child>
<object class="HdyComboRow" id="origin_list"> <object class="AdwComboRow" id="origin_list">
<property name="visible">True</property> <property name="visible">True</property>
<signal name="notify::selected-index" handler="notify_selected_index_cb" swapped="yes"/> <signal name="notify::selected-index" handler="notify_selected_index_cb" swapped="yes"/>
</object> </object>
@ -58,13 +58,13 @@
<property name="margin-top">16</property> <property name="margin-top">16</property>
<property name="selection-mode">none</property> <property name="selection-mode">none</property>
<child> <child>
<object class="HdyActionRow" id="result"> <object class="AdwActionRow" id="result">
<property name="visible">False</property> <property name="visible">False</property>
<property name="title" bind-source="address_entry" bind-property="text"/> <property name="title" bind-source="address_entry" bind-property="text"/>
<property name="width-request">300</property> <property name="width-request">300</property>
<property name="subtitle" translatable="yes">SIP Account</property> <property name="subtitle" translatable="yes">SIP Account</property>
<child type="prefix"> <child type="prefix">
<object class="HdyAvatar"> <object class="AdwAvatar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="show-initials">True</property> <property name="show-initials">True</property>
<property name="size">36</property> <property name="size">36</property>