[gnome-control-center/gbsneto/display-panel-polish: 1/3] display: Update header title when setting output
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/display-panel-polish: 1/3] display: Update header title when setting output
- Date: Fri, 15 Apr 2022 18:23:35 +0000 (UTC)
commit 65aacc96c2dfd25aeb969cc717829214834cc8c8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Apr 15 14:30:26 2022 -0300
display: Update header title when setting output
Instead of updating the titlebar of the monitor preferences page in
the row clicked callback, update it in set_current_output(). This
ensures that the title of the page is always in sync with the monitor
it's displaying.
panels/display/cc-display-panel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 3eb3d63e4..47131ea0e 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -651,6 +651,9 @@ set_current_output (CcDisplayPanel *panel,
{
cc_display_settings_set_selected_output (panel->settings, panel->current_output);
cc_display_arrangement_set_selected_output (panel->arrangement, panel->current_output);
+
+ adw_window_title_set_title (panel->display_settings_title_widget,
+ output ? cc_display_monitor_get_ui_name (output) : "");
}
panel->rebuilding_counter--;
@@ -665,9 +668,6 @@ on_monitor_row_activated_cb (GtkListBoxRow *row,
monitor = g_object_get_data (G_OBJECT (row), "monitor");
set_current_output (self, monitor, FALSE);
- adw_window_title_set_title (self->display_settings_title_widget,
- cc_display_monitor_get_ui_name (monitor));
-
adw_leaflet_set_visible_child_name (self->leaflet, "display-settings");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]