Gnumeric Mac OS X Help Hack
- From: Jeshua Lacock <jeshua OpenOSX com>
- To: gnumeric-list gnome org
- Subject: Gnumeric Mac OS X Help Hack
- Date: Fri, 13 Aug 2004 17:55:59 -0600
Greetings,
I have hacked Gnumeric to provide online help in the users preferred
Mac OS X native browser. I downloaded and localized the HTML version
from <http://www.gnome.org/projects/gnumeric/doc/index.html> and copied
it to
'/usr/local/share/gnumeric/html/www.gnome.org/projects/gnumeric/doc'.
Now when the user selects 'Contents' from the 'Help' menu, the local
Gnumeric HTML help index is displayed in the system's preferred web
browser.
These two patches have been created post-config.
--- gnumeric-1.2.13-old/src/GNOME_Gnumeric_Component.xml Thu Dec 5
07:23:53 2002
+++ gnumeric-1.2.13-new/src/GNOME_Gnumeric_Component.xml Fri Aug 13
15:04:58 2004
@@ -91,7 +91,13 @@
<submenu name="Help" _label="_Help">
- <placeholder name="BuiltMenuItems"/>
+ <!-- <placeholder name="BuiltMenuItems"/> -->
+
+ <menuitem name="LaunchHelpUrl" verb=""
+ _label="_Contents"
+ pixtype="stock" pixname="gtk-help"
+ accel="F1"
+ />
<menuitem name="HelpAbout" verb=""/>
--- gnumeric-1.2.13-old/src/workbook-control-gui.c Tue Apr 27 07:10:05
2004
+++ gnumeric-1.2.13-new/src/workbook-control-gui.c Fri Aug 13 15:05:43
2004
@@ -90,6 +90,7 @@
#include <libgnomeui/gnome-app-helper.h>
#include <libgnomeui/gnome-stock-icons.h>
#include <libgnomevfs/gnome-vfs-uri.h>
+#include <libgnome-2.0/libgnome/gnome-exec.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkseparatormenuitem.h>
#include <gtk/gtkcheckmenuitem.h>
@@ -3146,6 +3147,11 @@
}
static void
+launch_help_url () {
+ gnome_execute_shell ("/usr/bin", "open
/usr/local/share/gnumeric/html/www.gnome.org/projects/gnumeric/doc/
index.html");
+}
+
+static void
cb_insert_image (GtkWidget *widget, WorkbookControlGUI *wbcg)
{
SheetControlGUI *scg = wbcg_cur_scg (wbcg);
@@ -4128,6 +4134,8 @@
BONOBO_UI_UNSAFE_VERB ("InsertFormula", cb_formula_guru),
BONOBO_UI_UNSAFE_VERB ("InsertComment", cb_insert_comment),
BONOBO_UI_UNSAFE_VERB ("InsertImage", cb_insert_image),
+ BONOBO_UI_UNSAFE_VERB ("LaunchHelpUrl", launch_help_url),
+
BONOBO_UI_UNSAFE_VERB ("InsertHyperlink", cb_insert_hyperlink),
BONOBO_UI_UNSAFE_VERB ("ColumnAutoSize",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]