mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
*** empty log message ***
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2094 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6455a20b9b
commit
bf27b62cea
@ -1,5 +1,8 @@
|
||||
2000-03-19 Dave Peticolas <peticola@cs.ucdavis.edu>
|
||||
|
||||
* src/gnome/dialog-options.c (gnc_option_set_ui_widget): request
|
||||
a reasonable size for the number-range widget.
|
||||
|
||||
* src/FileDialog.c (gncFileQuerySave): return a boolean value
|
||||
indicating whether the user wants to proceed or cancel. The uses
|
||||
of this function have been updated to respond appropriately.
|
||||
|
443
po/en_GB.po
443
po/en_GB.po
File diff suppressed because it is too large
Load Diff
442
po/gnucash.pot
442
po/gnucash.pot
File diff suppressed because it is too large
Load Diff
@ -59,6 +59,7 @@ _("Show Vertical Borders")
|
||||
_("This is a boolean option.")
|
||||
_("_Profit and Loss")
|
||||
_("Background Color")
|
||||
_("The number option formatted as currency is %s.")
|
||||
_("Income/Salary/Taxable")
|
||||
_("There are no selected accounts in the account list option.")
|
||||
_("This page shows your net worth.")
|
||||
@ -80,6 +81,7 @@ _("largest to smallest, latest to earliest")
|
||||
_("Secondary Key")
|
||||
_("Save window sizes and positions.")
|
||||
_("Bank")
|
||||
_("Number Option")
|
||||
_("Reverse Income and Expense Accounts")
|
||||
_("Europe")
|
||||
_("Add in sub-accounts of each selected")
|
||||
@ -155,6 +157,7 @@ _("Number")
|
||||
_("Show both icons and text")
|
||||
_("Report")
|
||||
_("Notes")
|
||||
_("The number option is %s.")
|
||||
_("The string option is %s.")
|
||||
_("_Reports")
|
||||
_("Single mode active background")
|
||||
@ -267,5 +270,6 @@ _("Income & Expense")
|
||||
_("Hello, World")
|
||||
_("Reverse Credit Card, Liability, Equity, and Income Accounts")
|
||||
_("Stock")
|
||||
_("This is a number option.")
|
||||
_("Extensions")
|
||||
_("Multi mode active split background")
|
||||
|
@ -772,7 +772,7 @@ gnc_option_set_ui_widget(GNCOption *option,
|
||||
|
||||
colon_name = g_strconcat(name, ":", NULL);
|
||||
label = gtk_label_new(colon_name);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.95, 0.5);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
|
||||
g_free(colon_name);
|
||||
|
||||
enclosing = gtk_hbox_new(FALSE, 5);
|
||||
@ -797,7 +797,7 @@ gnc_option_set_ui_widget(GNCOption *option,
|
||||
|
||||
colon_name = g_strconcat(name, ":", NULL);
|
||||
label= gtk_label_new(colon_name);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.95, 0.5);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
|
||||
g_free(colon_name);
|
||||
|
||||
enclosing = gtk_hbox_new(FALSE, 5);
|
||||
@ -821,7 +821,7 @@ gnc_option_set_ui_widget(GNCOption *option,
|
||||
|
||||
colon_name = g_strconcat(name, ":", NULL);
|
||||
label= gtk_label_new(colon_name);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.95, 0.5);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
|
||||
g_free(colon_name);
|
||||
|
||||
enclosing = gtk_hbox_new(FALSE, 5);
|
||||
@ -915,7 +915,7 @@ gnc_option_set_ui_widget(GNCOption *option,
|
||||
|
||||
colon_name = g_strconcat(name, ":", NULL);
|
||||
label = gtk_label_new(colon_name);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.95, 0.5);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
|
||||
g_free(colon_name);
|
||||
|
||||
enclosing = gtk_hbox_new(FALSE, 5);
|
||||
@ -929,6 +929,45 @@ gnc_option_set_ui_widget(GNCOption *option,
|
||||
value = gtk_spin_button_new(adj, step_size, num_decimals);
|
||||
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(value), TRUE);
|
||||
|
||||
{
|
||||
GtkStyle *style;
|
||||
gdouble biggest;
|
||||
gint num_digits;
|
||||
|
||||
biggest = ABS(lower_bound);
|
||||
biggest = MAX(biggest, ABS(upper_bound));
|
||||
|
||||
num_digits = 0;
|
||||
while (biggest >= 1)
|
||||
{
|
||||
num_digits++;
|
||||
biggest = biggest / 10;
|
||||
}
|
||||
|
||||
if (num_digits == 0)
|
||||
num_digits = 1;
|
||||
|
||||
num_digits += num_decimals + 1;
|
||||
|
||||
style = gtk_widget_get_style(value);
|
||||
if (style != NULL)
|
||||
{
|
||||
gchar *string;
|
||||
gint width;
|
||||
|
||||
string = g_strnfill(num_digits, '8');
|
||||
|
||||
width = gdk_text_measure(style->font, string, num_digits);
|
||||
|
||||
/* sync with gtkspinbutton.c. why doesn't it do this itself? */
|
||||
width += 11 + (2 * style->klass->xthickness);
|
||||
|
||||
g_free(string);
|
||||
|
||||
gtk_widget_set_usize(value, width, 0);
|
||||
}
|
||||
}
|
||||
|
||||
option->widget = value;
|
||||
gnc_option_set_ui_value(option, FALSE);
|
||||
|
||||
@ -949,7 +988,7 @@ gnc_option_set_ui_widget(GNCOption *option,
|
||||
|
||||
colon_name = g_strconcat(name, ":", NULL);
|
||||
label = gtk_label_new(colon_name);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.95, 0.5);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
|
||||
g_free(colon_name);
|
||||
|
||||
enclosing = gtk_hbox_new(FALSE, 5);
|
||||
|
@ -81,16 +81,20 @@
|
||||
(lambda () (cons (current-time) 0))
|
||||
#t))
|
||||
|
||||
; (gnc:register-hello-world-option
|
||||
; (gnc:make-number-range-option
|
||||
; "Hello, World!" "Number Option"
|
||||
; "ee" "This is a number option."
|
||||
; 150.00 ;; default
|
||||
; 0.0 ;; lower bound
|
||||
; 2000.0 ;; upper bound
|
||||
; 2.0 ;; number of decimals
|
||||
; 0.01 ;; step size
|
||||
; ))
|
||||
;; This is a number range option. The user can enter a number
|
||||
;; between a lower and upper bound given below. There are also
|
||||
;; arrows the user can click to go up or down, the amount changed
|
||||
;; by a single click is given by the step size.
|
||||
(gnc:register-hello-world-option
|
||||
(gnc:make-number-range-option
|
||||
"Hello, World!" "Number Option"
|
||||
"ee" "This is a number option."
|
||||
1500.0 ;; default
|
||||
0.0 ;; lower bound
|
||||
10000.0 ;; upper bound
|
||||
2.0 ;; number of decimals
|
||||
0.01 ;; step size
|
||||
))
|
||||
|
||||
;; This is a color option, defined by rgba values. A color value
|
||||
;; is a list where the elements are the red, green, blue, and
|
||||
@ -221,6 +225,7 @@
|
||||
(string-val (op-value "Hello, World!" "String Option"))
|
||||
(date-val (op-value "Hello, World!" "Just a Date Option"))
|
||||
(date2-val (op-value "Hello, World!" "Time and Date Option"))
|
||||
(num-val (op-value "Hello, World!" "Number Option"))
|
||||
(color-op (get-op "Hello, World!" "Background Color"))
|
||||
(accounts (op-value "Hello Again" "An account list option"))
|
||||
(list-val (op-value "Hello Again" "A list option"))
|
||||
@ -269,6 +274,11 @@
|
||||
|
||||
(make-para 'time-date-string (bold date-string2))
|
||||
|
||||
(make-para 'num-string-1 (bold (number->string num-val)))
|
||||
|
||||
(make-para 'num-string-2
|
||||
(bold (gnc:amount->formatted-string num-val #f)))
|
||||
|
||||
(list-option-list list-val)
|
||||
|
||||
(account-list accounts)
|
||||
@ -317,6 +327,9 @@
|
||||
(string-db 'store 'string-string "The string option is %s.")
|
||||
(string-db 'store 'date-string "The date option is %s.")
|
||||
(string-db 'store 'time-date-string "The date and time option is %s.")
|
||||
(string-db 'store 'num-string-1 "The number option is %s.")
|
||||
(string-db 'store 'num-string-2
|
||||
"The number option formatted as currency is %s.")
|
||||
(string-db 'store 'nice-day "Have a nice day!")
|
||||
|
||||
(string-db 'store 'true "true")
|
||||
|
Loading…
Reference in New Issue
Block a user