From ef0b5a9ff86aa3a7610c6e30967e3f3e0cb69d09 Mon Sep 17 00:00:00 2001 From: Anton Lazarev Date: Sun, 17 Dec 2023 17:58:24 -0800 Subject: [PATCH] treewide: Adapt to `GtkHeaderBar` API changes https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gtkheaderbar-and-gtkactionbar-api-changes - `show-close-button` replaced with `show_title_buttons` wherever applicable, respecting new default value of `TRUE` - `title` removed and managed by setting window title if needed - NOTE: I'm not 100% sure if the title logic here matches the GTK3 version. I also just removed the SIP account widget titles altogether, since it's I couldn't figure out where the widget gets placed. Part-of: --- plugins/provider/sip/sip-account-widget.ui | 4 ---- src/calls-account-overview.c | 2 +- src/calls-main-window.c | 1 + src/ui/account-overview.ui | 2 -- src/ui/main-window.ui | 6 ++---- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/plugins/provider/sip/sip-account-widget.ui b/plugins/provider/sip/sip-account-widget.ui index 3e1fec1..290eba9 100644 --- a/plugins/provider/sip/sip-account-widget.ui +++ b/plugins/provider/sip/sip-account-widget.ui @@ -8,8 +8,6 @@ vertical - Add Account - True True @@ -28,8 +26,6 @@ True - True - Manage Account True diff --git a/src/calls-account-overview.c b/src/calls-account-overview.c index fcec6cb..e170b68 100644 --- a/src/calls-account-overview.c +++ b/src/calls-account-overview.c @@ -441,7 +441,7 @@ calls_account_overview_init (CallsAccountOverview *self) G_CALLBACK (on_key_pressed), self->account_window); - gtk_window_set_title (GTK_WINDOW (self), _("Account overview")); + gtk_window_set_title (GTK_WINDOW (self), _("VoIP Accounts")); } diff --git a/src/calls-main-window.c b/src/calls-main-window.c index cf1b8dd..2e8cc63 100644 --- a/src/calls-main-window.c +++ b/src/calls-main-window.c @@ -177,6 +177,7 @@ window_ussd_added_cb (CallsMainWindow *self, g_object_set_data_full (G_OBJECT (self->ussd_dialog), "ussd", g_object_ref (ussd), g_object_unref); window_update_ussd_state (self, ussd); + gtk_window_set_title (GTK_WINDOW (self->ussd_dialog), _("USSD")); gtk_window_present (GTK_WINDOW (self->ussd_dialog)); } diff --git a/src/ui/account-overview.ui b/src/ui/account-overview.ui index 33be508..09377a9 100644 --- a/src/ui/account-overview.ui +++ b/src/ui/account-overview.ui @@ -12,8 +12,6 @@ vertical - VoIP Accounts - True True diff --git a/src/ui/main-window.ui b/src/ui/main-window.ui index f3ef2d7..ba4a589 100644 --- a/src/ui/main-window.ui +++ b/src/ui/main-window.ui @@ -14,8 +14,6 @@ True strict - True - True @@ -90,8 +88,8 @@ True - False - USSD + False + False True