Move options dialog to gnome-utils module.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5422 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-09-24 08:03:42 +00:00
parent d13baaabc8
commit 245b2894b4
5 changed files with 28 additions and 6 deletions

View File

@ -22,6 +22,7 @@ INCLUDES = \
libgncmod_gnome_utils_la_SOURCES = \
cursors.c \
dialog-commodity.c \
dialog-options.c \
dialog-utils.c \
druid-utils.c \
gnc-account-tree.c \
@ -44,6 +45,7 @@ libgncmod_gnome_utils_la_SOURCES = \
gncincludedir = ${GNC_INCLUDE_DIR}
gncinclude_HEADERS = \
dialog-commodity.h \
dialog-options.h \
dialog-utils.h \
druid-utils.h \
gnc-account-tree.h \

View File

@ -39,12 +39,12 @@
#include "guile-util.h"
#include "messages.h"
#include "option-util.h"
#include "window-help.h"
/* This static indicates the debugging module that this .o belongs to. */
static short module = MOD_GUI;
struct _gnc_option_win {
struct gnc_option_win
{
GtkWidget * container;
GtkWidget * notebook;
@ -69,6 +69,10 @@ typedef enum {
GNC_RD_WID_REL_WIDGET_POS} GNCRdPositions;
static GNCOptionWinCallback global_help_cb = NULL;
gpointer global_help_cb_data = NULL;
static GtkWidget *
gnc_options_dialog_get_apply_button (GtkWidget *widget)
{
@ -2074,6 +2078,13 @@ gnc_options_dialog_set_close_cb(GNCOptionWin * win, GNCOptionWinCallback cb,
win->close_cb_data = data;
}
void
gnc_options_dialog_set_global_help_cb(GNCOptionWinCallback thunk,
gpointer cb_data)
{
global_help_cb = thunk;
global_help_cb_data = cb_data;
}
void
gnc_options_dialog_destroy(GNCOptionWin * win) {
@ -2119,7 +2130,8 @@ gnc_options_dialog_apply_cb(GNCOptionWin *propertybox,
static void
gnc_options_dialog_help_cb(GNCOptionWin *propertybox,
gpointer user_data) {
helpWindow(NULL, NULL, HH_GLOBPREFS);
if (global_help_cb)
global_help_cb (propertybox, global_help_cb_data);
}
static void

View File

@ -28,7 +28,7 @@
#include "option-util.h"
typedef struct _gnc_option_win GNCOptionWin;
typedef struct gnc_option_win GNCOptionWin;
typedef void (* GNCOptionWinCallback)(GNCOptionWin *, gpointer data);
@ -50,6 +50,8 @@ void gnc_options_dialog_set_close_cb(GNCOptionWin * win,
GNCOptionWinCallback thunk,
gpointer cb_data);
void gnc_options_dialog_set_global_help_cb(GNCOptionWinCallback thunk,
gpointer cb_data);
void gnc_show_options_dialog(void);
void gnc_build_options_dialog_contents(GNCOptionWin *win,

View File

@ -11,7 +11,6 @@ libgncgnome_a_SOURCES = \
dialog-fincalc.c \
dialog-find-transactions.c \
dialog-new-user.c \
dialog-options.c \
dialog-price-editor.c \
dialog-print-check.c \
dialog-progress.c \
@ -58,7 +57,6 @@ noinst_HEADERS = \
dialog-fincalc.h \
dialog-find-transactions.h \
dialog-new-user.h \
dialog-options.h \
dialog-print-check.h \
dialog-progress.h \
dialog-style-sheet.h \

View File

@ -161,6 +161,12 @@ gnc_set_remaining_argv(int len, const char **rest)
}
static void
gnc_global_options_help_cb (GNCOptionWin *win, gpointer dat)
{
helpWindow (NULL, NULL, HH_GLOBPREFS);
}
static gboolean
gnc_html_file_stream_cb (const char *location, char ** data)
{
@ -544,6 +550,8 @@ gnucash_ui_init(void)
gnc_file_set_can_cancel_callback (gnc_ui_can_cancel_save);
gnc_options_dialog_set_global_help_cb (gnc_global_options_help_cb, NULL);
/* initialize gnome MDI and set up application window defaults */
app = gnc_main_window_new();
/* Run the ui startup hooks. */