mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/gnome/window-help.c: save & restore window size
* src/gnome/window-report.c: save & restore window size * src/scm/prefs.scm: add vars for report & help win sizes git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3743 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
d786539c08
commit
240fa15646
@ -1,3 +1,11 @@
|
||||
2001-03-04 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnome/window-help.c: save & restore window size
|
||||
|
||||
* src/gnome/window-report.c: save & restore window size
|
||||
|
||||
* src/scm/prefs.scm: add vars for report & help win sizes
|
||||
|
||||
2001-03-03 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/engine/sql/README: add info about running without root
|
||||
|
@ -64,6 +64,7 @@
|
||||
#endif
|
||||
|
||||
#include "File.h"
|
||||
#include "dialog-utils.h"
|
||||
#include "glade-cb-gnc-dialogs.h"
|
||||
#include "glade-gnc-dialogs.h"
|
||||
#include "gnc-component-manager.h"
|
||||
@ -95,6 +96,10 @@ struct _gnc_help_window {
|
||||
/* This static indicates the debugging module that this .o belongs to. */
|
||||
static short module = MOD_GUI;
|
||||
|
||||
static gint last_width = 0;
|
||||
static gint last_height = 0;
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* gnc_help_window_check_urltype
|
||||
* is it OK to show a certain URLType in this window?
|
||||
@ -486,6 +491,11 @@ close_handler (gpointer user_data)
|
||||
{
|
||||
gnc_help_window *help = user_data;
|
||||
|
||||
gdk_window_get_geometry (GTK_WIDGET(help->toplevel)->window, NULL, NULL,
|
||||
&last_width, &last_height, NULL);
|
||||
|
||||
gnc_save_window_size ("help_win", last_width, last_height);
|
||||
|
||||
gnc_help_window_destroy (help);
|
||||
}
|
||||
|
||||
@ -624,6 +634,14 @@ gnc_help_window_new (void) {
|
||||
}
|
||||
g_free(indexfile);
|
||||
|
||||
if (last_width == 0)
|
||||
gnc_get_window_size("help_win", &last_width, &last_height);
|
||||
|
||||
gtk_window_set_default_size(GTK_WINDOW(help->toplevel),
|
||||
last_width, last_height);
|
||||
|
||||
gnc_window_adjust_for_screen (GTK_WINDOW(help->toplevel));
|
||||
|
||||
gtk_widget_show_all(help->toplevel);
|
||||
|
||||
return help;
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <guile/gh.h>
|
||||
|
||||
#include "dialog-options.h"
|
||||
#include "dialog-utils.h"
|
||||
#include "glade-gnc-dialogs.h"
|
||||
#include "gnc-component-manager.h"
|
||||
#include "gnc-engine-util.h"
|
||||
@ -64,6 +65,9 @@ struct _gnc_report_window {
|
||||
/* This static indicates the debugging module that this .o belongs to. */
|
||||
static short module = MOD_HTML;
|
||||
|
||||
static gint last_width = 0;
|
||||
static gint last_height = 0;
|
||||
|
||||
|
||||
/********************************************************************
|
||||
* gnc_report_window_check_urltype
|
||||
@ -387,6 +391,14 @@ close_handler (gpointer user_data)
|
||||
{
|
||||
gnc_report_window *win = user_data;
|
||||
|
||||
if (win->top_level)
|
||||
{
|
||||
gdk_window_get_geometry (GTK_WIDGET(win->container)->window, NULL, NULL,
|
||||
&last_width, &last_height, NULL);
|
||||
|
||||
gnc_save_window_size ("report_win", last_width, last_height);
|
||||
}
|
||||
|
||||
gnc_report_window_destroy (win);
|
||||
}
|
||||
|
||||
@ -534,6 +546,17 @@ gnc_report_window_new(GtkWidget * container) {
|
||||
report->option_dialog = NULL;
|
||||
report->odb = NULL;
|
||||
|
||||
if (report->top_level)
|
||||
{
|
||||
if (last_width == 0)
|
||||
gnc_get_window_size("report_win", &last_width, &last_height);
|
||||
|
||||
gtk_window_set_default_size(GTK_WINDOW(report->container),
|
||||
last_width, last_height);
|
||||
|
||||
gnc_window_adjust_for_screen (GTK_WINDOW(report->container));
|
||||
}
|
||||
|
||||
gtk_widget_show_all(report->container);
|
||||
|
||||
return report;
|
||||
|
@ -583,6 +583,14 @@ the current value of the path."
|
||||
(gnc:make-internal-option
|
||||
"__gui" "account_win_height" 0))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-internal-option
|
||||
"__gui" "help_win_width" 0))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-internal-option
|
||||
"__gui" "help_win_height" 0))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-internal-option
|
||||
"__gui" "main_win_width" 0))
|
||||
@ -603,6 +611,14 @@ the current value of the path."
|
||||
(gnc:make-internal-option
|
||||
"__gui" "reg_column_widths" '()))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-internal-option
|
||||
"__gui" "report_win_width" 0))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-internal-option
|
||||
"__gui" "report_win_height" 0))
|
||||
|
||||
(gnc:register-configuration-option
|
||||
(gnc:make-internal-option
|
||||
"__exp_parser" "defined_variables" '()))
|
||||
|
Loading…
Reference in New Issue
Block a user