[pan2] various little UI patches



commit 0a57a011cd7c84c8f503017e98f005e935af41b1
Author: Heinrich Müller <heinrich mueller82 gmail com>
Date:   Tue Mar 18 18:17:59 2014 +0100

    various little UI patches

 pan/gui/group-pane.cc         |    2 +-
 pan/gui/group-prefs-dialog.cc |   10 ++++++----
 pan/gui/header-pane.cc        |    2 +-
 pan/gui/prefs-ui.cc           |    6 +++++-
 4 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/pan/gui/group-pane.cc b/pan/gui/group-pane.cc
index 7978811..21b1317 100644
--- a/pan/gui/group-pane.cc
+++ b/pan/gui/group-pane.cc
@@ -458,7 +458,7 @@ GroupPane :: on_group_subscribe (const Quark& groupname, bool sub)
   // find out where it should be moved to
   int pos (0);
   GtkTreeIter section_iter, group_iter;
-  if (gtk_tree_model_iter_nth_child (model, &section_iter, NULL, (sub?0:1))) {
+  if (gtk_tree_model_iter_nth_child (model, &section_iter, NULL, (sub?1:2))) {
     if (gtk_tree_model_iter_children (model, &group_iter, &section_iter)) do {
       MyRow * row (dynamic_cast<MyRow*>(_tree_store->get_row (&group_iter)));
       if (groupname.to_string() < row->groupname.c_str())
diff --git a/pan/gui/group-prefs-dialog.cc b/pan/gui/group-prefs-dialog.cc
index df0aa32..b0e48c8 100644
--- a/pan/gui/group-prefs-dialog.cc
+++ b/pan/gui/group-prefs-dialog.cc
@@ -246,12 +246,14 @@ namespace
   GtkWidget* new_color_button (const Quark& group, Prefs& prefs, GroupPrefs& gprefs, GroupPrefsDialog* 
dialog, GtkWidget* w)
   {
 
-    const PanColors& colors (PanColors::get());
-    const std::string& bg (colors.def_bg);
-
-    const GdkColor& val (gprefs.get_group_color (group, bg));
     GtkWidget * b = gtk_color_button_new_with_color (&val);
+    
+    const std::string& def_fg (colors.def_fg);
+    const std::string& fg (prefs.get_color_str("group-pane-color-fg", def_fg));
+       const GdkColor& val (gprefs.get_group_color (group, fg));
+    
     g_signal_connect (b, "color-set", G_CALLBACK(color_set_cb), dialog);
+
     return b;
   }
 
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index 46bf9c4..f380021 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -1993,7 +1993,7 @@ HeaderPane :: HeaderPane (ActionManager       & action_manager,
   _cache (cache),
   _gui (gui),
   _cleared (true),
-  _fg(prefs.get_color_str ("text-color-fg", def_color_fg_str)),
+  _fg(prefs.get_color_str_wo_fallback ("text-color-fg")),
   _bg(prefs.get_color_str ("text-color-bg", def_color_str))
 {
 
diff --git a/pan/gui/prefs-ui.cc b/pan/gui/prefs-ui.cc
index 1c63350..2151fa6 100644
--- a/pan/gui/prefs-ui.cc
+++ b/pan/gui/prefs-ui.cc
@@ -1238,11 +1238,13 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-quote-bg", def_color_str, 
prefs));
     HIG :: workarea_add_row (t, &row, _("Quoted text:"), h);
     h = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, PAD_SMALL);
+    pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-url", TANGO_SKY_BLUE_DARK, 
prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-url-bg", def_color_str, 
prefs)); //
     HIG :: workarea_add_row (t, &row, _("URL:"), h);
     h = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, PAD_SMALL);
+    pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-signature", 
TANGO_SKY_BLUE_LIGHT, prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-signature-bg", 
def_color_str, prefs)); //
@@ -1252,15 +1254,17 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
   HIG :: workarea_add_section_divider (t, &row);
   HIG :: workarea_add_section_title (t, &row, _("Other Text"));
     h = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, PAD_SMALL);
+    pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("text-color-fg", def_color_fg_str, prefs));
+    pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("text-color-bg", def_color_str, prefs));
     HIG :: workarea_add_row (t, &row, _("Text Color:"), h);
-  HIG :: workarea_finish (t, &row);
 
   HIG :: workarea_add_section_divider (t, &row);
   HIG :: workarea_add_section_title (t, &row, _("Group Pane"));
     HIG :: workarea_add_section_spacer (t, row, 1);
     h = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, PAD_SMALL);
+    pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("group-pane-color-fg", def_color_fg_str, 
prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("group-pane-color-bg", def_color_str, 
prefs)); //


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]