[gnome-terminal/wip/headerbar: 7/8] prefs: Move action widgets into titlebar when using headerbars
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal/wip/headerbar: 7/8] prefs: Move action widgets into titlebar when using headerbars
- Date: Mon, 5 Nov 2018 22:29:08 +0000 (UTC)
commit 179041ac559901db08cdf1d65416975b6b321753
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Nov 5 23:24:50 2018 +0100
prefs: Move action widgets into titlebar when using headerbars
https://bugzilla.gnome.org/show_bug.cgi?id=756798
src/terminal-prefs.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
---
diff --git a/src/terminal-prefs.c b/src/terminal-prefs.c
index f5262650..e952ddec 100644
--- a/src/terminal-prefs.c
+++ b/src/terminal-prefs.c
@@ -908,6 +908,26 @@ done:
g_signal_emit_by_name (row, "activate");
}
+ /* Move action widgets to titlebar when headerbar is used */
+ if (terminal_app_get_use_headerbar (app)) {
+ GtkWidget *headerbar;
+ GtkWidget *bbox;
+
+ headerbar = g_object_new (GTK_TYPE_HEADER_BAR,
+ "show-close-button", TRUE,
+ NULL);
+ bbox = gtk_widget_get_parent (close_button);
+
+ gtk_container_remove (GTK_CONTAINER (bbox), g_object_ref (help_button));
+ gtk_header_bar_pack_start (GTK_HEADER_BAR (headerbar), help_button);
+ g_object_unref (help_button);
+
+ gtk_widget_show (headerbar);
+ gtk_widget_hide (bbox);
+
+ gtk_window_set_titlebar (GTK_WINDOW (dialog), headerbar);
+ }
+
terminal_util_dialog_focus_widget (the_pref_data->builder, widget_name);
gtk_window_present (GTK_WINDOW (the_pref_data->dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]