Module cleanups.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5420 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas
2001-09-24 07:22:02 +00:00
parent 47062896c4
commit 630ccc2a2e
11 changed files with 284 additions and 246 deletions
+8 -1
View File
@@ -48,6 +48,7 @@
static short module = MOD_GUI;
static GNCBook *current_book = NULL;
static GNCCanCancelSaveCB can_cancel_cb = NULL;
static GNCBook *
@@ -299,7 +300,7 @@ gnc_file_query_save (void)
const char *message = _("Changes have been made since the last "
"Save. Save the data to file?");
if (gnc_ui_can_cancel_save ())
if (can_cancel_cb && can_cancel_cb ())
result = gnc_verify_cancel_dialog (message, GNC_VERIFY_YES);
else
{
@@ -710,3 +711,9 @@ gnc_file_quit (void)
gnc_engine_resume_events ();
gnc_gui_refresh_all ();
}
void
gnc_file_set_can_cancel_callback (GNCCanCancelSaveCB cb)
{
can_cancel_cb = cb;
}
+5
View File
@@ -112,6 +112,8 @@
#ifndef GNC_FILE_H
#define GNC_FILE_H
#include <glib.h>
#include "gnc-book.h"
void gnc_file_new (void);
@@ -125,4 +127,7 @@ gboolean gnc_file_query_save (void);
void gnc_file_quit (void);
typedef gboolean (*GNCCanCancelSaveCB) (void);
void gnc_file_set_can_cancel_callback (GNCCanCancelSaveCB cb);
#endif /* GNC_FILE_H */
-2
View File
@@ -108,8 +108,6 @@ void gnc_ui_shutdown (void);
void gnc_ui_destroy_all_subwindows (void);
gncUIWidget gnc_ui_get_toplevel (void);
gboolean gnc_ui_can_cancel_save (void);
/* Changing the GUI Cursor ******************************************/
void gnc_set_busy_cursor(gncUIWidget w, gboolean update_now);
+4
View File
@@ -81,6 +81,10 @@ libgncmod_gnome_utils_la_LIBADD = \
${GUPPI_LIBS} \
${GLIB_LIBS}
gladedir = $(GNC_GLADE_DIR)
glade_DATA = \
commodity.glade
EXTRA_DIST = \
.cvsignore \
gnc-dir.h.in
@@ -571,242 +571,4 @@
</widget>
</widget>
<widget>
<class>GnomeDialog</class>
<name>Commodities Dialog</name>
<title>Commodities</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>False</auto_close>
<hide_on_close>False</hide_on_close>
<widget>
<class>GtkVBox</class>
<child_name>GnomeDialog:vbox</child_name>
<name>vbox127</name>
<homogeneous>False</homogeneous>
<spacing>8</spacing>
<child>
<padding>4</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkHButtonBox</class>
<child_name>GnomeDialog:action_area</child_name>
<name>hbuttonbox6</name>
<layout_style>GTK_BUTTONBOX_END</layout_style>
<spacing>8</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkButton</class>
<name>close_button</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox107</name>
<homogeneous>False</homogeneous>
<spacing>2</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkFrame</class>
<name>frame51</name>
<border_width>3</border_width>
<label>Commodities</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkVBox</class>
<name>vbox128</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkCheckButton</class>
<name>show_currencies_button</name>
<border_width>3</border_width>
<can_focus>True</can_focus>
<label>Show National Currencies</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow33</name>
<border_width>3</border_width>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCList</class>
<name>commodity_list</name>
<can_focus>True</can_focus>
<columns>5</columns>
<column_widths>80,80,80,80,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477426</name>
<label>Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477427</name>
<label>Symbol</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477428</name>
<label>Name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477429</name>
<label>Code</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477430</name>
<label>Fraction</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
<widget>
<class>GtkHButtonBox</class>
<name>hbuttonbox7</name>
<border_width>3</border_width>
<layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
<spacing>30</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkButton</class>
<name>add_button</name>
<tooltip>Add a new price.</tooltip>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Add</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>remove_button</name>
<tooltip>Remove the current price</tooltip>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Remove</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>edit_button</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Edit</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</GTK-Interface>
+1 -1
View File
@@ -369,7 +369,7 @@ gnc_commodities_dialog_create (GtkWidget * parent, CommoditiesDialog *cd)
GtkWidget *dialog;
GladeXML *xml;
xml = gnc_glade_xml_new ("commodity.glade", "Commodities Dialog");
xml = gnc_glade_xml_new ("commodities.glade", "Commodities Dialog");
dialog = glade_xml_get_widget (xml, "Commodities Dialog");
cd->dialog = dialog;
+1 -1
View File
@@ -1,7 +1,7 @@
gladedir = $(GNC_GLADE_DIR)
glade_DATA = \
account.glade \
commodity.glade \
commodities.glade \
fincalc.glade \
find.glade \
help.glade \
+257
View File
@@ -0,0 +1,257 @@
<?xml version="1.0"?>
<GTK-Interface>
<project>
<name>Glade</name>
<program_name>glade</program_name>
<directory></directory>
<source_directory></source_directory>
<pixmaps_directory></pixmaps_directory>
<language>C</language>
<gnome_support>True</gnome_support>
<gettext_support>True</gettext_support>
<output_main_file>False</output_main_file>
<output_support_files>False</output_support_files>
<output_build_files>False</output_build_files>
<backup_source_files>False</backup_source_files>
</project>
<widget>
<class>GnomeDialog</class>
<name>Commodities Dialog</name>
<title>Commodities</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>True</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>False</auto_close>
<hide_on_close>False</hide_on_close>
<widget>
<class>GtkVBox</class>
<child_name>GnomeDialog:vbox</child_name>
<name>vbox127</name>
<homogeneous>False</homogeneous>
<spacing>8</spacing>
<child>
<padding>4</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkHButtonBox</class>
<child_name>GnomeDialog:action_area</child_name>
<name>hbuttonbox6</name>
<layout_style>GTK_BUTTONBOX_END</layout_style>
<spacing>8</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkButton</class>
<name>close_button</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox107</name>
<homogeneous>False</homogeneous>
<spacing>2</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkFrame</class>
<name>frame51</name>
<border_width>3</border_width>
<label>Commodities</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkVBox</class>
<name>vbox128</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkCheckButton</class>
<name>show_currencies_button</name>
<border_width>3</border_width>
<can_focus>True</can_focus>
<label>Show National Currencies</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow33</name>
<border_width>3</border_width>
<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCList</class>
<name>commodity_list</name>
<can_focus>True</can_focus>
<columns>5</columns>
<column_widths>80,80,80,80,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477426</name>
<label>Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477427</name>
<label>Symbol</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477428</name>
<label>Name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477429</name>
<label>Code</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label8477430</name>
<label>Fraction</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
<widget>
<class>GtkHButtonBox</class>
<name>hbuttonbox7</name>
<border_width>3</border_width>
<layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
<spacing>30</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkButton</class>
<name>add_button</name>
<tooltip>Add a new price.</tooltip>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Add</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>remove_button</name>
<tooltip>Remove the current price</tooltip>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Remove</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
<class>GtkButton</class>
<name>edit_button</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Edit</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</GTK-Interface>
+3 -1
View File
@@ -137,7 +137,7 @@ gnc_ui_get_data (void)
return app;
}
gboolean
static gboolean
gnc_ui_can_cancel_save (void)
{
return gnc_main_window_can_cancel_save (app);
@@ -542,6 +542,8 @@ gnucash_ui_init(void)
gnc_ui_commodity_set_help_callback (gnc_commodity_help_cb);
gnc_file_set_can_cancel_callback (gnc_ui_can_cancel_save);
/* initialize gnome MDI and set up application window defaults */
app = gnc_main_window_new();
/* Run the ui startup hooks. */
+1 -1
View File
@@ -1,4 +1,4 @@
SUBDIRS = . #test
SUBDIRS = . test
DIST_SUBDIRS = test
pkglib_LTLIBRARIES = libgncmod-binary-import.la
@@ -3,7 +3,7 @@ TESTS = \
# test-load-module
TESTS_ENVIRONMENT= \
GNC_MODULE_PATH=../../engine:../../gnc-module:../../calculation:.. \
GNC_MODULE_PATH=${top_srcdir}/src/engine:${top_srcdir/src/gnc-module:${top_srcdir}/src/calculation:.. \
GUILE_LOAD_PATH=${G_WRAP_MODULE_DIR}:../../engine:..:../../gnc-module:${top_srcdir}/lib \
LTDL_LIBRARY_PATH=.. \
LD_LIBRARY_PATH=${top_srcdir}/src/gnc-module:${top_srcdir}/src/gnc-module/.libs:${top_srcdir}/src/engine:${top_srcdir}/src/engine/.libs:${top_srcdir}/src/calculation:${top_srcdir}/src/calculation/.libs
@@ -18,8 +18,11 @@ LDADD = \
-L${top_srcdir}/src/app-file -L${top_srcdir}/src/app-file/.libs \
-L${top_srcdir}/src/app-file/gnome -L${top_srcdir}/src/app-file/gnome/.libs \
${top_srcdir}/src/gnc-module/libgncmodule.la \
${top_srcdir}/src/calculation/libgncmod-calculation.la \
${top_srcdir}/src/engine/libgncmod-engine.la \
${top_srcdir}/src/network-utils/libgncmod-network-utils.la \
${top_srcdir}/src/app-utils/libgncmod-app-utils.la \
${top_srcdir}/src/app-file/libgncmod-app-file.la \
${top_srcdir}/src/app-file/gnome/libgncmod-app-file-gnome.la \
${top_srcdir}/src/gnome-utils/libgncmod-gnome-utils.la \
../libgncmod-binary-import.la \