gnome-control-center r9118 - trunk/capplets/common
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r9118 - trunk/capplets/common
- Date: Sun, 26 Oct 2008 10:26:11 +0000 (UTC)
Author: jensg
Date: Sun Oct 26 10:26:11 2008
New Revision: 9118
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9118&view=rev
Log:
2008-10-26 Jens Granseuer <jensgr gmx net>
* capplet-util.c: (capplet_help): fix error handling
Modified:
trunk/capplets/common/ChangeLog
trunk/capplets/common/capplet-util.c
Modified: trunk/capplets/common/capplet-util.c
==============================================================================
--- trunk/capplets/common/capplet-util.c (original)
+++ trunk/capplets/common/capplet-util.c Sun Oct 26 10:26:11 2008
@@ -71,25 +71,24 @@
{
GError *error = NULL;
char *uri;
- GError *err = NULL;
GdkScreen *screen;
g_return_if_fail (section != NULL);
if (!parent)
- screen = gdk_screen_get_default();
+ screen = gdk_screen_get_default ();
else
screen = gtk_widget_get_screen (GTK_WIDGET (parent));
-
+
uri = g_strdup_printf ("ghelp:user-guide#%s", section);
-
- if (!gtk_show_uri (screen, uri, gtk_get_current_event_time(), &err)) {
+
+ if (!gtk_show_uri (screen, uri, gtk_get_current_event_time (), &error)) {
capplet_error_dialog (
- parent,
+ parent,
_("There was an error displaying help: %s"),
error);
-
- g_error_free (err);
+
+ g_error_free (error);
}
g_free (uri);
@@ -186,24 +185,24 @@
char ***argv)
{
GError *err = NULL;
-
+
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
#endif
-
+
if (context) {
#if GLIB_CHECK_VERSION (2, 12, 0)
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
#endif
g_option_context_add_group (context, gtk_get_option_group (TRUE));
-
+
if (!g_option_context_parse (context, argc, argv, &err)) {
g_printerr ("%s\n", err->message);
exit (1);
}
}
-
+
gtk_init (argc, argv);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]