mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-05 19:15:32 +00:00
account-overview: Set window title
Set window title for the overview as well for adding or editing an account.
This commit is contained in:
parent
7135d02e3e
commit
0ead013d4d
2 changed files with 16 additions and 2 deletions
|
@ -4,6 +4,7 @@ data/org.gnome.Calls-daemon.desktop.in
|
|||
data/org.gnome.Calls.metainfo.xml
|
||||
data/org.gnome.Calls.gschema.xml
|
||||
src/calls-account.c
|
||||
src/calls-account-overview.c
|
||||
src/calls-application.c
|
||||
src/calls-best-match.c
|
||||
src/calls-call-record-row.c
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#define G_LOG_DOMAIN "CallsAccountOverview"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "calls-account.h"
|
||||
#include "calls-account-overview.h"
|
||||
#include "calls-account-row.h"
|
||||
|
@ -31,6 +33,8 @@
|
|||
#include "calls-manager.h"
|
||||
#include "calls-in-app-notification.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
|
||||
/**
|
||||
* Section:calls-account-overview
|
||||
|
@ -169,10 +173,17 @@ on_account_row_activated (GtkListBox *box,
|
|||
|
||||
attach_account_widget (self, widget);
|
||||
|
||||
if (account)
|
||||
if (account) {
|
||||
g_autofree char *title = g_strdup_printf (_("Edit account: %s"),
|
||||
calls_account_get_address (account));
|
||||
|
||||
calls_account_provider_edit_account (provider, account);
|
||||
else
|
||||
gtk_window_set_title (self->account_window, title);
|
||||
} else {
|
||||
calls_account_provider_add_new_account (provider);
|
||||
gtk_window_set_title (self->account_window, _("Add new account"));
|
||||
|
||||
}
|
||||
|
||||
gtk_window_present (self->account_window);
|
||||
}
|
||||
|
@ -361,6 +372,8 @@ calls_account_overview_init (CallsAccountOverview *self)
|
|||
"key-pressed",
|
||||
G_CALLBACK (on_key_pressed),
|
||||
self->account_window);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (self), _("Account overview"));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue