gtkmm r953 - in branches/gtkmm-2-12: . gtk/src



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

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

* gtk/src/recentaction.hg:
Derive (and implement) from RecentChooser so this is actually usable.
This changes ABI (object size), but nobody could have been using this yet.
(Bug #505766, Denes Faluvegi)

Modified:
   branches/gtkmm-2-12/ChangeLog
   branches/gtkmm-2-12/gtk/src/calendar.ccg
   branches/gtkmm-2-12/gtk/src/recentaction.hg

Modified: branches/gtkmm-2-12/gtk/src/calendar.ccg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/calendar.ccg	(original)
+++ branches/gtkmm-2-12/gtk/src/calendar.ccg	Fri Jan 18 11:11:37 2008
@@ -27,15 +27,14 @@
 
 void Calendar::get_date(Glib::Date& date) const
 {
-	guint year = 0;
-	guint month = 0;
-	guint day = 0;
-	
-	get_date(year, month, day);
-	
-	date.set_year(year);
-	date.set_month(static_cast<Glib::Date::Month>(Glib::Date::JANUARY + month)); // Month from 1 to 12 instead from 0 to 11
-	date.set_day(day);	
+  guint year = 0;
+  guint month = 0;
+  guint day = 0;
+  get_date(year, month, day);
+  
+  date.set_year(year);
+  date.set_month(static_cast<Glib::Date::Month>(Glib::Date::JANUARY + month)); // Month from 1 to 12 instead from 0 to 11
+  date.set_day(day);  
 }
 
 } //namespace Gtk

Modified: branches/gtkmm-2-12/gtk/src/recentaction.hg
==============================================================================
--- branches/gtkmm-2-12/gtk/src/recentaction.hg	(original)
+++ branches/gtkmm-2-12/gtk/src/recentaction.hg	Fri Jan 18 11:11:37 2008
@@ -18,6 +18,7 @@
  */
 
 #include <gtkmm/action.h>
+#include <gtkmm/recentchooser.h>
 #include <gtkmm/recentmanager.h>
 #include <gtkmm/stockid.h>
 
@@ -36,15 +37,20 @@
  * To construct a submenu showing recently used files, use a 
  * Gtk::RecentAction as the action for a <menuitem>. To construct a menu 
  * toolbutton showing the recently used files in the popup menu, use a 
- * Gtk::RecentAction as the action for a <toolitem> element. 
+ * Gtk::RecentAction as the action for a <toolitem> element.
+ *
+ * See also the methods in the RecentChooser base class.
  *
  * @newin2p12
  *
  * @ingroup RecentFiles
  */
-class RecentAction : public Gtk::Action
+class RecentAction
+  : public Gtk::Action,
+    public Gtk::RecentChooser
 {
   _CLASS_GOBJECT(RecentAction, GtkRecentAction, GTK_RECENT_ACTION, Gtk::Action, GtkAction)
+  _IMPLEMENTS_INTERFACE(RecentChooser)
 
 protected:
   _CTOR_DEFAULT



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