Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:GA
libgnome
libgnome-help-bundles.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libgnome-help-bundles.patch of Package libgnome
diff -upr libgnome-2.19.1-pre/libgnome/gnome-help.c libgnome-2.19.1-post/libgnome/gnome-help.c --- libgnome-2.19.1-pre/libgnome/gnome-help.c 2007-06-19 16:04:29.000000000 -0500 +++ libgnome-2.19.1-post/libgnome/gnome-help.c 2007-09-14 12:27:12.000000000 -0500 @@ -126,9 +126,11 @@ gnome_help_display_with_doc_id_and_env ( { gchar *local_help_path; gchar *global_help_path; + gchar *bundle_help_path; gchar *file; struct stat local_help_st; struct stat global_help_st; + struct stat bundle_help_st; gchar *uri; gchar *free_doc_id = NULL; gboolean retval; @@ -184,6 +186,14 @@ gnome_help_display_with_doc_id_and_env ( goto out; } + /* Compute the bundle help path */ + + bundle_help_path = gnome_program_locate_file (program, + GNOME_FILE_DOMAIN_HELP_BUNDLE, + doc_id, + FALSE /* only_if_exists */, + NULL /* ret_locations */); + /* Try to access the help paths, first the app-specific help path * and then falling back to the global help path if the first one fails. */ @@ -213,6 +223,16 @@ gnome_help_display_with_doc_id_and_env ( global_help_path); goto out; } + } else if (bundle_help_path && g_stat (bundle_help_path, &bundle_help_st) == 0) { + if (!S_ISDIR (bundle_help_st.st_mode)) { + g_set_error (error, + GNOME_HELP_ERROR, + GNOME_HELP_ERROR_NOT_FOUND, + _("Unable to show help as %s is not a directory. " + "Please check your installation."), + bundle_help_path); + goto out; + } } else { g_set_error (error, GNOME_HELP_ERROR, @@ -227,6 +247,9 @@ gnome_help_display_with_doc_id_and_env ( if (!(local_help_st.st_dev == global_help_st.st_dev && local_help_st.st_ino == global_help_st.st_ino)) file = locate_help_file (global_help_path, file_name); + + if (!file && bundle_help_path) + file = locate_help_file (bundle_help_path, file_name); } if (file == NULL) { @@ -329,6 +352,7 @@ gnome_help_display_desktop_with_env (Gno GError **error) { GSList *ret_locations, *li; + GSList *ret_locations_2; char *file; gboolean retval; char *url; @@ -346,6 +370,15 @@ gnome_help_display_desktop_with_env (Gno FALSE /* only_if_exists */, &ret_locations); + ret_locations_2 = NULL; + gnome_program_locate_file (program, + GNOME_FILE_DOMAIN_HELP_BUNDLE, + doc_id, + FALSE /* only_if_exists */, + &ret_locations_2); + + ret_locations = g_slist_concat (ret_locations, ret_locations_2); + if (ret_locations == NULL) { g_set_error (error, GNOME_HELP_ERROR, diff -upr libgnome-2.19.1-pre/libgnome/gnome-program.c libgnome-2.19.1-post/libgnome/gnome-program.c --- libgnome-2.19.1-pre/libgnome/gnome-program.c 2007-09-14 11:41:34.000000000 -0500 +++ libgnome-2.19.1-post/libgnome/gnome-program.c 2007-09-14 11:45:48.000000000 -0500 @@ -994,6 +994,11 @@ gnome_program_locate_file (GnomeProgram attr_rel = "/gnome/help"; search_path = FALSE; break; + case GNOME_FILE_DOMAIN_HELP_BUNDLE: + prefix_rel = "/share/gnome/help-bundle"; + attr_name = GNOME_PARAM_GNOME_DATADIR; + attr_rel = "/gnome/help-bundle"; + break; default: g_warning (G_STRLOC ": unknown file domain %u", domain); return NULL; diff -upr libgnome-2.19.1-pre/libgnome/gnome-program.h libgnome-2.19.1-post/libgnome/gnome-program.h --- libgnome-2.19.1-pre/libgnome/gnome-program.h 2007-09-14 11:41:34.000000000 -0500 +++ libgnome-2.19.1-post/libgnome/gnome-program.h 2007-09-14 11:46:22.000000000 -0500 @@ -70,7 +70,9 @@ typedef enum { GNOME_FILE_DOMAIN_APP_SOUND, GNOME_FILE_DOMAIN_APP_PIXMAP, GNOME_FILE_DOMAIN_APP_CONFIG, - GNOME_FILE_DOMAIN_APP_HELP + GNOME_FILE_DOMAIN_APP_HELP, + + GNOME_FILE_DOMAIN_HELP_BUNDLE } GnomeFileDomain; struct _GnomeProgram diff -upr libgnome-2.19.1-pre/libgnome/libgnometypebuiltins.c libgnome-2.19.1-post/libgnome/libgnometypebuiltins.c --- libgnome-2.19.1-pre/libgnome/libgnometypebuiltins.c 2007-07-30 10:13:43.000000000 -0500 +++ libgnome-2.19.1-post/libgnome/libgnometypebuiltins.c 2007-09-14 11:47:03.000000000 -0500 @@ -42,6 +42,7 @@ static const GEnumValue _gnome_file_doma { GNOME_FILE_DOMAIN_APP_PIXMAP, "GNOME_FILE_DOMAIN_APP_PIXMAP", "app-pixmap" }, { GNOME_FILE_DOMAIN_APP_CONFIG, "GNOME_FILE_DOMAIN_APP_CONFIG", "app-config" }, { GNOME_FILE_DOMAIN_APP_HELP, "GNOME_FILE_DOMAIN_APP_HELP", "app-help" }, + { GNOME_FILE_DOMAIN_HELP_BUNDLE, "GNOME_FILE_DOMAIN_HELP_BUNDLE", "help-bundle" }, { 0, NULL, NULL } };
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor