Thanks for the info, i've reworked onthe nautilus-05 patch, please review Chris
Harry Lu ??: > Chris, > > libgnome and ligngomeui has been deprecated by the GNOME community. > Please see: > http://live.gnome.org/LibgnomeMustDie > and > http://live.gnome.org/GnomeGoals/RemoveGnomeOpenGnomeHelp > > So instead of bring back gnome_program_init(), I think you need to fix > nautilus-05-context-menu.diff to replace the call of > gnome_help_display_on_screen() by gtk_show_uri(). > > Thanks, > Harry > > > On Thu, 2009-03-19 at 17:22 +0800, C Wang wrote: > >> The root cause of the bug is Nautilus use eggsmsession and >> g_option_context_parse directly to replace >> >> gnome_program, while our SUN_BRANDING patch nautilus-05-context-menu.diff >> called gnome_help_display_on_screen >> >> , which require gnome_program to be initialized. >> >> I simply called gnome_program_init to initialize global_program, so that the >> gnome_help_display_on_screen will not >> >> fail. >> >> Chris >> >> >> plain text document attachment (nautilus-15-context-menu-help.diff) >> --- nautilus-2.26.0/src/nautilus-main.c.old 2009-03-19 17:52:05.281192000 >> +0800 >> +++ nautilus-2.26.0/src/nautilus-main.c 2009-03-19 17:53:39.065115000 >> +0800 >> @@ -44,6 +44,9 @@ >> #include <gdk/gdkx.h> >> #include <gtk/gtk.h> >> #include <glib/gi18n.h> >> +#include <libgnome/gnome-init.h> >> +#include <libgnomeui/gnome-ui-init.h> >> +#include <libgnomeui/gnome-client.h> >> #include <gio/gdesktopappinfo.h> >> #include <libnautilus-private/nautilus-debug-log.h> >> #include <libnautilus-private/nautilus-directory-metafile.h> >> @@ -323,7 +326,8 @@ >> GPtrArray *uris_array; >> GError *error; >> int i; >> - >> + GnomeProgram *program; >> + >> const GOptionEntry options[] = { >> #ifndef NAUTILUS_OMIT_SELF_CHECK >> { "check", 'c', 0, G_OPTION_ARG_NONE, &perform_self_check, >> @@ -408,7 +412,12 @@ >> g_error_free (error); >> return 1; >> } >> - >> + program = gnome_program_init ("nautilus", VERSION, >> + LIBGNOMEUI_MODULE, argc, argv, >> + GNOME_PROGRAM_STANDARD_PROPERTIES, >> + GNOME_PARAM_GOPTION_CONTEXT, context, >> + GNOME_PARAM_HUMAN_READABLE_NAME, >> _("Nautilus"), >> + NULL); >> g_option_context_free (context); >> >> if (version) { >> @@ -529,6 +538,7 @@ >> >> nautilus_lockdown_finalize (); >> eel_debug_shut_down (); >> - >> + g_object_unref (G_OBJECT (program)); >> + >> return EXIT_SUCCESS; >> } >> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: nautilus-05-context-menu.diff URL: <http://mail.opensolaris.org/pipermail/jds-review/attachments/20090320/dbe3c960/attachment.ksh>
