[maemo-commits] [maemo-commits] r15469 - in projects/haf/trunk/hildon-help: . debian src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Apr 22 15:06:19 EEST 2008
- Previous message: [maemo-commits] r15468 - projects/haf/trunk/osso-af-utils/src
- Next message: [maemo-commits] r15470 - projects/haf/tags/hildon-help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: schulhof Date: 2008-04-22 15:06:18 +0300 (Tue, 22 Apr 2008) New Revision: 15469 Modified: projects/haf/trunk/hildon-help/ChangeLog projects/haf/trunk/hildon-help/configure.ac projects/haf/trunk/hildon-help/debian/changelog projects/haf/trunk/hildon-help/src/contents.c projects/haf/trunk/hildon-help/src/osso-helplib.c Log: * Do not abort if a help file is not there. * Fixes: NB#84303 Modified: projects/haf/trunk/hildon-help/ChangeLog =================================================================== --- projects/haf/trunk/hildon-help/ChangeLog 2008-04-22 12:02:08 UTC (rev 15468) +++ projects/haf/trunk/hildon-help/ChangeLog 2008-04-22 12:06:18 UTC (rev 15469) @@ -1,3 +1,8 @@ +2008-04-22 Gabriel Schulhof <gabriel.schulhof at nokia.com> + + * Do not abort if a help file is not there. + * Fixes: NB#84303 + 2008-03-05 Gabriel Schulhof <gabriel.schulhof at nokia.com> * Set gtk_widget_hide() as the "response" signal handler for the help dialog Modified: projects/haf/trunk/hildon-help/configure.ac =================================================================== --- projects/haf/trunk/hildon-help/configure.ac 2008-04-22 12:02:08 UTC (rev 15468) +++ projects/haf/trunk/hildon-help/configure.ac 2008-04-22 12:06:18 UTC (rev 15469) @@ -7,7 +7,7 @@ # Mandatory, initializes autoconf. # -AC_INIT(libhildonhelp, 2.0.1) +AC_INIT(libhildonhelp, 2.0.2) # Tests that source dir exists AC_CONFIG_SRCDIR(src/hildon-help.h) Modified: projects/haf/trunk/hildon-help/debian/changelog =================================================================== --- projects/haf/trunk/hildon-help/debian/changelog 2008-04-22 12:02:08 UTC (rev 15468) +++ projects/haf/trunk/hildon-help/debian/changelog 2008-04-22 12:06:18 UTC (rev 15469) @@ -1,3 +1,10 @@ +libhildonhelp (2.0.2-0) unstable; urgency=low + + * Do not abort if a help file is not there. + * Fixes: NB#84303 + + -- Gabriel Schulhof <gabriel.schulhof at nokia.com> Tue, 22 Apr 2008 14:50:37 +0300 + libhildonhelp (2.0.1-0) unstable; urgency=low * Set gtk_widget_hide() as the "response" signal handler for the help dialog Modified: projects/haf/trunk/hildon-help/src/contents.c =================================================================== --- projects/haf/trunk/hildon-help/src/contents.c 2008-04-22 12:02:08 UTC (rev 15468) +++ projects/haf/trunk/hildon-help/src/contents.c 2008-04-22 12:06:18 UTC (rev 15469) @@ -499,7 +499,11 @@ char fn[FILENAME_MAX]; const char *sub_branch= ossohelp_file( branch, fn, sizeof(fn) ); - g_assert(sub_branch); /* must have found the file! */ + + if (!sub_branch) { + ULOG_CRIT( "Error accessing help file: %s", sub_branch ); + return NULL; + } if (!sub_branch[0]) s->folders= 1; /* root, always just one folder (right?) */ Modified: projects/haf/trunk/hildon-help/src/osso-helplib.c =================================================================== --- projects/haf/trunk/hildon-help/src/osso-helplib.c 2008-04-22 12:02:08 UTC (rev 15468) +++ projects/haf/trunk/hildon-help/src/osso-helplib.c 2008-04-22 12:06:18 UTC (rev 15469) @@ -555,11 +555,22 @@ if (!branch) return NULL; while(*branch=='/') branch++; /* skip beginning "//" */ - + + /* Look for a path-type URL */ ptr= strchr( branch, '/' ); + if (!ptr) { - ULOG_CRIT( "Bad help ID: %s", branch ); - return NULL; + /* Failing that, grab the second word of a a_b_c-type URL */ + ptr = strchr(branch, '_'); + if (ptr) { + branch = ptr + 1; + ptr = strchr(branch, '_'); + } + + if (!ptr) { + ULOG_CRIT( "Bad help ID: %s", branch ); + return NULL; + } } if (!ossohelp_file2( branch, ptr-branch, fn_buf, fn_buflen ))
- Previous message: [maemo-commits] r15468 - projects/haf/trunk/osso-af-utils/src
- Next message: [maemo-commits] r15470 - projects/haf/tags/hildon-help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]