[gtkmm/gtkmm-2-24] Use RefPtr::reset() instead of deprecated RefPtr::clear().



commit ab88e1b7c1084177abc197b44ced10e701fed869
Author: Murray Cumming <murrayc murrayc com>
Date:   Sat Jan 8 15:47:29 2011 +0100

    Use RefPtr::reset() instead of deprecated RefPtr::clear().
    
    * demos/gtk-demo/example_change_display.cc:
    * demos/gtk-demo/example_images.cc:
    * demos/gtk-demo/example_stockbrowser.cc: These were causing build errors
    now that we build with deprecated glibmm API disabled.

 ChangeLog                                |    9 +++++++++
 demos/gtk-demo/example_change_display.cc |    4 ++--
 demos/gtk-demo/example_images.cc         |   12 ++++++------
 demos/gtk-demo/example_stockbrowser.cc   |    4 ++--
 4 files changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0a90821..d4392f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-01-14  Murray Cumming  <murrayc murrayc com>
 
+	Use RefPtr::reset() instead of deprecated RefPtr::clear().
+
+	* demos/gtk-demo/example_change_display.cc:
+	* demos/gtk-demo/example_images.cc:
+	* demos/gtk-demo/example_stockbrowser.cc: These were causing build errors 
+	now that we build with deprecated glibmm API disabled.
+
+2011-01-14  Murray Cumming  <murrayc murrayc com>
+
 	Deprecate some API which wraps deprecated GTK+ API.
 
 	* gtk/src/range.hg: Deprecate get/set_update_policy() with no replacement.
diff --git a/demos/gtk-demo/example_change_display.cc b/demos/gtk-demo/example_change_display.cc
index 7a94edd..d8213a1 100644
--- a/demos/gtk-demo/example_change_display.cc
+++ b/demos/gtk-demo/example_change_display.cc
@@ -299,7 +299,7 @@ void Example_ChangeDisplay::on_treeview_display_selection_changed()
   if(iter)
     m_refCurrentDisplay = (*iter)[m_columns_display.m_display];
   else
-    m_refCurrentDisplay.clear();
+    m_refCurrentDisplay.reset();
 
   fill_screens();  
 }
@@ -311,7 +311,7 @@ void Example_ChangeDisplay::on_treeview_screen_selection_changed()
   if(iter)
     m_refCurrentScreen = (*iter)[m_columns_screen.m_screen];
   else
-    m_refCurrentScreen.clear();
+    m_refCurrentScreen.reset();
 }
 
 /* Fills in the screen list based on the current display
diff --git a/demos/gtk-demo/example_images.cc b/demos/gtk-demo/example_images.cc
index ecc2237..de60371 100644
--- a/demos/gtk-demo/example_images.cc
+++ b/demos/gtk-demo/example_images.cc
@@ -158,7 +158,7 @@ bool Example_Images::on_timeout()
       Gtk::MessageDialog dialog(strMsg, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE);
       dialog.run();
 
-      m_image_stream.clear();
+      m_image_stream.reset();
 
       return false; // uninstall the timeout
     }
@@ -176,14 +176,14 @@ bool Example_Images::on_timeout()
       Gtk::MessageDialog dialog(strMsg, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE);
       dialog.run();
 
-      m_image_stream.clear();
+      m_image_stream.reset();
 
       return false; // uninstall the timeout
     }
 
     if(status == Glib::IO_STATUS_EOF)
     {
-      m_image_stream.clear();
+      m_image_stream.reset();
 
       /* Errors can happen on close, e.g. if the image
        * file was truncated we'll know on close that
@@ -203,12 +203,12 @@ bool Example_Images::on_timeout()
         Gtk::MessageDialog dialog(strMsg, false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_CLOSE);
         dialog.run();
 
-        m_refPixbufLoader.clear();
+        m_refPixbufLoader.reset();
 
         return false; // uninstall the timeout
       }
 
-      m_refPixbufLoader.clear();
+      m_refPixbufLoader.reset();
     }
   }
   else
@@ -235,7 +235,7 @@ bool Example_Images::on_timeout()
     {
       m_refPixbufLoader->close();
 
-      m_refPixbufLoader.clear();
+      m_refPixbufLoader.reset();
     }
 
     m_refPixbufLoader = Gdk::PixbufLoader::create();
diff --git a/demos/gtk-demo/example_stockbrowser.cc b/demos/gtk-demo/example_stockbrowser.cc
index 532e817..c8d8aaa 100644
--- a/demos/gtk-demo/example_stockbrowser.cc
+++ b/demos/gtk-demo/example_stockbrowser.cc
@@ -262,7 +262,7 @@ void Example_StockBrowser::on_selection_changed()
     }
     else
     {
-      m_Image.clear();
+      m_Image.reset();
     }
   }
   else
@@ -271,7 +271,7 @@ void Example_StockBrowser::on_selection_changed()
     m_Label_Symbol.set_text("");
     m_Label_ID.set_text("");
     m_Label_Accel.set_text("");
-    m_Image.clear();
+    m_Image.reset();
   }
 }
 



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