1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-05-21 12:39:29 +00:00

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: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/714>
This commit is contained in:
Anton Lazarev 2023-12-17 17:58:24 -08:00
parent a236339809
commit ef0b5a9ff8
5 changed files with 4 additions and 11 deletions

View file

@ -8,8 +8,6 @@
<property name="orientation">vertical</property>
<child>
<object class="AdwHeaderBar" id="header_add">
<property name="title" translatable="yes">Add Account</property>
<property name="show-close-button">True</property>
<child type="end">
<object class="GtkButton" id="login_btn">
<property name="use-underline">True</property>
@ -28,8 +26,6 @@
<child>
<object class="AdwHeaderBar" id="header_edit">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<property name="title" translatable="yes">Manage Account</property>
<child type="end">
<object class="GtkButton" id="apply_btn">
<property name="use-underline">True</property>

View file

@ -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"));
}

View file

@ -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));
}

View file

@ -12,8 +12,6 @@
<property name="orientation">vertical</property>
<child>
<object class="AdwHeaderBar">
<property name="title" translatable="yes">VoIP Accounts</property>
<property name="show-close-button">True</property>
<property name="visible">True</property>
<child type="end">
<object class="GtkSpinner" id="spinner"/>

View file

@ -14,8 +14,6 @@
<object class="AdwHeaderBar">
<property name="visible">True</property>
<property name="centering_policy">strict</property>
<property name="show_close_button">True</property>
<property name="title" bind-source="CallsMainWindow" bind-property="title" bind-flags="sync-create"/>
<child type="title">
<object class="AdwViewSwitcherTitle" id="title_switcher">
<property name="visible">True</property>
@ -90,8 +88,8 @@
<child type="titlebar">
<object class="AdwHeaderBar">
<property name="visible">True</property>
<property name="show-close-button">False</property>
<property name="title" translatable="yes">USSD</property>
<property name="show-start-title-buttons">False</property>
<property name="show-end-title-buttons">False</property>
<child type="start">
<object class="GtkButton" id="ussd_cancel_button">
<property name="has-default">True</property>