From 0206e4ceb5ad4415dae64c0f7d42b34d192ad030643d233b7ad04209468a4571 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 30 Mar 2015 22:44:15 +0000 Subject: [PATCH] Accepting request 293726 from GNOME:Next MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Please aerovan ☺ OBS-URL: https://build.opensuse.org/request/show/293726 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-terminal?expand=0&rev=135 --- gnome-terminal-dark-theme.patch | 196 ++++++++++++++++++++++++++++++++ gnome-terminal.changes | 8 ++ gnome-terminal.spec | 9 +- 3 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 gnome-terminal-dark-theme.patch diff --git a/gnome-terminal-dark-theme.patch b/gnome-terminal-dark-theme.patch new file mode 100644 index 0000000..737021f --- /dev/null +++ b/gnome-terminal-dark-theme.patch @@ -0,0 +1,196 @@ +From 7da7309d203e51fb03c002f87a9a6ddd8ee67978 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Tue, 17 Feb 2015 13:22:11 +0100 +Subject: [PATCH 1/2] Revert "prefs: Remove dark theme pref" + +This reverts commit 5f6c514a8840a5d1b87a8c399defee3b5052ec18. +--- + src/org.gnome.Terminal.gschema.xml | 5 +++++ + src/preferences.ui | 16 ++++++++++++++++ + src/terminal-app.c | 4 ++++ + src/terminal-prefs.c | 9 ++++++++- + src/terminal-schemas.h | 1 + + 5 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/src/org.gnome.Terminal.gschema.xml b/src/org.gnome.Terminal.gschema.xml +index 051bdc4..95c5405 100644 +--- a/src/org.gnome.Terminal.gschema.xml ++++ b/src/org.gnome.Terminal.gschema.xml +@@ -656,6 +656,11 @@ + Whether to show the menubar in new windows + + ++ ++ false ++ Whether to use a dark theme variant ++ ++ + + 'window' + Whether to open new terminals as windows or tabs +diff --git a/src/preferences.ui b/src/preferences.ui +index f64a11b..df82508 100644 +--- a/src/preferences.ui ++++ b/src/preferences.ui +@@ -139,6 +139,22 @@ + + + ++ ++ Use _dark theme variant ++ True ++ True ++ False ++ True ++ 0 ++ True ++ ++ ++ False ++ True ++ 3 ++ ++ ++ + + True + False +diff --git a/src/terminal-app.c b/src/terminal-app.c +index 8a9434f..95302c5 100644 +--- a/src/terminal-app.c ++++ b/src/terminal-app.c +@@ -362,6 +362,10 @@ terminal_app_init (TerminalApp *app) + + /* Terminal global settings */ + app->global_settings = g_settings_new (TERMINAL_SETTING_SCHEMA); ++ g_settings_bind (app->global_settings, TERMINAL_SETTING_DARK_THEME_KEY, ++ gtk_settings_get_default (), ++ "gtk-application-prefer-dark-theme", ++ G_SETTINGS_BIND_GET); + + /* Check if we need to migrate from gconf to dconf */ + maybe_migrate_settings (app); +diff --git a/src/terminal-prefs.c b/src/terminal-prefs.c +index 97f6c33..a57dde6 100644 +--- a/src/terminal-prefs.c ++++ b/src/terminal-prefs.c +@@ -562,7 +562,7 @@ terminal_prefs_show_preferences (GtkWindow *transient_parent, + GtkWidget *show_menubar_button, *disable_mnemonics_button, *disable_menu_accel_button; + GtkWidget *disable_shortcuts_button; + GtkWidget *tree_view_container, *new_button, *edit_button, *clone_button, *remove_button; +- GtkWidget *new_terminal_mode_combo; ++ GtkWidget *dark_theme_button, *new_terminal_mode_combo; + GtkWidget *default_hbox, *default_label; + GtkTreeSelection *selection; + GSettings *settings; +@@ -583,6 +583,7 @@ terminal_prefs_show_preferences (GtkWindow *transient_parent, + "preferences-dialog", + "preferences-dialog", &dialog, + "default-show-menubar-checkbutton", &show_menubar_button, ++ "dark-theme-checkbutton", &dark_theme_button, + "new-terminal-mode-combobox", &new_terminal_mode_combo, + "disable-mnemonics-checkbutton", &disable_mnemonics_button, + "disable-shortcuts-checkbutton", &disable_shortcuts_button, +@@ -613,6 +614,12 @@ terminal_prefs_show_preferences (GtkWindow *transient_parent, + G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); + + g_settings_bind (settings, ++ TERMINAL_SETTING_DARK_THEME_KEY, ++ dark_theme_button, ++ "active", ++ G_SETTINGS_BIND_GET | G_SETTINGS_BIND_SET); ++ ++ g_settings_bind (settings, + TERMINAL_SETTING_NEW_TERMINAL_MODE_KEY, + new_terminal_mode_combo, + "active-id", +diff --git a/src/terminal-schemas.h b/src/terminal-schemas.h +index 0fcbf52..c6acd7c 100644 +--- a/src/terminal-schemas.h ++++ b/src/terminal-schemas.h +@@ -69,6 +69,7 @@ G_BEGIN_DECLS + + #define TERMINAL_SETTING_CONFIRM_CLOSE_KEY "confirm-close" + #define TERMINAL_SETTING_DEFAULT_SHOW_MENUBAR_KEY "default-show-menubar" ++#define TERMINAL_SETTING_DARK_THEME_KEY "dark-theme" + #define TERMINAL_SETTING_ENABLE_MENU_BAR_ACCEL_KEY "menu-accelerator-enabled" + #define TERMINAL_SETTING_ENABLE_MNEMONICS_KEY "mnemonics-enabled" + #define TERMINAL_SETTING_ENABLE_SHORTCUTS_KEY "shortcuts-enabled" +-- +2.1.0 + + +From 9fc68b087180e48cb4e2275f3134f66f2c43de14 Mon Sep 17 00:00:00 2001 +From: Debarshi Ray +Date: Tue, 17 Feb 2015 13:22:21 +0100 +Subject: [PATCH 2/2] Revert "help: Remove dark theme pref" + +This reverts commit baaca6a4cc5ca78d7b0e02cfaee6c159bad7ce4b. +--- + help/C/pref-theme.page | 41 +++++++++++++++++++++++++++++++++++++++++ + help/Makefile.am | 1 + + 2 files changed, 42 insertions(+) + create mode 100644 help/C/pref-theme.page + +diff --git a/help/C/pref-theme.page b/help/C/pref-theme.page +new file mode 100644 +index 0000000..a997d14 +--- /dev/null ++++ b/help/C/pref-theme.page +@@ -0,0 +1,41 @@ ++ ++ ++ ++ ++ ++ ++ ++ Ekaterina Gerasimova ++ kittykat3756@gmail.com ++ 2014 ++ ++ ++ ++ ++ ++ Use either the light or dark theme for Terminal. ++ ++ ++ Chose the window theme ++ ++

You can chose to use either the dark theme or the light theme for the ++ terminal window.

++ ++ ++ ++

Select ++ EditPreferencesGeneral.

++
++ ++

To use the dark theme, select Use dark theme variant.

++
++
++ ++
+diff --git a/help/Makefile.am b/help/Makefile.am +index 33389c5..9c02a74 100644 +--- a/help/Makefile.am ++++ b/help/Makefile.am +@@ -35,6 +35,7 @@ HELP_FILES = \ + pref-profile-encoding.page \ + pref-scrolling.page \ + pref-tab-window.page \ ++ pref-theme.page \ + pref-user-input.page \ + profile.page \ + prob-reset.page \ +-- +2.1.0 + diff --git a/gnome-terminal.changes b/gnome-terminal.changes index ec23d2a..1578609 100644 --- a/gnome-terminal.changes +++ b/gnome-terminal.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Mar 26 13:45:49 UTC 2015 - zaitor@opensuse.org + +- Add gnome-terminal-dark-theme.patch: Allow gnome-terminal to have + dark theme preferance. +- Add libtool BuildRequires and call autoreconf as the above patch + touches the buildsystem. + ------------------------------------------------------------------- Mon Mar 23 20:08:30 UTC 2015 - dimstar@opensuse.org diff --git a/gnome-terminal.spec b/gnome-terminal.spec index 38a4275..ed95cc3 100644 --- a/gnome-terminal.spec +++ b/gnome-terminal.spec @@ -28,11 +28,15 @@ BuildRequires: appdata-tools BuildRequires: fdupes # PATCH-FEATURE-OPENSUSE gnome-terminal-transparency.patch dimmstar@opensuse.org -- Allow gnome-terminal to have transparent windows Patch100: gnome-terminal-transparency.patch -# PATCH-FEATURE-OPENSSUE gnome-terminal-transparency-fix-for-broken-themes.patch dimstar@opensuse.org -- Ensure the window is always painted +# PATCH-FEATURE-OPENSUSE gnome-terminal-transparency-fix-for-broken-themes.patch dimstar@opensuse.org -- Ensure the window is always painted Patch101: gnome-terminal-transparency-fix-for-broken-themes.patch # Needed for search provider. It should not be needed in my opionion, we have to take this up with upstream, or just provide search provider interface definition file as source. +# PATCH-FEATURE-OPENSUSE gnome-terminal-dark-theme.patch zaitor@opensuse.org -- Allow gnome-terminal to have dark theme preferance. +Patch102: gnome-terminal-dark-theme.patch BuildRequires: gnome-shell BuildRequires: intltool >= 0.50.0 +# Needed for patch 102 +BuildRequires: libtool BuildRequires: translation-update-upstream BuildRequires: update-desktop-files BuildRequires: vala @@ -85,9 +89,12 @@ arbitrary folders. %setup -q %patch100 -p1 %patch101 -p1 +%patch102 -p1 translation-update-upstream %build +# Needed for patch102 +autoreconf -fiv %configure \ --disable-static \ --with-gtk=3.0 \