gtkmm r954 - in trunk: . gtk/src



Author: murrayc
Date: Fri Jan 18 11:54:00 2008
New Revision: 954
URL: http://svn.gnome.org/viewvc/gtkmm?rev=954&view=rev

Log:
2008-01-18  Murray Cumming  <murrayc murrayc com>

        * gtk/src/calendar.ccg: 
        SignalProxy_Details_gtk_callback(): Return a copy of the 
        gchar* instead of a const, because we corrected the API in GTK+.


Modified:
   trunk/ChangeLog
   trunk/gtk/src/calendar.ccg
   trunk/gtk/src/recentchooser.hg

Modified: trunk/gtk/src/calendar.ccg
==============================================================================
--- trunk/gtk/src/calendar.ccg	(original)
+++ trunk/gtk/src/calendar.ccg	Fri Jan 18 11:54:00 2008
@@ -23,8 +23,7 @@
 #include <gtk/gtkcalendar.h>
 
 
-//TODO: This should have been changed to a non-const gchar* return in GTK+ by the time you read this. murrayc.
-static const gchar* SignalProxy_Details_gtk_callback(GtkCalendar* model, guint year, guint month, guint day, gpointer user_data)
+static gchar* SignalProxy_Details_gtk_callback(GtkCalendar* model, guint year, guint month, guint day, gpointer user_data)
 {
   Gtk::Calendar::SlotDetails* the_slot = static_cast<Gtk::Calendar::SlotDetails*>(user_data);
 
@@ -33,7 +32,7 @@
   {
   #endif //GLIBMM_EXCEPTIONS_ENABLED
     const Glib::ustring temp = (*the_slot)(year, month, day);
-    return temp.c_str();
+    return g_strdup(temp.c_str()); //Freed by GtkCalendar.
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   }
   catch(...)

Modified: trunk/gtk/src/recentchooser.hg
==============================================================================
--- trunk/gtk/src/recentchooser.hg	(original)
+++ trunk/gtk/src/recentchooser.hg	Fri Jan 18 11:54:00 2008
@@ -129,7 +129,7 @@
    */
   _WRAP_SIGNAL(void item_activated(), "item-activated", no_default_handler)
 
-  _WRAP_PROPERTY("recent-manager", Glib::RefPtr<RecentManager>)
+  //Not wrapped because it's write-only and construct-only: _WRAP_PROPERTY("recent-manager", Glib::RefPtr<RecentManager>)
   _WRAP_PROPERTY("show-private", bool)
   _WRAP_PROPERTY("show-tips", bool)
   _WRAP_PROPERTY("show-icons", bool)



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