[gtksourceviewmm/gtksourceviewmm-2.0] Get rid of most TODOs.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm/gtksourceviewmm-2.0] Get rid of most TODOs.
- Date: Sat, 13 Nov 2010 10:59:21 +0000 (UTC)
commit aaa5f2531ac7941d76dab88cee0cd24ffc99f6b7
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sat Nov 13 00:11:06 2010 +0100
Get rid of most TODOs.
* gtksourceview/src/sourcestyleschememanager.hg:
* gtksourceview/src/sourcelanguagemanager.hg: Removed TODOs and fixed
ownership of arrays retured by get_search_path () and get_*_ids ().
* gtksourceview/src/sourcebuffer.ccg:
* gtksourceview/src/sourcebuffer.hg:
* gtksourceview/src/sourcecompletion.hg:
* gtksourceview/src/sourcecompletionproposal.hg:
* gtksourceview/src/sourcecompletionprovider.hg:
* gtksourceview/src/sourcecompletionwords.hg:
* gtksourceview/src/sourceiter.ccg:
* gtksourceview/src/sourcelanguage.hg:
* gtksourceview/src/sourcemark.hg:
* gtksourceview/src/sourceprintcompositor.hg:
* gtksourceview/src/sourcestylescheme.hg:
* gtksourceview/src/sourceundomanager.hg:
* gtksourceview/src/sourceview.hg: Removed most of TODOs and commented code.
gtksourceview/src/sourcebuffer.ccg | 17 +----------
gtksourceview/src/sourcebuffer.hg | 3 --
gtksourceview/src/sourcecompletion.hg | 2 -
gtksourceview/src/sourcecompletionproposal.hg | 2 -
gtksourceview/src/sourcecompletionprovider.hg | 2 -
gtksourceview/src/sourcecompletionwords.hg | 1 -
gtksourceview/src/sourceiter.ccg | 38 -------------------------
gtksourceview/src/sourcelanguage.hg | 2 -
gtksourceview/src/sourcelanguagemanager.hg | 5 +--
gtksourceview/src/sourcemark.hg | 3 --
gtksourceview/src/sourceprintcompositor.hg | 3 --
gtksourceview/src/sourcestylescheme.hg | 7 ----
gtksourceview/src/sourcestyleschememanager.hg | 4 +--
gtksourceview/src/sourceundomanager.hg | 2 -
gtksourceview/src/sourceview.hg | 2 -
15 files changed, 3 insertions(+), 90 deletions(-)
---
diff --git a/gtksourceview/src/sourcebuffer.ccg b/gtksourceview/src/sourcebuffer.ccg
index edbc6ef..c7052e4 100644
--- a/gtksourceview/src/sourcebuffer.ccg
+++ b/gtksourceview/src/sourcebuffer.ccg
@@ -33,24 +33,9 @@ SourceBuffer::SourceBuffer (const Glib::RefPtr<Gtk::TextTagTable>& tag_table) :
_CONSTRUCT("tag-table", Glib::unwrap(tag_table))
{}
-// TODO: check later how bug 606732 goes. krnowak
SourceBuffer::SourceBuffer (const Glib::RefPtr<SourceLanguage> &language) :
-// _CONSTRUCT("tag-table, 0")
_CONSTRUCT("tag-table", 0, "language", Glib::unwrap(language))
-{
- /*
- if (language)
- {
- gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (gobject_),
- Glib::unwrap(language)) ;
- }
- else
- {
- gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (gobject_),
- 0) ;
- }
- */
-}
+{}
bool SourceBuffer::backward_iter_to_source_mark(Gtk::TextIter& iter)
{
diff --git a/gtksourceview/src/sourcebuffer.hg b/gtksourceview/src/sourcebuffer.hg
index 24567aa..a1cfbc3 100644
--- a/gtksourceview/src/sourcebuffer.hg
+++ b/gtksourceview/src/sourcebuffer.hg
@@ -442,9 +442,7 @@ public:
*/
_WRAP_SIGNAL(void highlight_updated(Gtk::TextIter& start, Gtk::TextIter& end), "highlight-updated", no_default_handler)
-// TODO: Use lower _CONVERSION/_WRAP_SIGNAL when we break API/ABI and remove upper ones. krnowak
#m4 _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<SourceMark>&',`Glib::RefPtr<SourceMark>::cast_dynamic(Glib::wrap($3, true))')
-//#m4 _CONVERSION(`GtkTextMark*',`const Glib::RefPtr<Gtk::TextMark>&',`Glib::wrap($3, true)')
/** Emitted whenever a marker of sourcebuffer has changed and needs to be redisplayed by the view.
*
* A change in a marker's type or location can trigger this signal.
@@ -454,7 +452,6 @@ public:
* where An iterator at the location where the change occurred.
*/
_WRAP_SIGNAL(void source_mark_updated(const Glib::RefPtr<SourceMark>& where), "source-mark-updated", no_default_handler)
-// _WRAP_SIGNAL(void source_mark_updated(const Glib::RefPtr<Gtk::TextMark>& where), "source-mark-updated")
/** Emitted whenever undo is requested.
*
diff --git a/gtksourceview/src/sourcecompletion.hg b/gtksourceview/src/sourcecompletion.hg
index efcec58..347fc7c 100644
--- a/gtksourceview/src/sourcecompletion.hg
+++ b/gtksourceview/src/sourcecompletion.hg
@@ -68,7 +68,6 @@ public:
_WRAP_METHOD(bool remove_provider(const Glib::RefPtr<SourceCompletionProvider>& provider), gtk_source_completion_remove_provider, errthrow)
#m4 _CONVERSION(`GList*',`Glib::ListHandle<Glib::RefPtr<SourceCompletionProvider> >',`$2($3, Glib::OWNERSHIP_NONE)')
- // TODO: is conversion all right? C docs states: "The returned list is owned by the completion and should not be freed." krnowak
/** Get list of providers registered on completion.
*
* @return List of SourceCompletionProvider.
@@ -78,7 +77,6 @@ public:
_WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<SourceCompletionProvider> > get_providers() const, gtk_source_completion_get_providers)
#m4 _CONVERSION(`const Glib::ListHandle<Glib::RefPtr<SourceCompletionProvider> >&',`GList*',`($3).data()')
- // TODO: what does passing NULL here does? If something specific, then maybe create separate method passing it. krnowak
/** Starts a new completion with the specified SourceCompletionContext and
* a list of potential candidate providers for completion.
*
diff --git a/gtksourceview/src/sourcecompletionproposal.hg b/gtksourceview/src/sourcecompletionproposal.hg
index 0ba478a..2e08005 100644
--- a/gtksourceview/src/sourcecompletionproposal.hg
+++ b/gtksourceview/src/sourcecompletionproposal.hg
@@ -142,8 +142,6 @@ public:
*/
_WRAP_SIGNAL(void changed(), "changed")
-// TODO: should vfuncs be protected? krnowak
-
_WRAP_VFUNC(Glib::ustring get_label() const, get_label)
_WRAP_VFUNC(Glib::ustring get_markup() const, get_markup)
diff --git a/gtksourceview/src/sourcecompletionprovider.hg b/gtksourceview/src/sourcecompletionprovider.hg
index f467907..2ffd878 100644
--- a/gtksourceview/src/sourcecompletionprovider.hg
+++ b/gtksourceview/src/sourcecompletionprovider.hg
@@ -194,8 +194,6 @@ public:
*/
_WRAP_METHOD(int get_priority() const, gtk_source_completion_provider_get_priority)
-// TODO: should vfuncs be protected? krnowak
-
_WRAP_VFUNC(Glib::ustring get_name() const, get_name)
_WRAP_VFUNC(Glib::RefPtr<Gdk::Pixbuf> get_icon(), get_icon, refreturn)
diff --git a/gtksourceview/src/sourcecompletionwords.hg b/gtksourceview/src/sourcecompletionwords.hg
index c1def3d..6983ad1 100644
--- a/gtksourceview/src/sourcecompletionwords.hg
+++ b/gtksourceview/src/sourcecompletionwords.hg
@@ -49,7 +49,6 @@ public:
*/
_WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Gdk::Pixbuf>& icon)
-// TODO: think about a good method name - register is a C/C++ keyword. krnowak
/** Registers this provider in given buffer.
*
* @param buffer A buffer which will use this provider.
diff --git a/gtksourceview/src/sourceiter.ccg b/gtksourceview/src/sourceiter.ccg
index 82a7c3b..a06cb0e 100644
--- a/gtksourceview/src/sourceiter.ccg
+++ b/gtksourceview/src/sourceiter.ccg
@@ -80,25 +80,6 @@ SourceIter::forward_search (const Glib::ustring &str,
Gtk::TextIter &match_end,
const Gtk::TextIter &limit) const
{
-// TODO: what is the use of these things? krnowak
- /*
- const GtkTextIter *gobject (gobj ()) ;
- g_return_val_if_fail (gobject, FALSE) ; // that will never fail, since gobject is always not null.
- g_return_val_if_fail (a_str.c_str (), FALSE) ; // ditto.
-
- GtkTextIter match_start, match_end ;
- gboolean res = gtk_source_iter_forward_search (gobject,
- a_str.c_str (),
- static_cast<GtkSourceSearchFlags>(a_flags),
- &match_start,
- &match_end,
- a_limit.gobj ()) ;
- Gtk::TextIter res_match_start (&match_start) ;
- Gtk::TextIter res_match_end (&match_end) ;
- a_match_start = res_match_start ;
- a_match_end = res_match_end ;
- return res ;
- */
return gtk_source_iter_forward_search(const_cast<GtkTextIter*>(gobj()),
str.c_str(),
static_cast<GtkSourceSearchFlags>(flags),
@@ -114,25 +95,6 @@ SourceIter::backward_search (const Glib::ustring &str,
Gtk::TextIter &match_end,
const Gtk::TextIter &limit) const
{
-// TODO: what is the use of these things? krnowak
- /*
- const GtkTextIter *gobject (gobj ()) ;
- g_return_val_if_fail (gobject, FALSE) ; // that will never fail, since gobject is always not null.
- g_return_val_if_fail (a_str.c_str (), FALSE) ; // ditto.
-
- GtkTextIter match_start, match_end ;
- gboolean res = gtk_source_iter_backward_search (gobject,
- a_str.c_str (),
- static_cast<GtkSourceSearchFlags>(a_flags),
- &match_start,
- &match_end,
- a_limit.gobj ()) ;
- Gtk::TextIter res_match_start (&match_start) ;
- Gtk::TextIter res_match_end (&match_end) ;
- a_match_start = res_match_start ;
- a_match_end = res_match_end ;
- return res ;
- */
return gtk_source_iter_backward_search(const_cast<GtkTextIter*>(gobj()),
str.c_str(), static_cast<GtkSourceSearchFlags>(flags), match_start.gobj(),
match_end.gobj(), limit.gobj());
diff --git a/gtksourceview/src/sourcelanguage.hg b/gtksourceview/src/sourcelanguage.hg
index 89f92a1..1808517 100644
--- a/gtksourceview/src/sourcelanguage.hg
+++ b/gtksourceview/src/sourcelanguage.hg
@@ -50,7 +50,6 @@ protected:
public:
- // TODO: C API does not provide any constructor for GtkSourceLanguage, should we delete it on API/ABI break? krnowak
_WRAP_CREATE()
/** Returns the ID of a language.
@@ -75,7 +74,6 @@ public:
*/
_WRAP_METHOD(Glib::ustring get_section() const, gtk_source_language_get_section)
- //TODO: THis should return bool, not gboolean.
/** Returns whether the language should be hidden from the user.
*
* @return @c true if the language should be hidden, @c false otherwise.
diff --git a/gtksourceview/src/sourcelanguagemanager.hg b/gtksourceview/src/sourcelanguagemanager.hg
index baa7468..f8dca13 100644
--- a/gtksourceview/src/sourcelanguagemanager.hg
+++ b/gtksourceview/src/sourcelanguagemanager.hg
@@ -67,9 +67,8 @@ public:
*/
_WRAP_METHOD(static Glib::RefPtr<SourceLanguageManager> get_default(), gtk_source_language_manager_get_default, refreturn)
-#m4 _CONVERSION(`const gchar**',`Glib::StringArrayHandle',`$2($3)')
+#m4 _CONVERSION(`const gchar**',`Glib::StringArrayHandle',`$2($3, Glib::OWNERSHIP_NONE)')
- // TODO: define own string array to use std::string, instead of Glib::ustring, when we break API/ABI. krnowak
/** Gets the list directories where language manager looks for language files.
*
* @return An array containg a list of language files directories.
@@ -78,7 +77,6 @@ public:
#m4 _CONVERSION(`const Glib::StringArrayHandle&',`gchar**',`const_cast<gchar**>(($3).data())')
- // TODO: see previous one. Also this is probably buggy, because we need NULL termination in C array and Glib::StringArrayHandle does not provide it - fixing it will break ABI. krnowak
/** Sets the list of directories where the language manager looks for language
* files.
*
@@ -127,7 +125,6 @@ public:
*/
_WRAP_METHOD(Glib::RefPtr<const SourceLanguage> get_language(const Glib::ustring& id) const, gtk_source_language_manager_get_language, constversion, refreturn)
_IGNORE(gtk_source_language_manager_guess_language)
-// TODO: change filename parameter to std::string, when we break API/ABI. krnowak
/** Picks a SourceLanguage for given file name and content type,
* according to the information in lang files.
*
diff --git a/gtksourceview/src/sourcemark.hg b/gtksourceview/src/sourcemark.hg
index e91426e..18b6dee 100644
--- a/gtksourceview/src/sourcemark.hg
+++ b/gtksourceview/src/sourcemark.hg
@@ -35,11 +35,8 @@ class SourceMark : public Gtk::TextMark
_CLASS_GOBJECT(SourceMark, GtkSourceMark, GTK_SOURCE_MARK, Gtk::TextMark, GtkTextMark)
protected:
- // TODO: C API does not provide default constructor for GtkSourceMark, should we delete it on API/ABI break? krnowak
_CTOR_DEFAULT
- /* TODO: When breaking API/ABI add a constructor getting only category parameter to allow explicit anonymous mark creation and empty string names. Maybe also return to normal order of parameters. Does it have sense? krnowak
- */
// We reversed the parameter order, because name can be NULL:
explicit SourceMark(const Glib::ustring& category, const Glib::ustring& name = Glib::ustring());
_IGNORE(gtk_source_mark_new)
diff --git a/gtksourceview/src/sourceprintcompositor.hg b/gtksourceview/src/sourceprintcompositor.hg
index e3f85f0..2adc026 100644
--- a/gtksourceview/src/sourceprintcompositor.hg
+++ b/gtksourceview/src/sourceprintcompositor.hg
@@ -216,7 +216,6 @@ public:
*/
_WRAP_METHOD(void set_line_numbers_font_name(const Glib::ustring& font_name), gtk_source_print_compositor_set_line_numbers_font_name)
- // TODO: set_default_line_numbers_font_name() or set_line_numbers_font_name()? krnowak
/** Sets the default font for printing line numbers on the left margin.
*
* The font to be used will be the same used as used for the text.
@@ -254,7 +253,6 @@ public:
*/
_WRAP_METHOD(void set_header_font_name(const Glib::ustring& font_name), gtk_source_print_compositor_set_header_font_name)
- // TODO: set_default_header_font_name() or set_header_font_name()? krnowak
/** Sets the default font for printing the page header.
*
* The font to be used will be the same used as used for the text.
@@ -291,7 +289,6 @@ public:
*/
_WRAP_METHOD(void set_footer_font_name(const Glib::ustring& font_name), gtk_source_print_compositor_set_footer_font_name)
- // TODO: set_default_footer_font_name() or set_footer_font_name()? krnowak
/** Sets the default font for printing the page footer.
*
* The font to be used will be the same used as used for the text.
diff --git a/gtksourceview/src/sourcestylescheme.hg b/gtksourceview/src/sourcestylescheme.hg
index 9a53154..1327b94 100644
--- a/gtksourceview/src/sourcestylescheme.hg
+++ b/gtksourceview/src/sourcestylescheme.hg
@@ -49,13 +49,6 @@ class SourceStyleScheme : public Glib::Interface
_CLASS_INTERFACE(SourceStyleScheme, GtkSourceStyleScheme, GTK_SOURCE_STYLE_SCHEME, GTypeInterface)
-// TODO: This is wrong. GtkSourceStyleScheme is not an interface. Changing this breaks API. krnowak
-/*
-class SourceStyleScheme : public Glib::Object
-{
-
- _CLASS_GOBJECT(SourceStyleScheme, GtkSourceStyleScheme, GTK_SOURCE_STYLE_SCHEME, Glib::Object, GObject)
-*/
public:
/** Gets scheme id.
diff --git a/gtksourceview/src/sourcestyleschememanager.hg b/gtksourceview/src/sourcestyleschememanager.hg
index 9bd02e2..3b06949 100644
--- a/gtksourceview/src/sourcestyleschememanager.hg
+++ b/gtksourceview/src/sourcestyleschememanager.hg
@@ -52,9 +52,8 @@ public:
*/
_WRAP_METHOD(static Glib::RefPtr<SourceStyleSchemeManager> get_default(), gtk_source_style_scheme_manager_get_default, refreturn)
-#m4 _CONVERSION(`const gchar**',`Glib::StringArrayHandle',`$2($3)')
+#m4 _CONVERSION(`const gchar**',`Glib::StringArrayHandle',`$2($3, Glib::OWNERSHIP_NONE)')
- // TODO: define own string array to use std::string, instead of Glib::ustring, when we break API/ABI. krnowak
/** Returns the current search path for the manager.
*
* See set_search_path() for details.
@@ -65,7 +64,6 @@ public:
#m4 _CONVERSION(`const Glib::StringArrayHandle&',`gchar**',`const_cast<gchar**>(($3).data())')
- // TODO: see previous one. Also this is probably buggy, because we need NULL termination in C array and Glib::StringArrayHandle does not provide it - fixing it will break ABI. krnowak
/** Sets the list of directories where the manager looks for style scheme
* files.
*
diff --git a/gtksourceview/src/sourceundomanager.hg b/gtksourceview/src/sourceundomanager.hg
index f46e8fb..743ce08 100644
--- a/gtksourceview/src/sourceundomanager.hg
+++ b/gtksourceview/src/sourceundomanager.hg
@@ -105,7 +105,6 @@ public:
*/
_WRAP_METHOD(void can_redo_changed(), gtk_source_undo_manager_can_redo_changed)
- // TODO: should these signals be wrapped? They are marked as action ones. krnowak
/** Emitted when the ability to undo has changed.
*/
_WRAP_SIGNAL(void can_undo_changed(), "can-undo-changed")
@@ -114,7 +113,6 @@ public:
*/
_WRAP_SIGNAL(void can_redo_changed(), "can-redo-changed")
-// TODO: should vfuncs be protected? krnowak
_WRAP_VFUNC(bool can_undo() const, can_undo)
diff --git a/gtksourceview/src/sourceview.hg b/gtksourceview/src/sourceview.hg
index a9fdd74..8fa46ca 100644
--- a/gtksourceview/src/sourceview.hg
+++ b/gtksourceview/src/sourceview.hg
@@ -108,7 +108,6 @@ public:
**/
explicit SourceView (const Glib::RefPtr<SourceBuffer> &buffer) ;
-// TODO: remove these when breaking API/ABI? SourceView is derived from GtkObject, so it does not need to be accessed by Glib::RefPtr. krnowak
_WRAP_CREATE()
_WRAP_CREATE(const Glib::RefPtr<SourceBuffer> &buffer)
@@ -525,7 +524,6 @@ public:
/** Emitted when undo action is requested.
*/
_WRAP_SIGNAL(void undo(), "undo")
-// TODO: remove no_default_handler when we will break API/ABI. krnowak
/** Emitted when a line mark has been activated (for instance when there
* was a button press in the line marks gutter).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]