mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-09-13 Dave Peticolas <dave@krondo.com>
* src/guile/gw-gnc-spec.scm: remove some unused wrappings * src/gnome-utils/Makefile.am: enable test dir * src/gnome-utils/dialog-commodity.c: refactor help handler * src/gnome-utils/gnc-account-tree.c: refactor account group handler * src/gnome-utils/gnc-html.c: refactor help url handler * src/gnome/glade/commodity.glade: name help button * src/gnome/top-level.c: add in new handlers * src/gnome/window-main.c: remove toplevel api git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5371 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -42,10 +42,12 @@
|
||||
#include "combocell.h"
|
||||
#include "date.h"
|
||||
#include "dialog-account.h"
|
||||
#include "dialog-commodity.h"
|
||||
#include "dialog-transfer.h"
|
||||
#include "dialog-utils.h"
|
||||
#include "file-utils.h"
|
||||
#include "global-options.h"
|
||||
#include "gnc-account-tree.h"
|
||||
#include "gnc-component-manager.h"
|
||||
#include "gnc-engine-util.h"
|
||||
#include "gnc-menu-extensions.h"
|
||||
@@ -119,36 +121,24 @@ static SCM register_font_callback_id = SCM_UNDEFINED;
|
||||
static SCM register_hint_font_callback_id = SCM_UNDEFINED;
|
||||
|
||||
|
||||
/* ============================================================== */
|
||||
|
||||
gboolean
|
||||
gnucash_ui_is_running(void)
|
||||
{
|
||||
return gnome_is_running;
|
||||
}
|
||||
|
||||
/* ============================================================== */
|
||||
|
||||
gboolean
|
||||
gnucash_ui_is_terminating(void)
|
||||
{
|
||||
return gnome_is_terminating;
|
||||
}
|
||||
|
||||
/* ============================================================== */
|
||||
|
||||
GNCMainInfo *
|
||||
gnc_ui_get_data(void)
|
||||
gnc_ui_get_data (void)
|
||||
{
|
||||
return app;
|
||||
}
|
||||
|
||||
gncUIWidget
|
||||
gnc_ui_get_toplevel(void) {
|
||||
/* FIXME */
|
||||
return gnc_main_window_get_toplevel(app);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gnc_ui_can_cancel_save (void)
|
||||
{
|
||||
@@ -373,6 +363,34 @@ gnc_html_options_url_cb (const char *location, const char *label,
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnc_html_help_url_cb (const char *location, const char *label,
|
||||
gboolean new_window, GNCURLResult *result)
|
||||
{
|
||||
g_return_val_if_fail (location != NULL, FALSE);
|
||||
g_return_val_if_fail (result != NULL, FALSE);
|
||||
|
||||
if (new_window)
|
||||
{
|
||||
gnc_help_window * help;
|
||||
|
||||
help = gnc_help_window_new ();
|
||||
gnc_help_window_show_help (help, location, label);
|
||||
|
||||
result->load_to_stream = FALSE;
|
||||
}
|
||||
else
|
||||
result->load_to_stream = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gnc_commodity_help_cb (void)
|
||||
{
|
||||
helpWindow (NULL, _("Help"), HH_COMMODITY);
|
||||
}
|
||||
|
||||
/* ============================================================== */
|
||||
|
||||
/* These gnucash_ui_init and gnucash_ui functions are just hacks to get
|
||||
@@ -523,6 +541,11 @@ gnucash_ui_init(void)
|
||||
gnc_html_register_url_cb);
|
||||
gnc_html_register_url_handler (URL_TYPE_REPORT, gnc_html_report_url_cb);
|
||||
gnc_html_register_url_handler (URL_TYPE_OPTIONS, gnc_html_options_url_cb);
|
||||
gnc_html_register_url_handler (URL_TYPE_HELP, gnc_html_help_url_cb);
|
||||
|
||||
gnc_ui_commodity_set_help_callback (gnc_commodity_help_cb);
|
||||
|
||||
gnc_account_tree_set_group_handler (gncGetCurrentGroup);
|
||||
|
||||
/* initialize gnome MDI and set up application window defaults */
|
||||
app = gnc_main_window_new();
|
||||
|
||||
Reference in New Issue
Block a user