[gtkmm/gtkmm-3maybe] Removed more deprecated methods.



commit c9e0fc05d3776c16201181bd3ac6a44d66aeb1b8
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue May 5 18:13:23 2009 +0200

    Removed more deprecated methods.
---
 ChangeLog                      |   10 ++++++
 gdk/gdkmm/general.cc           |   34 -------------------
 gdk/gdkmm/general.h            |   69 ----------------------------------------
 gdk/src/event.hg               |    2 +-
 gtk/gtkmm/comboboxentrytext.cc |   43 -------------------------
 gtk/gtkmm/comboboxentrytext.h  |   11 ------
 gtk/gtkmm/comboboxtext.cc      |    6 ---
 gtk/gtkmm/comboboxtext.h       |    5 ---
 gtk/src/icontheme.hg           |    3 +-
 gtk/src/menuitem.hg            |    2 +-
 gtk/src/treeview.hg            |    7 ++--
 11 files changed, 18 insertions(+), 174 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0418e48..4828747 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-05-05  Murray Cumming  <murrayc murrayc com>
+
+	* gdk/gdkmm/general.[h|cc]:
+	* gdk/src/event.hg:
+	* gtk/gtkmm/comboboxentrytext.[h|cc]:
+	* gtk/gtkmm/comboboxtext.[h|cc]:
+	* gtk/src/icontheme.hg:
+	* gtk/src/menuitem.hg:
+	* gtk/src/treeview.hg: Removed more deprecated methods.
+
 2009-05-01  Murray Cumming  <murrayc murrayc com>
 
 	* gtk/src/filechooser.hg: Use std::string for filenames, instead of ustring, 
diff --git a/gdk/gdkmm/general.cc b/gdk/gdkmm/general.cc
index 8853f3e..00eb4ad 100644
--- a/gdk/gdkmm/general.cc
+++ b/gdk/gdkmm/general.cc
@@ -53,61 +53,27 @@ void flush()
 namespace Cairo
 {
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-void set_source_color(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Color& color)
-{
-  gdk_cairo_set_source_color(context->cobj(), const_cast<GdkColor*>(color.gobj()));
-}
-#endif
 
 void set_source_color(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Color& color)
 {
   gdk_cairo_set_source_color(context->cobj(), const_cast<GdkColor*>(color.gobj()));
 }
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-void set_source_pixbuf(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double pixbuf_x, double pixbuf_y)
-{
-  gdk_cairo_set_source_pixbuf(context->cobj(), pixbuf->gobj(), pixbuf_x, pixbuf_y);
-}
-#endif
-
 void set_source_pixbuf(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double pixbuf_x, double pixbuf_y)
 {
   gdk_cairo_set_source_pixbuf(context->cobj(), pixbuf->gobj(), pixbuf_x, pixbuf_y);
 }
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-void set_source_pixmap(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixmap>& pixmap, double pixmap_x, double pixmap_y)
-{
-  gdk_cairo_set_source_pixmap(context->cobj(), pixmap->gobj(), pixmap_x, pixmap_y);
-}
-#endif
-
 void set_source_pixmap(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixmap>& pixmap, double pixmap_x, double pixmap_y)
 {
   gdk_cairo_set_source_pixmap(context->cobj(), pixmap->gobj(), pixmap_x, pixmap_y);
 }
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-void rectangle(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Rectangle& rectangle)
-{
-  gdk_cairo_rectangle(context->cobj(), const_cast<GdkRectangle*>(rectangle.gobj()));
-}
-#endif
-
 void add_rectangle_to_path(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Rectangle& rectangle)
 {
   gdk_cairo_rectangle(context->cobj(), const_cast<GdkRectangle*>(rectangle.gobj()));
 }
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-void region(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Region& region)
-{
-  gdk_cairo_region(context->cobj(), const_cast<GdkRegion*>(region.gobj()));
-}
-#endif
-
 void add_region_to_path(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Region& region)
 {
   gdk_cairo_region(context->cobj(), const_cast<GdkRegion*>(region.gobj()));
diff --git a/gdk/gdkmm/general.h b/gdk/gdkmm/general.h
index 00d57d8..33ed156 100644
--- a/gdk/gdkmm/general.h
+++ b/gdk/gdkmm/general.h
@@ -37,18 +37,6 @@ void flush();
 namespace Cairo
 {
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-/** Sets the specified Gdk::Color as the source color of the Cairo context.
- * @param @context The cairo context.
- * @param color The color to use as the source color. 
- *
- * @deprecated Use the overloaded function that takes a const RefPtr
- * reference.
- *
- * @newin2p10
- */
-void set_source_color(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Color& color);
-#endif
 
 /** Sets the specified Gdk::Color as the source color of the Cairo context.
  * @param @context The cairo context.
@@ -58,21 +46,6 @@ void set_source_color(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::C
  */
 void set_source_color(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Color& color);
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y.
- * @param @context The cairo context.
- * @param pixbuf A Gdk::Pixbuf
- * @param pixbuf_x X coordinate of location to place upper left corner of pixbuf.
- * @param pixbuf_y Y coordinate of location to place upper left corner of pixbuf.
- *
- * @deprecated Use the overloaded function that takes a const RefPtr
- * reference.
- *
- * @newin2p10
- */
-void set_source_pixbuf(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double pixbuf_x, double pixbuf_y);
-#endif
-
 /** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y.
  * @param @context The cairo context.
  * @param pixbuf A Gdk::Pixbuf
@@ -83,21 +56,6 @@ void set_source_pixbuf(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib:
  */
 void set_source_pixbuf(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, double pixbuf_x, double pixbuf_y);
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-/** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixmap_x, pixmap_y.
- * @param @context The cairo context.
- * @param pixmap A Gdk::Pixmap
- * @param pixmap_x X coordinate of location to place upper left corner of pixmap.
- * @param pixmap_y Y coordinate of location to place upper left corner of pixmap.
- *
- * @deprecated Use the overloaded function that takes a const RefPtr
- * reference.
- *
- * @newin2p10
- */
-void set_source_pixmap(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixmap>& pixmap, double pixmap_x, double pixmap_y);
-#endif
-
 /** Sets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixmap_x, pixmap_y.
  * @param @context The cairo context.
  * @param pixmap A Gdk::Pixmap
@@ -108,20 +66,6 @@ void set_source_pixmap(::Cairo::RefPtr< ::Cairo::Context >& context, const Glib:
  */
 void set_source_pixmap(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Glib::RefPtr<Gdk::Pixmap>& pixmap, double pixmap_x, double pixmap_y);
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-/** Adds the given rectangle to the current path of the context.
- *
- * @param context A cairo context.
- * @param rectangle A rectangle to add to the path of the context. 
- *
- * @deprecated Use add_rectangle_to_path() instead
- * reference.
- *
- * @newin2p10
- */
-void rectangle(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Rectangle& rectangle);
-#endif
-
 /** Adds the given rectangle to the current path of the context.
  *
  * @param context A cairo context.
@@ -131,19 +75,6 @@ void rectangle(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Rectangl
  */
 void add_rectangle_to_path(const ::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Rectangle& rectangle);
 
-#ifndef GDKMM_DISABLE_DEPRECATED
-/** Adds the given region to the current path of the context.
- *
- * @param context A cairo context.
- * @param region A region to add to the path of the context. 
- *
- * @deprecated Use add_region_to_path() instead
- *
- * @newin2p10
- */
-void region(::Cairo::RefPtr< ::Cairo::Context >& context, const Gdk::Region& region);
-#endif
-
 /** Adds the given region to the current path of the context.
  *
  * @param context A cairo context.
diff --git a/gdk/src/event.hg b/gdk/src/event.hg
index 1b0bcf6..ab5fd98 100644
--- a/gdk/src/event.hg
+++ b/gdk/src/event.hg
@@ -74,7 +74,7 @@ public:
   _WRAP_METHOD(static void set_show_events(bool show_events), gdk_set_show_events)
   _WRAP_METHOD(static bool get_show_events(), gdk_get_show_events)
 
-  _WRAP_METHOD(void set_screen(const Glib::RefPtr<Screen>& screen), gdk_event_set_screen)
+  _IGNORE(gdk_event_set_screen) //deprecated
   _WRAP_METHOD(Glib::RefPtr<Screen> get_screen(), gdk_event_get_screen, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Screen> get_screen() const, gdk_event_get_screen, refreturn, constversion)
 
diff --git a/gtk/gtkmm/comboboxentrytext.cc b/gtk/gtkmm/comboboxentrytext.cc
index b2b2e1a..fba4c42 100644
--- a/gtk/gtkmm/comboboxentrytext.cc
+++ b/gtk/gtkmm/comboboxentrytext.cc
@@ -80,12 +80,6 @@ void ComboBoxEntryText::prepend_text(const Glib::ustring& text)
   }
 }
 
-//deprecated.
-void ComboBoxEntryText::clear()
-{
-  clear_items();
-}
-
 void ComboBoxEntryText::clear_items()
 {
   //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
@@ -118,43 +112,6 @@ void ComboBoxEntryText::remove_text(const Glib::ustring& text)
   }
 }
 
-Glib::ustring ComboBoxEntryText::get_active_text() const
-{
-  Glib::ustring result;
-
-  //Get the active row:
-  TreeModel::iterator active_row = get_active();
-  if(active_row)
-  {
-    Gtk::TreeModel::Row row = *active_row;
-    result = row[m_text_columns.m_column];
-  }
-
-  return result;
-}
-
-void ComboBoxEntryText::set_active_text(const Glib::ustring& text)
-{
-  //Look for the row with this text, and activate it:
-  Glib::RefPtr<Gtk::TreeModel> model = get_model();
-  if(model)
-  {
-    for(Gtk::TreeModel::iterator iter = model->children().begin(); iter != model->children().end(); ++iter)
-    {
-      const Glib::ustring& this_text = (*iter)[m_text_columns.m_column];
-
-      if(this_text == text)
-      {
-        set_active(iter);
-        return; //success
-      }
-    }
-  }
-
-  //Not found, so mark it as blank:
-  unset_active();
-}
-
 
 } // namespace Gtk
 
diff --git a/gtk/gtkmm/comboboxentrytext.h b/gtk/gtkmm/comboboxentrytext.h
index 85d1b5d..71cb974 100644
--- a/gtk/gtkmm/comboboxentrytext.h
+++ b/gtk/gtkmm/comboboxentrytext.h
@@ -66,17 +66,6 @@ public:
    */
   void prepend_text(const Glib::ustring& text);
 
-  //@deprecated Use get_entry()->get_text() to get the actual entered text.
-  Glib::ustring get_active_text() const;
-
-  //@deprecated Use get_entry()->set_text() to set the actual entered text.
-  void set_active_text(const Glib::ustring& text);
-
-  //There is a clear() method in the CellLayout base class, so this would cause confusion.
-  //TODO: Remove this when we can break API.
-  /// @deprecated See clear_items(). Since 2.8.
-  void clear();
-
   /** Remove all items from the drop-down menu.
    */
   void clear_items();
diff --git a/gtk/gtkmm/comboboxtext.cc b/gtk/gtkmm/comboboxtext.cc
index b2b0de1..ba5d58b 100644
--- a/gtk/gtkmm/comboboxtext.cc
+++ b/gtk/gtkmm/comboboxtext.cc
@@ -98,12 +98,6 @@ Glib::ustring ComboBoxText::get_active_text() const
   return result;
 }
 
-//deprecated.
-void ComboBoxText::clear()
-{
-  clear_items();
-}
-
 void ComboBoxText::clear_items()
 {
   //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
diff --git a/gtk/gtkmm/comboboxtext.h b/gtk/gtkmm/comboboxtext.h
index f8ed564..2231262 100644
--- a/gtk/gtkmm/comboboxtext.h
+++ b/gtk/gtkmm/comboboxtext.h
@@ -79,11 +79,6 @@ public:
    */
   void set_active_text(const Glib::ustring& text);
 
-  //There is a clear() method in the CellLayout base class, so this would cause confusion.
-  //TODO: Remove this when we can break API.
-  /// @deprecated See clear_items(). Since 2.8.
-  void clear();
-
   /** Remove all items from the drop-down menu.
    */
   void clear_items();
diff --git a/gtk/src/icontheme.hg b/gtk/src/icontheme.hg
index 2a30a46..81ef30d 100644
--- a/gtk/src/icontheme.hg
+++ b/gtk/src/icontheme.hg
@@ -43,8 +43,9 @@ protected:
   _CTOR_DEFAULT()
 public:
   _WRAP_CREATE()
+  
+  _IGNORE(gtk_icon_theme_get_for_screen) //deprecated
   _WRAP_METHOD(static Glib::RefPtr<IconTheme> get_default(), gtk_icon_theme_get_default, refreturn)
-  _WRAP_METHOD(static Glib::RefPtr<IconTheme> get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen), gtk_icon_theme_get_for_screen, refreturn)
   _WRAP_METHOD(void set_screen(const Glib::RefPtr<Gdk::Screen>& screen), gtk_icon_theme_set_screen)
   void set_search_path(const Glib::ArrayHandle<Glib::ustring>& path);
   Glib::ArrayHandle<Glib::ustring> get_search_path() const;
diff --git a/gtk/src/menuitem.hg b/gtk/src/menuitem.hg
index c41e7fa..b362b47 100644
--- a/gtk/src/menuitem.hg
+++ b/gtk/src/menuitem.hg
@@ -62,7 +62,7 @@ public:
   _WRAP_METHOD(const Menu* get_submenu() const, gtk_menu_item_get_submenu, constversion)
   bool has_submenu() const;
 
-  _WRAP_METHOD(void remove_submenu(), gtk_menu_item_remove_submenu)
+  _IGNORE(gtk_menu_item_remove_submenu) //deprecated
   _WRAP_METHOD(void select(), gtk_menu_item_select)
   _WRAP_METHOD(void deselect(), gtk_menu_item_deselect)
   _WRAP_METHOD(void activate(), gtk_menu_item_activate)
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index e779c17..463c3ad 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -111,12 +111,13 @@ public:
   /** A selection object for Gtk::TreeView.
    */
   typedef TreeSelection Selection;
-  /**
-     Default constructor
+
+  /** Default constructor.
    */
   _CTOR_DEFAULT()
+
   /**
-     Constructor that binds to a TreeModel
+     Constructor that binds to a TreeModel.
    */
   _WRAP_CTOR(TreeView(const Glib::RefPtr<TreeModel>& model), gtk_tree_view_new_with_model)
 



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