[niepce] * fwk::Dialog::add_header() does the markup.



commit e08cd7c9f528e093965e41e090e913b2ae7c5ed4
Author: Hubert Figuiere <hub figuiere net>
Date:   Tue Apr 14 03:49:58 2009 -0400

    	* fwk::Dialog::add_header() does the markup.
---
 ChangeLog                            |    2 ++
 src/fwk/toolkit/dialog.cpp           |    7 +++++--
 src/fwk/toolkit/dialog.hpp           |    2 +-
 src/niepce/ui/dialogs/editlabels.cpp |    2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a7f7859..1f973d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2009-04-14  Hubert Figuiere  <hub figuiere net>
 
+	* fwk::Dialog::add_header() does the markup.
+
 	* Edited labels only update when closing the dialog.
 
 2009-04-13  Hubert Figuiere  <hub figuiere net>
diff --git a/src/fwk/toolkit/dialog.cpp b/src/fwk/toolkit/dialog.cpp
index a8fc185..95e7735 100644
--- a/src/fwk/toolkit/dialog.cpp
+++ b/src/fwk/toolkit/dialog.cpp
@@ -17,6 +17,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+
+#include <boost/format.hpp>
 #include "libview/header.hh"
 
 #include "dialog.hpp"
@@ -26,12 +28,13 @@ namespace fwk {
 
 
 
-void Dialog::add_header(const Glib::ustring & label)
+void Dialog::add_header(const std::string & label)
 {
     Gtk::VBox * vbox;
 
     builder()->get_widget("dialog-vbox1", vbox);
-    view::Header * header = manage(new view::Header(label));
+    std::string markup = str(boost::format("<span size=\"x-large\">%1%</span>") % label);
+    view::Header * header = manage(new view::Header(markup));
     header->show();
     vbox->pack_start(*header, false, true);
 }
diff --git a/src/fwk/toolkit/dialog.hpp b/src/fwk/toolkit/dialog.hpp
index 6afe079..f7417eb 100644
--- a/src/fwk/toolkit/dialog.hpp
+++ b/src/fwk/toolkit/dialog.hpp
@@ -52,7 +52,7 @@ public:
 
     /** add a header widget at the top of the "dialog-vbox1"
      */
-    void add_header(const Glib::ustring & label);
+    void add_header(const std::string & label);
 
     int run_modal();
     int run_modal(const Frame::Ptr & parent);
diff --git a/src/niepce/ui/dialogs/editlabels.cpp b/src/niepce/ui/dialogs/editlabels.cpp
index eeda5fe..0d2357f 100644
--- a/src/niepce/ui/dialogs/editlabels.cpp
+++ b/src/niepce/ui/dialogs/editlabels.cpp
@@ -51,7 +51,7 @@ void EditLabels::setup_widget()
 {
     Glib::RefPtr<Gtk::Builder> _builder = builder();
 
-    add_header(_("<b>Edit Labels</b>"));
+    add_header(_("Edit Labels"));
 
     const char * color_fmt = "color%1%";
     const char * value_fmt = "value%1%";



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