[cluttermm] Init: Uncomment the init() overload that takes an OptionContext.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] Init: Uncomment the init() overload that takes an OptionContext.
- Date: Thu, 17 Apr 2014 07:46:14 +0000 (UTC)
commit 2e414ce7b4c94364bfae08755cca2ac63c92ff81
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Apr 17 09:27:18 2014 +0200
Init: Uncomment the init() overload that takes an OptionContext.
clutter/cluttermm/init.cc | 13 ++++++-------
clutter/cluttermm/init.h | 5 -----
2 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/clutter/cluttermm/init.cc b/clutter/cluttermm/init.cc
index ced68c8..a2044cc 100644
--- a/clutter/cluttermm/init.cc
+++ b/clutter/cluttermm/init.cc
@@ -53,10 +53,6 @@ void init(int& argc, gchar**& argv)
init(&argc, &argv);
}
-// TODO: This does not work yet because because of clutter bug #1033. It has
-// already been fixed in trunk but there was no release since. We can
-// uncomment this as soon as clutter with that fix has been released.
-#if 0
void init(int* argc, gchar** argv[], Glib::OptionContext& option_context)
{
common_init();
@@ -64,15 +60,18 @@ void init(int* argc, gchar** argv[], Glib::OptionContext& option_context)
add_clutter_option_group(option_context);
option_context.parse(*argc, *argv);
// option_context_parse already parsed the clutter arguments:
- clutter_init_with_args(NULL, NULL, NULL, NULL, NULL, &error);
- if(error != NULL) Glib::Error::throw_exception(error);
+ const ClutterInitError result = clutter_init_with_args(NULL, NULL, NULL, NULL, NULL, &error);
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ if(result != CLUTTER_INIT_SUCCESS)
+ throw Glib::Error(); //This should never happen. The GError should always be set.
}
void init(int& argc, gchar**& argv, Glib::OptionContext& option_context)
{
init(&argc, &argv, option_context);
}
-#endif
void add_clutter_option_group(Glib::OptionContext& option_context)
{
diff --git a/clutter/cluttermm/init.h b/clutter/cluttermm/init.h
index d81f50f..8dee136 100644
--- a/clutter/cluttermm/init.h
+++ b/clutter/cluttermm/init.h
@@ -44,10 +44,6 @@ void init(int* argc, gchar** argv[]);
*/
void init(int& argc, gchar**& argv);
-// TODO: This does not work yet because because of clutter bug #1033. It has
-// already been fixed in trunk but there was no release since. We can
-// uncomment this as soon as clutter with that fix has been released.
-#if 0
/** It will initialise everything needed to operate with Clutter and parses
* some standard command line options and the options specified in your
* @a option_context. Add a Glib::OptionGroup to the Glib::OptionContext to
@@ -71,7 +67,6 @@ void init(int* argc, char** argv[], Glib::OptionContext& option_context);
* @throws InitError, Glib::OptionError
*/
void init(int& argc, char**& argv, Glib::OptionContext& option_context);
-#endif
/** Adds a Glib::OptionGroup for the command line arguments recognized by
* Clutter to the given context. This is useful if you are using
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]