[glom] About Box: Add a logo.



commit 19ade821043dc444cd4ddd729cbb90371a44b199
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Jul 7 13:24:46 2011 +0200

    About Box: Add a logo.
    
    * glom/application.cc: Use set_logo() though this only appears in the title
    bar for some reason.

 ChangeLog           |    7 +++++++
 Makefile.am         |    3 +++
 glom/application.cc |    8 ++++++--
 3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f4211e3..12a76ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-07-07  Murray Cumming  <murrayc murrayc com>
 
+	About Box: Add a logo.
+
+	* glom/application.cc: Use set_logo() though this only appears in the title 
+	bar for some reason.
+
+2011-07-07  Murray Cumming  <murrayc murrayc com>
+
 	Really fix the About Box.
 
 	* glom/application.cc: Add the Help menu itself, and use set_program_name() 
diff --git a/Makefile.am b/Makefile.am
index 57a86db..4d9be69 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -162,6 +162,9 @@ appicon32dir = $(iconthemedir)/32x32/apps
 appicon48dir = $(iconthemedir)/48x48/apps
 appiconscdir = $(iconthemedir)/scalable/apps
 
+glom_defines += \
+-DGLOM_ICONPATH=\""$(appicon24dir)/glom.png"\"
+
 dist_appicon16_DATA = icons/16x16/glom.png
 dist_appicon22_DATA = icons/22x22/glom.png
 dist_appicon24_DATA = icons/24x24/glom.png
diff --git a/glom/application.cc b/glom/application.cc
index 1ca23c5..c74972d 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -690,8 +690,12 @@ void Application::on_menu_help_about()
     std::vector<Glib::ustring> vecAuthors;
     vecAuthors.push_back("Murray Cumming <murrayc murrayc com>");
     m_pAbout->set_authors(vecAuthors);
-    //Glib::RefPtr<Gdk::Pixbuf> logo = Gdk::Pixbuf::create_from_file();
-    //m_pAbout->set_logo(logo);
+    
+    Glib::RefPtr<Gdk::Pixbuf> logo = Gdk::Pixbuf::create_from_file(GLOM_ICONPATH);
+    if(logo)
+      m_pAbout->set_logo(logo);
+    else
+      std::cout << G_STRFUNC << ": Could not load icon from path=" << GLOM_ICONPATH << std::endl;
 
     m_pAbout->signal_hide().connect( sigc::mem_fun(*this, &Application::on_about_close) );
     m_bAboutShown = true;



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