[glibmm] OptionGroup: set_translate_slot(): Rename to set_translate_func().



commit caf1e07f618089927e713dd72c4f7645ecef2bc0
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Thu May 27 01:46:29 2010 -0400

    	OptionGroup: set_translate_slot(): Rename to set_translate_func().
    
    	* glib/src/optiongroup.ccg:
    	* glib/src/optiongroup.hg set_translate_slot(): Rename to
    	set_translate_func() which is more like the C API's name.

 ChangeLog                |    8 ++++++++
 glib/src/optiongroup.ccg |    3 ++-
 glib/src/optiongroup.hg  |    8 ++++----
 3 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8761df4..a33a35c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2010-05-27  José Alburquerque  <jaalburqu svn gnome org>
 
+	OptionGroup: set_translate_slot(): Rename to set_translate_func().
+
+	* glib/src/optiongroup.ccg:
+	* glib/src/optiongroup.hg set_translate_slot(): Rename to
+	set_translate_func() which is more like the C API's name.
+
+2010-05-27  José Alburquerque  <jaalburqu svn gnome org>
+
 	OptionGroup: Add set_translate_slot().
 
 	* glib/src/optiongroup.ccg:
diff --git a/glib/src/optiongroup.ccg b/glib/src/optiongroup.ccg
index e7941fb..fe1f53b 100644
--- a/glib/src/optiongroup.ccg
+++ b/glib/src/optiongroup.ccg
@@ -80,6 +80,7 @@ const gchar* OptionGroup_Translate_glibmm_callback(const gchar* string,
   try
   {
   #endif //GLIBMM_EXCEPTIONS_ENABLED
+    // The C docs says that the char* belongs to Glib.
     return g_strdup((*the_slot)(Glib::ustring(string)).c_str());
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
   }
@@ -241,7 +242,7 @@ void OptionGroup::on_error(OptionContext& /* context */, OptionGroup& /* group *
 {
 }
 
-void OptionGroup::set_translate_slot(const SlotTranslate& slot)
+void OptionGroup::set_translate_func(const SlotTranslate& slot)
 {
   // Create a copy of the slot. A pointer to this will be passed through the
   // callback's data parameter.  It will be deleted when
diff --git a/glib/src/optiongroup.hg b/glib/src/optiongroup.hg
index 2894f93..b1b2c5d 100644
--- a/glib/src/optiongroup.hg
+++ b/glib/src/optiongroup.hg
@@ -82,9 +82,9 @@ public:
   void add_entry(const OptionEntry& entry, vecustrings& arg);
   void add_entry_filename(const OptionEntry& entry, vecstrings& arg);
 
-  /** Sets the slot which is used to translate user-visible strings, for --help
-   * output. Different groups can use a different SlotTranslate. If a translate
-   * slot is not set, strings are not translated.
+  /** Sets the function which is used to translate user-visible strings, for
+   * --help output. Different groups can use a different SlotTranslate. If a
+   * translate function is not set, strings are not translated.
    *
    * If you are using gettext(), you only need to set the translation domain,
    * see set_translation_domain().
@@ -93,7 +93,7 @@ public:
    *
    * @newin{2,26}
    */
-  void set_translate_slot(const SlotTranslate& slot);
+  void set_translate_func(const SlotTranslate& slot);
   _IGNORE(g_option_group_set_translate_func)
 
   _WRAP_METHOD(void set_translation_domain(const Glib::ustring& domain), g_option_group_set_translation_domain)



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