diff options
author | Havoc Pennington <hp@redhat.com> | 2000-03-08 21:56:39 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-03-08 21:56:39 +0000 |
commit | 4a412b4767d59bdc03715e34af59e5e1629b2285 (patch) | |
tree | b8da3890400f64d58974ca4236faf43a93e1d306 /examples | |
parent | 3fc27786bfc342ebb3640fcccd98a8f378c645e1 (diff) | |
download | gconf-4a412b4767d59bdc03715e34af59e5e1629b2285.tar.gz |
exit on error.
2000-03-08 Havoc Pennington <hp@redhat.com>
* gconf/gconf.c (gconf_init): exit on error.
* examples/simple-controller.c (main): fix gconf_init() error
* examples/simple-view.c (main): fix gconf_init() error
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic-gconf-app.c | 4 | ||||
-rw-r--r-- | examples/simple-controller.c | 3 | ||||
-rw-r--r-- | examples/simple-view.c | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/examples/basic-gconf-app.c b/examples/basic-gconf-app.c index c0259734..9b2113c2 100644 --- a/examples/basic-gconf-app.c +++ b/examples/basic-gconf-app.c @@ -55,7 +55,9 @@ main(int argc, char** argv) GtkWidget* main_window; gtk_init(&argc, &argv); - + + /* If you pass NULL for error, then gconf_init() will simply print + to stderr and exit if an error occurs. */ if (!gconf_init(argc, argv, &error)) { g_assert(error != NULL); diff --git a/examples/simple-controller.c b/examples/simple-controller.c index a9fd844b..8a1af148 100644 --- a/examples/simple-controller.c +++ b/examples/simple-controller.c @@ -49,8 +49,7 @@ main(int argc, char** argv) GConfClient* client; gtk_init(&argc, &argv); - if (!gconf_init(argc, argv, NULL)) - g_error("Failed to init gconf"); + gconf_init(argc, argv, NULL); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); entry = gtk_entry_new(); diff --git a/examples/simple-view.c b/examples/simple-view.c index c8d4788e..dc787e67 100644 --- a/examples/simple-view.c +++ b/examples/simple-view.c @@ -62,8 +62,7 @@ main(int argc, char** argv) gchar* str; gtk_init(&argc, &argv); - if (!gconf_init(argc, argv, NULL)) - g_error("Failed to init gconf"); + gconf_init(argc, argv, NULL); client = gconf_client_new(); @@ -97,3 +96,5 @@ main(int argc, char** argv) } + + |