[gnome-terminal] Cleanup Bug 595841 - Allow setting color for bold text
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Cleanup Bug 595841 - Allow setting color for bold text
- Date: Mon, 14 Dec 2009 19:41:13 +0000 (UTC)
commit f20a20521eb407a2cc8edd4d8c16c5ba7b4955d1
Author: Behdad Esfahbod <behdad behdad org>
Date: Mon Dec 14 14:40:51 2009 -0500
Cleanup Bug 595841 - Allow setting color for bold text
src/profile-editor.c | 18 ++----
src/profile-preferences.glade | 144 +++++++++++++++++++++++------------------
2 files changed, 88 insertions(+), 74 deletions(-)
---
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 2e7541b..f4a36ac 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -36,20 +36,19 @@ struct _TerminalColorScheme
const char *name;
const GdkColor foreground;
const GdkColor background;
- const GdkColor bold;
};
static const TerminalColorScheme color_schemes[] = {
{ N_("Black on light yellow"),
- { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xFFFF, 0xFFFF, 0xDDDD }, { 0, 0x0000, 0x0000, 0x0000 } },
+ { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xFFFF, 0xFFFF, 0xDDDD } },
{ N_("Black on white"),
- { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xFFFF, 0xFFFF, 0xFFFF }, { 0, 0x0000, 0x0000, 0x0000 } },
+ { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xFFFF, 0xFFFF, 0xFFFF } },
{ N_("Gray on black"),
- { 0, 0xAAAA, 0xAAAA, 0xAAAA }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xAAAA, 0xAAAA, 0xAAAA } },
+ { 0, 0xAAAA, 0xAAAA, 0xAAAA }, { 0, 0x0000, 0x0000, 0x0000 } },
{ N_("Green on black"),
- { 0, 0x0000, 0xFFFF, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0xFFFF, 0x0000 } },
+ { 0, 0x0000, 0xFFFF, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 } },
{ N_("White on black"),
- { 0, 0xFFFF, 0xFFFF, 0xFFFF }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xFFFF, 0xFFFF, 0xFFFF } }
+ { 0, 0xFFFF, 0xFFFF, 0xFFFF }, { 0, 0x0000, 0x0000, 0x0000 } }
};
static void profile_forgotten_cb (TerminalProfile *profile,
@@ -293,7 +292,6 @@ color_scheme_combo_changed_cb (GtkWidget *combo,
g_object_set (profile,
TERMINAL_PROFILE_FOREGROUND_COLOR, &color_schemes[i].foreground,
TERMINAL_PROFILE_BACKGROUND_COLOR, &color_schemes[i].background,
- TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG, TRUE,
NULL);
g_signal_handlers_unblock_by_func (profile, G_CALLBACK (profile_colors_notify_scheme_combo_cb), combo);
}
@@ -314,9 +312,8 @@ profile_colors_notify_scheme_combo_cb (TerminalProfile *profile,
fg = terminal_profile_get_property_boxed (profile, TERMINAL_PROFILE_FOREGROUND_COLOR);
bg = terminal_profile_get_property_boxed (profile, TERMINAL_PROFILE_BACKGROUND_COLOR);
- bold_same_as_fg = terminal_profile_get_property_boolean (profile, TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG);
- if (fg && bg && bold_same_as_fg)
+ if (fg && bg)
{
for (i = 0; i < G_N_ELEMENTS (color_schemes); ++i)
{
@@ -773,9 +770,6 @@ terminal_profile_edit (TerminalProfile *profile,
g_signal_connect (profile, "notify::" TERMINAL_PROFILE_BACKGROUND_COLOR,
G_CALLBACK (profile_colors_notify_scheme_combo_cb),
w);
- g_signal_connect (profile, "notify::" TERMINAL_PROFILE_BOLD_COLOR_SAME_AS_FG,
- G_CALLBACK (profile_colors_notify_scheme_combo_cb),
- w);
#define CONNECT_WITH_FLAGS(name, prop, flags) terminal_util_bind_object_property_to_widget (G_OBJECT (profile), prop, (GtkWidget *) gtk_builder_get_object (builder, name), flags)
#define CONNECT(name, prop) CONNECT_WITH_FLAGS (name, prop, 0)
diff --git a/src/profile-preferences.glade b/src/profile-preferences.glade
index 2976fc2..dd1f259 100644
--- a/src/profile-preferences.glade
+++ b/src/profile-preferences.glade
@@ -2099,13 +2099,71 @@ Custom</property>
<widget class="GtkTable" id="table27">
<property name="border_width">12</property>
<property name="visible">True</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">5</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
+ <widget class="GtkLabel" id="scrollbar-position-combobox-label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Scrollbar is:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">scrollbar-position-combobox</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="scrollback-label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Scroll_back:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">scrollback-lines-spinbutton</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkCheckButton" id="scroll-on-keystroke-checkbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -2120,8 +2178,8 @@ Custom</property>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
@@ -2141,6 +2199,27 @@ Custom</property>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="scrollback-unlimited-checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">_Unlimited</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options"></property>
@@ -2234,65 +2313,6 @@ Disabled</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="scrollbar-position-combobox-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Scrollbar is:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">scrollbar-position-combobox</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="scrollback-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Scroll_back:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">scrollback-lines-spinbutton</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]