Move gnc_options_dialog functions from gnc-gnome-utils to dialog-options.

This commit is contained in:
John Ralls 2021-11-19 16:10:13 -08:00
parent 8eddb63ef1
commit 5e84f118dd
9 changed files with 31 additions and 49 deletions

View File

@ -2801,3 +2801,23 @@ gnc_options_dialog_set_book_options_help_cb (GNCOptionWin *win)
(GNCOptionWinCallback)gnc_book_options_help_cb,
nullptr);
}
static void
gnc_global_options_help_cb (GNCOptionWin *win, gpointer dat)
{
gnc_gnome_help (GTK_WINDOW(gnc_options_dialog_widget (win)), HF_HELP, HL_GLOBPREFS);
}
static void
gnc_style_sheet_options_help_cb (GNCOptionWin *win, gpointer dat)
{
gnc_gnome_help (GTK_WINDOW(gnc_options_dialog_widget (win)), HF_HELP, HL_STYLE_SHEET);
}
void
gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win)
{
gnc_options_dialog_set_help_cb (win,
(GNCOptionWinCallback)gnc_style_sheet_options_help_cb,
NULL);
}

View File

@ -96,6 +96,16 @@ void gnc_options_dialog_set_book_options_help_cb (GNCOptionWin *win);
*/
void gnc_options_dialog_set_new_book_option_values (GncOptionDB *odb);
/** Set the help callback to 'gnc_book_options_help_cb' to open a help browser
* and point it to the Book Options link in the Help file.
*/
void gnc_options_dialog_set_book_options_help_cb (GNCOptionWin *win);
/** Set the help callback to 'gnc_style_sheet_options_help_cb' to open a help browser
* and point it to the Style Sheet link in the Help file.
*/
void gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win);
/**
* Initialize the option UI elements.
*/

View File

@ -85,32 +85,6 @@ gnc_gnome_utils_init (void)
}
static void
gnc_global_options_help_cb (GNCOptionWin *win, gpointer dat)
{
gnc_gnome_help (GTK_WINDOW(gnc_options_dialog_widget (win)), HF_HELP, HL_GLOBPREFS);
}
static void
gnc_book_options_help_cb (GNCOptionWin *win, gpointer dat)
{
gnc_gnome_help (GTK_WINDOW(gnc_options_dialog_widget (win)), HF_HELP, HL_BOOK_OPTIONS);
}
static void
gnc_style_sheet_options_help_cb (GNCOptionWin *win, gpointer dat)
{
gnc_gnome_help (GTK_WINDOW(gnc_options_dialog_widget (win)), HF_HELP, HL_STYLE_SHEET);
}
void
gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win)
{
gnc_options_dialog_set_help_cb (win,
(GNCOptionWinCallback)gnc_style_sheet_options_help_cb,
NULL);
}
/* gnc_configure_date_format
* sets dateFormat to the current value on the scheme side
*
@ -739,8 +713,6 @@ gnc_gui_init(void)
gnc_file_set_shutdown_callback (gnc_shutdown);
gnc_options_dialog_set_global_help_cb (gnc_global_options_help_cb, NULL);
main_window = gnc_main_window_new ();
// Bug#350993:
// gtk_widget_show (GTK_WIDGET (main_window));

View File

@ -36,7 +36,6 @@
#define GNC_GNOME_UTILS_H
#include <gnc-main-window.h>
#include "dialog-options.h"
/** Initialize the gnome-utils library
* Should be run once before using any gnome-utils features.
@ -65,21 +64,6 @@ void gnc_gnome_help (GtkWindow *parent, const char *file_name,
*/
void gnc_launch_doclink (GtkWindow *parent, const char *uri);
/** Set the help callback to 'gnc_book_options_help_cb' to open a help browser
* and point it to the Book Options link in the Help file.
*/
void gnc_options_dialog_set_book_options_help_cb (GNCOptionWin *win);
/** Set the initial values of new book options to values specified in user
* preferences.
*/
void gnc_options_dialog_set_new_book_option_values (GNCOptionDB *odb);
/** Set the help callback to 'gnc_style_sheet_options_help_cb' to open a help browser
* and point it to the Style Sheet link in the Help file.
*/
void gnc_options_dialog_set_style_sheet_options_help_cb (GNCOptionWin *win);
/** Given a file name, find and load the requested pixmap. This
* routine will display an error message if it can't find the file or
* load the pixmap.

View File

@ -29,7 +29,6 @@
#include "swig-runtime.h"
#include "dialog-custom-report.h"
#include "dialog-options.h"
#include "dialog-utils.h"
#include "gnc-main-window.h"
#include "window-report.h"

View File

@ -49,7 +49,6 @@
#include "gnc-budget.h"
#include "gnc-features.h"
#include "dialog-options.h"
#include "dialog-utils.h"
#include "gnc-gnome-utils.h"
#include "gnc-gobject-utils.h"

View File

@ -44,13 +44,13 @@
#include "swig-runtime.h"
#include "libguile.h"
#include <guile-mappings.h>
#include "gnc-plugin-page-register.h"
#include "gnc-plugin-page-report.h"
#include "gnc-budget.h"
#include "gnc-features.h"
#include "dialog-options.h"
#include "dialog-utils.h"
#include "gnc-gnome-utils.h"
#include "misc-gnome-utils.h"

View File

@ -37,7 +37,6 @@
#include "dialog-commodity.h"
#include "dialog-invoice.h"
#include "dialog-preferences.h"
#include "dialog-options.h"
#include "dialog-sx-editor.h"
#include "dialog-transfer.h"
#include "dialog-totd.h"

View File

@ -24,7 +24,6 @@
#include <config.h>
#include <gtk/gtk.h>
#include <glib-object.h>
#include <dialog-options.h>
#include <dialog-utils.h>
#include <gnc-amount-edit.h>
#include <gnc-date-edit.h>