[Gnucash-changes] Add the (debug) extensions menu back.

David Hampton hampton at cvs.gnucash.org
Sat Apr 30 19:22:19 EDT 2005


Log Message:
-----------
Add the (debug) extensions menu back.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash/src/gnome:
        gnc-main-window.c
    gnucash/src/gnome/ui:
        gnc-main-window-ui.xml

Revision Data
-------------
Index: gnc-main-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Attic/gnc-main-window.c,v
retrieving revision 1.1.2.40
retrieving revision 1.1.2.41
diff -Lsrc/gnome/gnc-main-window.c -Lsrc/gnome/gnc-main-window.c -u -r1.1.2.40 -r1.1.2.41
--- src/gnome/gnc-main-window.c
+++ src/gnome/gnc-main-window.c
@@ -165,6 +165,7 @@
 	{ "ViewAction", NULL, N_("_View"), NULL, NULL, NULL },
 	{ "ActionsAction", NULL, N_("_Actions"), NULL, NULL, NULL },
 	{ "ToolsAction", NULL, N_("_Tools"), NULL, NULL, NULL },
+	{ "ExtensionsAction", NULL, N_("E_xtensions"), NULL, NULL, NULL },
 	{ "HelpAction", NULL, N_("_Help"), NULL, NULL, NULL },
 	{ "MiscAction", NULL, N_("_Misc"), NULL, NULL, NULL },
 
@@ -265,6 +266,8 @@
 	  N_("Find transactions with a search"),
 	  G_CALLBACK (gnc_main_window_cmd_tools_find_transactions) },
 
+	/* Extensions menu */
+
 	/* Help menu */
 	{ "HelpTutorialAction", GNOME_STOCK_BOOK_BLUE, N_("Tutorial and Concepts _Guide"), NULL,
 	  N_("Open the GnuCash Tutorial"),
@@ -814,6 +817,7 @@
 	GList *plugins;
 	GError *error = NULL;
 	gchar *filename, *style;
+	SCM debugging;
 
 	/* Create widgets and add them to the window */
 	main_vbox = gtk_vbox_new (FALSE, 0);
@@ -918,9 +922,18 @@
                 gtk_ui_manager_ensure_update( window->ui_merge );
         }
 
-        /* Now update the extension-menus */
+        /* Now update any old-style add-in menus */
         gnc_extensions_menu_setup( GTK_WINDOW(window), WINDOW_NAME_MAIN, window->ui_merge );
 
+	/* Now update the "eXtensions" menu */
+	debugging = scm_c_eval_string("(gnc:debugging?)");
+	if (debugging == SCM_BOOL_F) {
+	  GtkAction*  action;
+
+	  action = gtk_action_group_get_action(priv->action_group,"ExtensionsAction");
+	  g_object_set(G_OBJECT(action), "visible", FALSE, NULL);
+	}
+
 	/* GncPluginManager stuff */
 	manager = gnc_plugin_manager_get ();
 	plugins = gnc_plugin_manager_get_plugins (manager);
Index: gnc-main-window-ui.xml
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/ui/Attic/gnc-main-window-ui.xml,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -Lsrc/gnome/ui/gnc-main-window-ui.xml -Lsrc/gnome/ui/gnc-main-window-ui.xml -u -r1.1.2.10 -r1.1.2.11
--- src/gnome/ui/gnc-main-window-ui.xml
+++ src/gnome/ui/gnc-main-window-ui.xml
@@ -75,6 +75,10 @@
       <menuitem name="ToolsFindTransactions" action="ToolsFindTransactionsAction"/>
     </menu>
 
+    <menu name="Extensions" action="ExtensionsAction">
+      <placeholder name="ExtensionsPlaceholder"/>
+    </menu>
+
     <menu name="Help" action="HelpAction">
       <menuitem name="HelpTutorial" action="HelpTutorialAction"/>
       <menuitem name="HelpTipsOfTheDay" action="HelpTipsOfTheDayAction"/>


More information about the gnucash-changes mailing list