[gtkmm] Fix make check.



commit d0aeb219c8b49ba1504cdc4b9f71095910807e6f
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Jan 28 14:03:30 2011 +0100

    Fix make check.
    
    * demos/gtk-demo/example_stockbrowser.cc: Adapt for the previous commit
    that changed IconSet to need RefPtr.

 ChangeLog                              |    7 +++++++
 demos/gtk-demo/example_stockbrowser.cc |    6 ++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 25ee795..5cd8c86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-01-28  Murray Cumming  <murrayc murrayc com>
 
+	Fix make check.
+	
+	* demos/gtk-demo/example_stockbrowser.cc: Adapt for the previous commit
+	that changed IconSet to need RefPtr.
+
+2011-01-28  Murray Cumming  <murrayc murrayc com>
+
 	IconSet: Use this via a RefPtr.
 
 	* gtk/src/iconset.[h|cc]: Use this via RefPtr, because that is what the 
diff --git a/demos/gtk-demo/example_stockbrowser.cc b/demos/gtk-demo/example_stockbrowser.cc
index 18e4e44..1793a4a 100644
--- a/demos/gtk-demo/example_stockbrowser.cc
+++ b/demos/gtk-demo/example_stockbrowser.cc
@@ -237,10 +237,12 @@ void Example_StockBrowser::on_selection_changed()
     if(icon) //If there's a stock icon:
     {
       // find the largest size the icon comes in:
-      const Gtk::IconSet iconset = Gtk::IconSet::lookup_default(stockid);
+      const Glib::RefPtr<const Gtk::IconSet> iconset = Gtk::IconSet::lookup_default(stockid);
 
       typedef std::vector<Gtk::IconSize> type_vecSizes;
-      type_vecSizes sizes = iconset.get_sizes();
+      type_vecSizes sizes;
+      if(iconset)
+        sizes = iconset->get_sizes();
 
       Gtk::IconSize best_size = Gtk::ICON_SIZE_INVALID;
       int biggest_pixelcount = 0;



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