bakery r107 - in trunk: . bakery/App bakery/Document



Author: murrayc
Date: Mon Mar 24 20:29:06 2008
New Revision: 107
URL: http://svn.gnome.org/viewvc/bakery?rev=107&view=rev

Log:
2008-03-24  Murray Cumming  <murrayc murrayc>

* bakery/App/App_WithDoc.h:
* bakery/App/App_WithDoc_Gtk.cc:
* bakery/App/App_WithDoc_Gtk.h:
* bakery/Document/Document.h:
* bakery/Document/Document_XML.cc:
* bakery/Document/Document_XML.h: Minor ABI changes, removing virtual 
from methods and removing unused member variables.

Modified:
   trunk/ChangeLog
   trunk/bakery/App/App_WithDoc.h
   trunk/bakery/App/App_WithDoc_Gtk.cc
   trunk/bakery/App/App_WithDoc_Gtk.h
   trunk/bakery/Document/Document.h
   trunk/bakery/Document/Document_XML.cc
   trunk/bakery/Document/Document_XML.h

Modified: trunk/bakery/App/App_WithDoc.h
==============================================================================
--- trunk/bakery/App/App_WithDoc.h	(original)
+++ trunk/bakery/App/App_WithDoc.h	Mon Mar 24 20:29:06 2008
@@ -45,8 +45,7 @@
  *
  *
  * TODO:
- * Bonobo integration - when Bonobo is ready. (An App subclass?)
- * - Printing - GnomePrint?
+ * - Printing -?
  *  - Print Setup
  *  - Print Preview
  *  - Multiple document-types:

Modified: trunk/bakery/App/App_WithDoc_Gtk.cc
==============================================================================
--- trunk/bakery/App/App_WithDoc_Gtk.cc	(original)
+++ trunk/bakery/App/App_WithDoc_Gtk.cc	Mon Mar 24 20:29:06 2008
@@ -41,8 +41,7 @@
 
 App_WithDoc_Gtk::App_WithDoc_Gtk(const Glib::ustring& appname)
 : App_WithDoc(appname),
-  App_Gtk(appname),
-  m_deprecated_recent_files_model(0)
+  App_Gtk(appname)
 {
 }
 
@@ -50,8 +49,7 @@
 App_WithDoc_Gtk::App_WithDoc_Gtk(BaseObjectType* cobject, const Glib::ustring& appname)
 : App_WithDoc(appname),
   App_Gtk(cobject, appname),
-  ParentWindow(cobject), //This is a virtual base class (not a direct base), so we must specify a constructor or the default constructor will be called, regardless of what the App_Gtk(cobject) constructor does. Derived classes must do this as well.
-  m_deprecated_recent_files_model(0)
+  ParentWindow(cobject) //This is a virtual base class (not a direct base), so we must specify a constructor or the default constructor will be called, regardless of what the App_Gtk(cobject) constructor does. Derived classes must do this as well.
 {
   //TODO: appname.
 }

Modified: trunk/bakery/App/App_WithDoc_Gtk.h
==============================================================================
--- trunk/bakery/App/App_WithDoc_Gtk.h	(original)
+++ trunk/bakery/App/App_WithDoc_Gtk.h	Mon Mar 24 20:29:06 2008
@@ -82,14 +82,6 @@
 
   //Menu stuff:
   Glib::RefPtr<Gtk::Action> m_action_save, m_action_saveas;
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-  // TODO: We do not need these anymore, but we cannot remove them now if
-  // we do not want to break ABI
-  void* m_deprecated_recent_files_model;
-  typedef sigc::slot<void, EggRecentItem*> SlotDeprecated;
-  SlotDeprecated m_slot_deprecated;
-#endif //DOXYGEN_SHOULD_SKIP_THIS
 };
 
 } //namespace

Modified: trunk/bakery/Document/Document.h
==============================================================================
--- trunk/bakery/Document/Document.h	(original)
+++ trunk/bakery/Document/Document.h	Mon Mar 24 20:29:06 2008
@@ -37,7 +37,6 @@
   Document();
   virtual ~Document();
 
-  //TODO: It's probably not useful for this to be virtual:
   /* Saves the data to disk.
    * Asks the View to update this document before saving to disk,
    * but you should probably ensure that the document is updated more regularly than this,
@@ -45,13 +44,12 @@
    * Only saves if the document has been modified.
    * bool indicates success.
    */
-  virtual bool save();
+  bool save();
 
-  //TODO: It's probably not useful for this to be virtual:
   /* Loads data from disk, using the URI (set with set_file_uri()) then asks the View to update itself.
    * bool indicates success.
    */
-  virtual bool load();
+  bool load();
 
   //This can't be virtual because that would break ABI.
   //Hopefully it doesn't need to be.

Modified: trunk/bakery/Document/Document_XML.cc
==============================================================================
--- trunk/bakery/Document/Document_XML.cc	(original)
+++ trunk/bakery/Document/Document_XML.cc	Mon Mar 24 20:29:06 2008
@@ -181,11 +181,6 @@
   return nodeResult;
 }
 
-const xmlpp::Element* Document_XML::get_node_child_named(const xmlpp::Element* node, const Glib::ustring& strName)const
-{
-  return const_cast<Document_XML*>(this)->get_node_child_named(node, strName);
-}
-
 xmlpp::Element* Document_XML::get_node_child_named_with_add(xmlpp::Element* node, const Glib::ustring& strName)
 {
   xmlpp::Element* nodeResult = get_node_child_named(node, strName);

Modified: trunk/bakery/Document/Document_XML.h
==============================================================================
--- trunk/bakery/Document/Document_XML.h	(original)
+++ trunk/bakery/Document/Document_XML.h	Mon Mar 24 20:29:06 2008
@@ -59,10 +59,8 @@
   static Glib::ustring get_node_attribute_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName);
   static void set_node_attribute_value(xmlpp::Element* node, const Glib::ustring& strAttributeName, const Glib::ustring& strValue);
 
-  //TODO: Why are these virtual? Why aren't they static?
-  virtual xmlpp::Element* get_node_child_named(const xmlpp::Element* node, const Glib::ustring& strName);
-  virtual const xmlpp::Element* get_node_child_named(const xmlpp::Element* node, const Glib::ustring& strName) const;
-  virtual xmlpp::Element* get_node_child_named_with_add(xmlpp::Element* node, const Glib::ustring& strName);
+  static xmlpp::Element* get_node_child_named(const xmlpp::Element* node, const Glib::ustring& strName);
+  static xmlpp::Element* get_node_child_named_with_add(xmlpp::Element* node, const Glib::ustring& strName);
 
   virtual const xmlpp::Element* get_node_document() const; //e.g. <glom_document> (root name)
   virtual xmlpp::Element* get_node_document(); //e.g. <glom_document> (root name)



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