[gtksourceviewmm/gtksourceviewmm-4: 4/9] Remove deprecated API.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm/gtksourceviewmm-4: 4/9] Remove deprecated API.
- Date: Tue, 4 Dec 2018 12:44:29 +0000 (UTC)
commit a78a9a3a102b792f3223ffc8e60a25a1bc90ea15
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Nov 14 12:08:26 2016 +0100
Remove deprecated API.
gtksourceview/src/completion.hg | 8 -------
gtksourceview/src/completioninfo.hg | 14 -----------
gtksourceview/src/completionitem.ccg | 40 -------------------------------
gtksourceview/src/completionitem.hg | 35 ---------------------------
gtksourceview/src/gutter.hg | 35 ---------------------------
gtksourceview/src/gutterrendererpixbuf.hg | 5 ----
gtksourceview/src/markattributes.hg | 6 -----
7 files changed, 143 deletions(-)
---
diff --git a/gtksourceview/src/completion.hg b/gtksourceview/src/completion.hg
index ca8e202..90b817d 100644
--- a/gtksourceview/src/completion.hg
+++ b/gtksourceview/src/completion.hg
@@ -162,14 +162,6 @@ public:
*/
Glib::RefPtr<CompletionContext> create_context();
- /** Move the completion window to a specific iter.
- *
- * @param iter A Gtk::TextIter.
- *
- * @newin{2,10}
- */
- _WRAP_METHOD(void move_window(const Gtk::TextIter& iter), gtk_source_completion_move_window, deprecated
"Use SourceCompletionProvider::get_start_iter() instead.")
-
/** Block interactive completion.
*
* This can be used to disable interactive completion when inserting or
diff --git a/gtksourceview/src/completioninfo.hg b/gtksourceview/src/completioninfo.hg
index 48a6731..8ff58ec 100644
--- a/gtksourceview/src/completioninfo.hg
+++ b/gtksourceview/src/completioninfo.hg
@@ -70,20 +70,6 @@ public:
* @newin{2,10}
*/
void move_to_iter(const Gtk::TextView& view);
-
- _WRAP_METHOD(void set_widget(Gtk::Widget& widget), gtk_source_completion_info_set_widget, deprecated "Use
Gtk::Container:add() instead. If there is already a child widget, remove it with Gtk::Container::remove().")
-
- _WRAP_METHOD(Gtk::Widget* get_widget(), gtk_source_completion_info_get_widget, deprecated "Use
Gtk::Bin::get_child() instead.")
- _WRAP_METHOD(const Gtk::Widget* get_widget() const, gtk_source_completion_info_get_widget, constversion,
deprecated "Use Gtk::Bin::get_child() instead.")
-
- /** Emited before any "show" management.
- *
- * You can connect to this signal if you want to change some properties or
- * position before the real "show".
- *
- * @newin{2,10}
- */
- _WRAP_SIGNAL(void before_show(), "before-show", deprecated "This should not be used in newly-written
code.")
};
} /* namespace Gsv */
diff --git a/gtksourceview/src/completionitem.ccg b/gtksourceview/src/completionitem.ccg
index 1326af5..5c0d02a 100644
--- a/gtksourceview/src/completionitem.ccg
+++ b/gtksourceview/src/completionitem.ccg
@@ -18,7 +18,6 @@
*/
#include <gtksourceview/gtksource.h>
-#include <gtkmm/stock.h>
#include <gtk/gtk.h>
namespace Gsv
@@ -32,43 +31,4 @@ CompletionItem::CompletionItem(const Markup& markup, const Glib::ustring& text,
_CONSTRUCT("markup", markup.get_c_str(), "text", text.c_str(), "icon", Glib::unwrap(icon), "info",
(info.empty() ? 0 : info.c_str()))
{}
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-CompletionItem::CompletionItem(const Glib::ustring& label, const Glib::ustring& text, const Gtk::StockID&
stock, const Glib::ustring& info) :
- _CONSTRUCT("text", text.c_str(), "info", (info.empty() ? 0 : info.c_str()))
-{
- GdkPixbuf* icon;
- Glib::ustring temp_label(label);
-
- if (stock)
- {
- GtkIconTheme* theme = gtk_icon_theme_get_default();
-
- int width, height;
- gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height);
- icon = gtk_icon_theme_load_icon (theme,
- stock.get_c_str(),
- width,
- GTK_ICON_LOOKUP_USE_BUILTIN,
- 0);
-
- GtkStockItem stock_item;
- if (temp_label.empty() && gtk_stock_lookup (stock.get_c_str(), &stock_item))
- {
- temp_label = stock_item.label;
- }
- }
- else
- {
- icon = 0;
- }
-
- g_object_set(gobj(), "label", temp_label.c_str(), "icon", icon, static_cast<char*>(0));
-
- if (icon)
- {
- g_object_unref(icon);
- }
-}
-G_GNUC_END_IGNORE_DEPRECATIONS
-
} // namespace Gsv
diff --git a/gtksourceview/src/completionitem.hg b/gtksourceview/src/completionitem.hg
index 832ae94..4bac967 100644
--- a/gtksourceview/src/completionitem.hg
+++ b/gtksourceview/src/completionitem.hg
@@ -20,8 +20,6 @@
#include <gtksourceviewmm/markup.h>
#include <gtksourceviewmm/completionproposal.h>
-#include <gtkmm/stock.h>
-
_DEFS(gtksourceviewmm,gtksourceview)
_PINCLUDE(glibmm/private/object_p.h)
@@ -33,13 +31,6 @@ _PINCLUDE(glibmm/private/object_p.h)
#define GTK_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-namespace Gtk {
- //deprecated
- class StockID;
-} //namespace Gtk
-#endif //#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
namespace Gsv
{
@@ -59,13 +50,6 @@ protected:
explicit CompletionItem(const Glib::ustring& label, const Glib::ustring& text, const Glib::RefPtr<const
Gdk::Pixbuf>& icon, const Glib::ustring& info);
explicit CompletionItem(const Markup& markup, const Glib::ustring& text, const Glib::RefPtr<const
Gdk::Pixbuf>& icon, const Glib::ustring& info);
-#ifndef GTKSOURCEVIEWMM_DISABLE_DEPRECATED
- /**
- * @deprecated Use a constructor without a stock ID instead.
- */
- explicit CompletionItem(const Glib::ustring& label, const Glib::ustring& text, const Gtk::StockID& stock,
const Glib::ustring& info);
-#endif //GTKSOURCEVIEWMM_DISABLE_DEPRECATED
-
public:
/** Create a new CompletionItem with label @a label, icon @a icon and
* extra information @a info.
@@ -101,25 +85,6 @@ public:
*/
_WRAP_CREATE(const Markup& markup, const Glib::ustring& text, const Glib::RefPtr<const Gdk::Pixbuf>& icon,
const Glib::ustring& info)
-#ifndef GTKSOURCEVIEWMM_DISABLE_DEPRECATED
- /** Creates a new CompletionItem from a stock item.
- *
- * If @a label is empty, then stock label will be used.
- *
- * @param label The item label.
- * @param text The item text.
- * @param stock The stock icon.
- * @param info The item extra information.
- *
- * @return New CompletionInfo.
- *
- * @newin{2,10}
- *
- * @deprecated Use a create() method without a stock ID instead.
- */
- _WRAP_CREATE(const Glib::ustring& label, const Glib::ustring& text, const Gtk::StockID& stock, const
Glib::ustring& info)
-#endif //GTKSOURCEVIEWMM_DISABLE_DEPRECATED
-
_WRAP_PROPERTY("icon", Glib::RefPtr<Gdk::Pixbuf>)
_WRAP_PROPERTY("info", Glib::ustring)
_WRAP_PROPERTY("label", Glib::ustring)
diff --git a/gtksourceview/src/gutter.hg b/gtksourceview/src/gutter.hg
index 8ee6df1..df0a560 100644
--- a/gtksourceview/src/gutter.hg
+++ b/gtksourceview/src/gutter.hg
@@ -64,33 +64,6 @@ class Gutter : public Glib::Object
_CLASS_GOBJECT(Gutter, GtkSourceGutter, GTK_SOURCE_GUTTER, Glib::Object, GObject)
public:
-// TODO: remove it later - it should take a conversion definition from gtkmm,
-// but it fails with some strange casting to GtkWindowObject.
-#m4 _CONVERSION(`GdkWindow*',`Glib::RefPtr<Gdk::Window>',`Glib::wrap($3)')
- /** Get the Gdk::Window of the gutter.
- *
- * The window will only be available when the gutter has at least one,
- * non-zero width, cell renderer packed.
- *
- * @return The Gdk::Window of the gutter, or empty Glib::RefPtr if the gutter
- * has no window.
- *
- * @newin{2,10}
- */
- _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_window(), gtk_source_gutter_get_window, refreturn, deprecated
"Use Gtk::TextView::get_window() instead.")
-
- /** Get the Gdk::Window of the gutter.
- *
- * The window will only be available when the gutter has at least one,
- * non-zero width, cell renderer packed.
- *
- * @return The Gdk::Window of the gutter, or empty Glib::RefPtr if the gutter
- * has no window.
- *
- * @newin{2,10}
- */
- _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_window() const, gtk_source_gutter_get_window,
constversion, deprecated "Use Gtk::TextView::get_window() instead.")
-
_WRAP_METHOD(void insert(GutterRenderer* renderer, int position), gtk_source_gutter_insert)
_WRAP_METHOD(void remove(GutterRenderer* renderer), gtk_source_gutter_remove)
@@ -99,20 +72,12 @@ public:
_WRAP_METHOD(void queue_draw(), gtk_source_gutter_queue_draw)
- _WRAP_METHOD(void set_padding(int xpad, int ypad), gtk_source_gutter_set_padding, deprecated "Use
GutterRenderer::set_padding() instead.")
-
- // TODO: create a Padding class.
-
- _WRAP_METHOD(void get_padding(int& xpad, int& ypad) const, gtk_source_gutter_get_padding, deprecated "Use
GutterRenderer::get_padding() instead.")
-
_WRAP_METHOD(GutterRenderer* get_renderer_at_pos(int x, int y), gtk_source_gutter_get_renderer_at_pos,
refreturn)
_WRAP_METHOD(const GutterRenderer* get_renderer_at_pos(int x, int y) const,
gtk_source_gutter_get_renderer_at_pos, constversion, refreturn)
_WRAP_PROPERTY("view", View*)
_WRAP_PROPERTY("window-type", Gtk::TextWindowType)
- _WRAP_PROPERTY("xpad", int, deprecated "Use GutterRenderer's xpad property instead.")
- _WRAP_PROPERTY("ypad", int, deprecated "Use GutterRenderer's ypad property instead.")
};
} // namespace Gsv
diff --git a/gtksourceview/src/gutterrendererpixbuf.hg b/gtksourceview/src/gutterrendererpixbuf.hg
index 646adf2..9c8d168 100644
--- a/gtksourceview/src/gutterrendererpixbuf.hg
+++ b/gtksourceview/src/gutterrendererpixbuf.hg
@@ -52,10 +52,6 @@ public:
#m4 _CONVERSION(`const Glib::RefPtr<const Gdk::Pixbuf>&', `GdkPixbuf*',
`const_cast<GdkPixbuf*>(Glib::unwrap($3))')
_WRAP_METHOD(void set_pixbuf(const Glib::RefPtr<const Gdk::Pixbuf>& pixbuf),
gtk_source_gutter_renderer_pixbuf_set_pixbuf)
- _WRAP_METHOD(std::string get_stock_id() const, gtk_source_gutter_renderer_pixbuf_get_stock_id, deprecated
"This should not be used in newly-written code.")
-
- _WRAP_METHOD(void set_stock_id(const std::string& stock_id),
gtk_source_gutter_renderer_pixbuf_set_stock_id, deprecated "This should not be used in newly-written code.")
-
#m4 _CONVERSION(`GIcon*', `Glib::RefPtr<Gio::Icon>', `Glib::wrap($3)')
_WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_icon(), gtk_source_gutter_renderer_pixbuf_get_gicon, refreturn)
@@ -69,7 +65,6 @@ public:
_WRAP_METHOD(void set_icon_name(const std::string& icon_name),
gtk_source_gutter_renderer_pixbuf_set_icon_name)
_WRAP_PROPERTY("pixbuf", Glib::RefPtr<Gdk::Pixbuf>)
- _WRAP_PROPERTY("stock-id", std::string, deprecated "This should not be used in newly-written code.")
_WRAP_PROPERTY("icon-name", std::string)
_WRAP_PROPERTY("gicon", Glib::RefPtr<Gio::Icon>)
};
diff --git a/gtksourceview/src/markattributes.hg b/gtksourceview/src/markattributes.hg
index 99bdd49..b3bc7fd 100644
--- a/gtksourceview/src/markattributes.hg
+++ b/gtksourceview/src/markattributes.hg
@@ -77,10 +77,6 @@ public:
_WRAP_METHOD(void set_background(const Gdk::RGBA& rgba), gtk_source_mark_attributes_set_background)
- _WRAP_METHOD(std::string get_stock_id() const, gtk_source_mark_attributes_get_stock_id, deprecated "This
should not be used in newly-written code.")
-
- _WRAP_METHOD(void set_stock_id(const std::string& stock_id), gtk_source_mark_attributes_set_stock_id,
deprecated "This should not be used in newly-written code.")
-
_WRAP_METHOD(void set_icon_name(const std::string& icon_name), gtk_source_mark_attributes_set_icon_name)
_WRAP_METHOD(std::string get_icon_name() const, gtk_source_mark_attributes_get_icon_name)
@@ -107,8 +103,6 @@ public:
_WRAP_PROPERTY("background", Gdk::RGBA)
- _WRAP_PROPERTY("stock-id", std::string, deprecated "This should not be used in newly-written code.")
-
_WRAP_PROPERTY("pixbuf", Glib::RefPtr<Gdk::Pixbuf>)
_WRAP_PROPERTY("icon-name", std::string)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]