Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gnumeric
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
375
Issues
375
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnumeric
Commits
965b85ea
Commit
965b85ea
authored
Oct 07, 1999
by
Jody Goldberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More GUI updates and fixes.
parent
79931d0d
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
216 additions
and
133 deletions
+216
-133
ChangeLog-2000-02-23
ChangeLog-2000-02-23
+56
-6
OChangeLog-2000-02-23
OChangeLog-2000-02-23
+56
-6
src/dialogs/Makefile.am
src/dialogs/Makefile.am
+4
-1
src/dialogs/dialog-analysis-tools.c
src/dialogs/dialog-analysis-tools.c
+24
-51
src/dialogs/dialog-cell-sort.c
src/dialogs/dialog-cell-sort.c
+3
-1
src/dialogs/dialog-define-names.c
src/dialogs/dialog-define-names.c
+6
-0
src/dialogs/dialog-goal-seek.c
src/dialogs/dialog-goal-seek.c
+14
-7
src/dialogs/dialog-goto-cell.c
src/dialogs/dialog-goto-cell.c
+19
-22
src/dialogs/dialog-paste-special.c
src/dialogs/dialog-paste-special.c
+3
-1
src/dialogs/dialog-solver.c
src/dialogs/dialog-solver.c
+12
-27
src/dialogs/dialog-summary.c
src/dialogs/dialog-summary.c
+11
-0
src/dialogs/names.glade
src/dialogs/names.glade
+1
-0
src/dialogs/summary.glade
src/dialogs/summary.glade
+7
-6
src/dialogs/tools.h
src/dialogs/tools.h
+0
-5
No files found.
ChangeLog-2000-02-23
View file @
965b85ea
...
...
@@ -9,16 +9,66 @@
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/dialog-printer.c (gnumeric_printer_dialog_run):
toplevel: New parameter - app window.
Set initial focus.
Make <Enter> in entry fields invoke default button.
Specify the app as the parent.
Workbook: New parameter
Set initial focus.
Make <Enter> in entry fields invoke default button.
Specify the app as the parent.
* src/dialogs/dialog-printer.h (gnumeric_printer_dialog_run):
Change signature
Change signature
* src/print.c (sheet_print):
gnumeric_printer_dialog_run has new signature
gnumeric_printer_dialog_run has new signature
* src/dialogs/dialog-sovler.c (add_strings_to_glist): Remove
(add_radio_buttons): Remove unnecessary "_()"
(dialog_solver_options, dialog_solver): Add missing "_()"
* src/dialogs/utils-dialog.c: New file
(ut_dia_entry_new_with_max_length, ut_dia_entry_new):
Create entry fields where <Enter> activates the default button
(hbox_pack_label_and_entry): Move from dialog-analysis-tools.c
(add_strings_to_glist): Move from dialog-solver.c
* src/dialogs/utils-dialog.h: New file
(hbox_pack_label_and_entry, add_strings_to_glist): Move from tools.h
* src/dialogs/dialog-cell-comment.c (dialog_cell_comment):
Make OK button the default.
* src/dialogs/dialog-cell-sort.c (order_box_new):
Make <Enter> in entry field invoke default button.
* src/dialogs/dialog-define-names.c (dialog_define_names):
Make <Enter> in entry field invoke default button.
Specify the app as the parent.
* src/dialogs/names.glade: ok button needs "can_default".
* src/dialogs/dialog-summary.c (dialog_summary_update):
Make <Enter> in entry fields invoke default button.
* src/dialogs/summary.glade: Make OK button the default.
Change widget names used by program to avoid inadvertent
translation.
* src/dialogs/dialog-analysis-tools.c
(new_dialog): Make OK button the default
(dialog_data_analysis): Initial focus and selection, Make OK button
the default.
(add_check_buttons, add_output_frame, dialog_sampling_tool): Make
<Enter> in entry field invoke default button
(hbox_pack_label_and_entry): Move to utils-dialog.c
(dialog_random_tool): Replace pack_label_and_entry with
hbox_pack_label_and_entry
(pack_label_and_entry): Remove
* src/dialogs/dialog-goal-seek.c (dialog_found_solution,
dialog_goal_seek): Make OK button the default
(dialog_goal_seek): Make <Enter> in entry field invoke default button.
* src/dialogs/dialog-paste-special.c (dialog_paste_special):
Initial focus
1999-10-05 Jody Goldberg <jgoldberg@home.com>
...
...
OChangeLog-2000-02-23
View file @
965b85ea
...
...
@@ -9,16 +9,66 @@
From : Jon K Hellan <Jon.K.Hellan@item.ntnu.no>
* src/dialogs/dialog-printer.c (gnumeric_printer_dialog_run):
toplevel: New parameter - app window.
Set initial focus.
Make <Enter> in entry fields invoke default button.
Specify the app as the parent.
Workbook: New parameter
Set initial focus.
Make <Enter> in entry fields invoke default button.
Specify the app as the parent.
* src/dialogs/dialog-printer.h (gnumeric_printer_dialog_run):
Change signature
Change signature
* src/print.c (sheet_print):
gnumeric_printer_dialog_run has new signature
gnumeric_printer_dialog_run has new signature
* src/dialogs/dialog-sovler.c (add_strings_to_glist): Remove
(add_radio_buttons): Remove unnecessary "_()"
(dialog_solver_options, dialog_solver): Add missing "_()"
* src/dialogs/utils-dialog.c: New file
(ut_dia_entry_new_with_max_length, ut_dia_entry_new):
Create entry fields where <Enter> activates the default button
(hbox_pack_label_and_entry): Move from dialog-analysis-tools.c
(add_strings_to_glist): Move from dialog-solver.c
* src/dialogs/utils-dialog.h: New file
(hbox_pack_label_and_entry, add_strings_to_glist): Move from tools.h
* src/dialogs/dialog-cell-comment.c (dialog_cell_comment):
Make OK button the default.
* src/dialogs/dialog-cell-sort.c (order_box_new):
Make <Enter> in entry field invoke default button.
* src/dialogs/dialog-define-names.c (dialog_define_names):
Make <Enter> in entry field invoke default button.
Specify the app as the parent.
* src/dialogs/names.glade: ok button needs "can_default".
* src/dialogs/dialog-summary.c (dialog_summary_update):
Make <Enter> in entry fields invoke default button.
* src/dialogs/summary.glade: Make OK button the default.
Change widget names used by program to avoid inadvertent
translation.
* src/dialogs/dialog-analysis-tools.c
(new_dialog): Make OK button the default
(dialog_data_analysis): Initial focus and selection, Make OK button
the default.
(add_check_buttons, add_output_frame, dialog_sampling_tool): Make
<Enter> in entry field invoke default button
(hbox_pack_label_and_entry): Move to utils-dialog.c
(dialog_random_tool): Replace pack_label_and_entry with
hbox_pack_label_and_entry
(pack_label_and_entry): Remove
* src/dialogs/dialog-goal-seek.c (dialog_found_solution,
dialog_goal_seek): Make OK button the default
(dialog_goal_seek): Make <Enter> in entry field invoke default button.
* src/dialogs/dialog-paste-special.c (dialog_paste_special):
Initial focus
1999-10-05 Jody Goldberg <jgoldberg@home.com>
...
...
src/dialogs/Makefile.am
View file @
965b85ea
...
...
@@ -35,8 +35,11 @@ libdialogs_a_SOURCES = \
dialog-solver.c
\
dialog-summary.c
\
dialog-zoom.c
\
utils-dialog.c
\
dialogs.h
\
tools.h
tools.h
\
utils-dialog.h
\
utils-dialog.c
gladedir
=
$(datadir)
/gnumeric/glade
glade_DATA
=
\
...
...
src/dialogs/dialog-analysis-tools.c
View file @
965b85ea
...
...
@@ -12,6 +12,7 @@
#include "gnumeric-util.h"
#include "dialogs.h"
#include "utils.h"
#include "utils-dialog.h"
#include "tools.h"
...
...
@@ -209,25 +210,6 @@ static char *sample_method_ops [] = {
NULL
};
GtkWidget
*
hbox_pack_label_and_entry
(
char
*
str
,
char
*
default_str
,
int
entry_len
,
GtkWidget
*
vbox
)
{
GtkWidget
*
box
,
*
label
,
*
entry
;
box
=
gtk_hbox_new
(
FALSE
,
0
);
entry
=
gtk_entry_new_with_max_length
(
entry_len
);
label
=
gtk_label_new
(
str
);
gtk_entry_set_text
(
GTK_ENTRY
(
entry
),
default_str
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
box
),
label
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
box
),
entry
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
vbox
),
box
);
return
entry
;
}
static
GtkWidget
*
new_dialog
(
char
*
name
,
GtkWidget
*
win
)
{
...
...
@@ -239,6 +221,7 @@ new_dialog(char *name, GtkWidget *win)
NULL
);
gnome_dialog_close_hides
(
GNOME_DIALOG
(
dialog
),
TRUE
);
gnome_dialog_set_default
(
GNOME_DIALOG
(
dialog
),
GNOME_OK
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dialog
),
GTK_WINDOW
(
win
));
return
dialog
;
...
...
@@ -273,8 +256,10 @@ add_check_buttons (GtkWidget *box, check_button_t *cbs)
{
static
gboolean
do_transpose
=
FALSE
;
GtkWidget
*
button
;
GnomeDialog
*
dialog
;
int
i
;
dialog
=
GNOME_DIALOG
(
gtk_widget_get_toplevel
(
box
));
for
(
i
=
0
;
cbs
[
i
].
name
;
i
++
)
{
GtkWidget
*
hbox
,
*
entry
;
...
...
@@ -282,7 +267,7 @@ add_check_buttons (GtkWidget *box, check_button_t *cbs)
button
=
gtk_check_button_new_with_label
(
cbs
[
i
].
name
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
button
,
TRUE
,
TRUE
,
0
);
if
(
cbs
[
i
].
entry_flag
)
{
entry
=
gtk_entry_new_with_max_length
(
20
);
entry
=
ut_dia_entry_new_with_max_length
(
dialog
,
20
);
gtk_entry_set_text
(
GTK_ENTRY
(
entry
),
cbs
[
i
].
default_entry
);
gtk_box_pack_start
(
GTK_BOX
(
hbox
),
entry
,
...
...
@@ -354,7 +339,8 @@ add_output_frame(GtkWidget *box, GSList **output_ops)
_
(
"Output Range:"
));
*
output_ops
=
GTK_RADIO_BUTTON
(
r
)
->
group
;
gtk_box_pack_start_defaults
(
GTK_BOX
(
hbox
),
r
);
output_range_entry
=
gtk_entry_new_with_max_length
(
20
);
output_range_entry
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
gtk_widget_get_toplevel
(
box
)),
20
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
hbox
),
output_range_entry
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
box
),
hbox
);
...
...
@@ -591,8 +577,8 @@ dialog_sampling_tool(Workbook *wb, Sheet *sheet)
else
label
=
gtk_label_new
(
_
(
"Number of Samples:"
));
sampling_entry
[
i
]
=
gtk_entry_new_with_max_length
(
20
);
sampling_entry
[
i
]
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
dialog
),
20
);
r
=
gtk_radio_button_new_with_label
(
sampling_ops
,
_
(
sample_method_ops
[
i
]));
sampling_ops
=
GTK_RADIO_BUTTON
(
r
)
->
group
;
...
...
@@ -1282,25 +1268,6 @@ ftest_dialog_loop:
}
static
GtkWidget
*
pack_label_and_entry
(
char
*
str
,
char
*
default_str
,
int
entry_len
,
GtkWidget
*
vbox
)
{
GtkWidget
*
box
,
*
label
,
*
entry
;
box
=
gtk_hbox_new
(
FALSE
,
0
);
entry
=
gtk_entry_new_with_max_length
(
entry_len
);
label
=
gtk_label_new
(
str
);
gtk_entry_set_text
(
GTK_ENTRY
(
entry
),
default_str
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
box
),
label
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
box
),
entry
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
vbox
),
box
);
return
entry
;
}
static
void
distribution_callback
(
GtkWidget
*
widget
,
random_tool_callback_t
*
p
)
{
...
...
@@ -1402,30 +1369,30 @@ dialog_random_tool(Workbook *wb, Sheet *sheet)
&
callback_data
);
callback_data
.
discrete_box
=
gtk_vbox_new
(
FALSE
,
0
);
discrete_range_entry
=
pack_label_and_entry
discrete_range_entry
=
hbox_
pack_label_and_entry
(
_
(
"Value and Probability Input Range:"
),
""
,
20
,
callback_data
.
discrete_box
);
callback_data
.
uniform_box
=
gtk_vbox_new
(
FALSE
,
0
);
uniform_lower_entry
=
pack_label_and_entry
(
_
(
"Between:"
),
"0"
,
20
,
callback_data
.
uniform_box
);
hbox_
pack_label_and_entry
(
_
(
"Between:"
),
"0"
,
20
,
callback_data
.
uniform_box
);
uniform_upper_entry
=
pack_label_and_entry
(
_
(
"And:"
),
"1"
,
20
,
callback_data
.
uniform_box
);
hbox_
pack_label_and_entry
(
_
(
"And:"
),
"1"
,
20
,
callback_data
.
uniform_box
);
callback_data
.
normal_box
=
gtk_vbox_new
(
FALSE
,
0
);
normal_mean_entry
=
pack_label_and_entry
normal_mean_entry
=
hbox_
pack_label_and_entry
(
_
(
"Mean = "
),
"0"
,
20
,
callback_data
.
normal_box
);
normal_stdev_entry
=
pack_label_and_entry
normal_stdev_entry
=
hbox_
pack_label_and_entry
(
_
(
"Standard Deviation = "
),
"1"
,
20
,
callback_data
.
normal_box
);
callback_data
.
poisson_box
=
gtk_vbox_new
(
FALSE
,
0
);
poisson_lambda_entry
=
pack_label_and_entry
poisson_lambda_entry
=
hbox_
pack_label_and_entry
(
_
(
"Lambda"
),
"0"
,
20
,
callback_data
.
poisson_box
);
callback_data
.
bernoulli_box
=
gtk_vbox_new
(
FALSE
,
0
);
bernoulli_p_entry
=
pack_label_and_entry
bernoulli_p_entry
=
hbox_
pack_label_and_entry
(
_
(
"p Value"
),
"0"
,
20
,
callback_data
.
bernoulli_box
);
box
=
gtk_vbox_new
(
FALSE
,
0
);
...
...
@@ -2010,6 +1977,7 @@ dialog_data_analysis (Workbook *wb, Sheet *sheet)
GNOME_STOCK_BUTTON_CANCEL
,
NULL
);
gnome_dialog_close_hides
(
GNOME_DIALOG
(
dialog
),
TRUE
);
gnome_dialog_set_default
(
GNOME_DIALOG
(
dialog
),
GNOME_OK
);
box
=
gtk_vbox_new
(
FALSE
,
0
);
main_label
=
gtk_label_new
(
_
(
"Analysis Tools"
));
...
...
@@ -2042,9 +2010,14 @@ dialog_data_analysis (Workbook *wb, Sheet *sheet)
gtk_signal_connect
(
GTK_OBJECT
(
tool_list
),
"select_row"
,
GTK_SIGNAL_FUNC
(
selection_made
),
NULL
);
if
(
tools
[
0
].
fun
)
gtk_clist_select_row
(
GTK_CLIST
(
tool_list
),
0
,
0
);
gtk_widget_show_all
(
dialog
);
}
else
gtk_widget_show
(
dialog
);
gtk_widget_grab_focus
(
GTK_WIDGET
(
tool_list
));
/* Run the dialog */
selection
=
gnome_dialog_run
(
GNOME_DIALOG
(
dialog
));
...
...
src/dialogs/dialog-cell-sort.c
View file @
965b85ea
...
...
@@ -15,6 +15,7 @@
#include "expr.h"
#include "selection.h"
#include "utils.h"
#include "utils-dialog.h"
typedef
struct
{
GtkWidget
*
parent
;
...
...
@@ -39,7 +40,8 @@ order_box_new(GtkWidget * parent, const char *frame_text, const char *default_te
GtkTable
*
tt
;
tt
=
GTK_TABLE
(
gtk_table_new
(
0
,
0
,
0
));
gtk_table_attach
(
tt
,
gtk_label_new
(
_
(
"Column:"
)),
0
,
1
,
0
,
1
,
0
,
0
,
2
,
0
);
this
->
rangetext
=
gtk_entry_new_with_max_length
(
5
);
this
->
rangetext
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
gtk_widget_get_toplevel
(
parent
)),
5
);
gtk_entry_set_text
(
GTK_ENTRY
(
this
->
rangetext
),
default_text
);
gtk_table_attach
(
tt
,
this
->
rangetext
,
1
,
2
,
0
,
1
,
0
,
0
,
0
,
2
);
/* gtk_table_attach (tt, this->rangetext, 1, 2, 0, 1, GTK_FILL | GTK_EXPAND, 0, 0, 2); */
...
...
src/dialogs/dialog-define-names.c
View file @
965b85ea
...
...
@@ -265,6 +265,12 @@ dialog_define_names (Workbook *wb)
printf
(
"Corrupt file names.glade
\n
"
);
return
;
}
gnome_dialog_set_parent
(
GNOME_DIALOG
(
state
.
dia
),
GTK_WINDOW
(
wb
->
toplevel
));
gnome_dialog_editable_enters
(
GNOME_DIALOG
(
state
.
dia
),
GTK_EDITABLE
(
state
.
name
));
gnome_dialog_editable_enters
(
GNOME_DIALOG
(
state
.
dia
),
GTK_EDITABLE
(
state
.
value
));
fill_list
(
&
state
);
...
...
src/dialogs/dialog-goal-seek.c
View file @
965b85ea
...
...
@@ -18,6 +18,7 @@
#include "expr.h"
#include "eval.h"
#include "utils.h"
#include "utils-dialog.h"
#include "goal-seek.h"
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
...
...
@@ -206,6 +207,7 @@ dialog_found_solution (Cell *set_cell, Cell *change_cell, float_t target_value)
GNOME_STOCK_BUTTON_CANCEL
,
NULL
);
gnome_dialog_set_default
(
GNOME_DIALOG
(
dialog
),
GNOME_OK
);
status_label
=
gtk_label_new
(
status_str
);
empty_label
=
gtk_label_new
(
""
);
target_label
=
gtk_label_new
(
target_str
);
...
...
@@ -239,7 +241,6 @@ dialog_found_solution (Cell *set_cell, Cell *change_cell, float_t target_value)
return
(
selection
!=
0
);
}
void
dialog_goal_seek
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
...
...
@@ -270,12 +271,18 @@ dialog_goal_seek (Workbook *wb, Sheet *sheet)
gnome_dialog_close_hides
(
GNOME_DIALOG
(
dialog
),
TRUE
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dialog
),
GTK_WINDOW
(
wb
->
toplevel
));
set_entry
=
gtk_entry_new_with_max_length
(
MAX_CELL_NAME_LEN
);
target_entry
=
gtk_entry_new_with_max_length
(
MAX_CELL_NAME_LEN
);
change_entry
=
gtk_entry_new_with_max_length
(
MAX_CELL_NAME_LEN
);
xmin_entry
=
gtk_entry_new_with_max_length
(
MAX_CELL_NAME_LEN
);
xmax_entry
=
gtk_entry_new_with_max_length
(
MAX_CELL_NAME_LEN
);
gnome_dialog_set_default
(
GNOME_DIALOG
(
dialog
),
GNOME_OK
);
set_entry
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
dialog
),
MAX_CELL_NAME_LEN
);
target_entry
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
dialog
),
MAX_CELL_NAME_LEN
);
change_entry
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
dialog
),
MAX_CELL_NAME_LEN
);
xmin_entry
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
dialog
),
MAX_CELL_NAME_LEN
);
xmax_entry
=
ut_dia_entry_new_with_max_length
(
GNOME_DIALOG
(
dialog
),
MAX_CELL_NAME_LEN
);
set_label
=
gtk_label_new
(
_
(
"Set cell:"
));
target_label
=
gtk_label_new
(
_
(
"To value:"
));
...
...
src/dialogs/dialog-goto-cell.c
View file @
965b85ea
...
...
@@ -10,12 +10,7 @@
#include "gnumeric.h"
#include "gnumeric-util.h"
#include "dialogs.h"
static
void
cb_goto_cell
(
GtkEntry
*
entry
,
GnomeDialog
*
dialog
)
{
gtk_main_quit
();
}
#include "utils-dialog.h"
static
void
cb_row_selected
(
GtkCList
*
clist
,
int
row
,
int
col
,
GdkEvent
*
event
,
GtkEntry
*
entry
)
...
...
@@ -43,22 +38,24 @@ dialog_goto_cell (Workbook *wb)
titles
[
1
]
=
NULL
;
dialog
=
gnome_dialog_new
(
_
(
"Go to..."
),
GNOME_STOCK_BUTTON_HELP
,
_
(
"Special..."
),
GNOME_STOCK_BUTTON_OK
,
GNOME_STOCK_BUTTON_CANCEL
,
_
(
"Special..."
),
GNOME_STOCK_BUTTON_HELP
,
NULL
);
gnome_dialog_close_hides
(
GNOME_DIALOG
(
dialog
),
TRUE
);
gnome_dialog_set_default
(
GNOME_DIALOG
(
dialog
),
GNOME_OK
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dialog
),
GTK_WINDOW
(
wb
->
toplevel
));
swin
=
gtk_scrolled_window_new
(
NULL
,
NULL
);
clist
=
gtk_clist_new_with_titles
(
1
,
titles
);
gtk_clist_column_titles_passive
(
GTK_CLIST
(
clist
));
gtk_container_add
(
GTK_CONTAINER
(
swin
),
clist
);
gtk_scrolled_window_set_policy
(
GTK_SCROLLED_WINDOW
(
swin
),
GTK_POLICY_AUTOMATIC
,
GTK_POLICY_AUTOMATIC
);
entry
=
gtk_entry_new
();
gtk_signal_connect
(
GTK_OBJECT
(
entry
),
"activate"
,
GTK_SIGNAL_FUNC
(
cb_goto_cell
),
dialog
);
entry
=
ut_dia_entry_new
(
GNOME_DIALOG
(
dialog
));
gtk_signal_connect
(
GTK_OBJECT
(
clist
),
"select_row"
,
GTK_SIGNAL_FUNC
(
cb_row_selected
),
entry
);
...
...
@@ -78,19 +75,19 @@ dialog_goto_cell (Workbook *wb)
gtk_widget_grab_focus
(
entry
);
/* Run the dialog */
gnome_dialog_run
(
GNOME_DIALOG
(
dialog
));
if
(
gnome_dialog_run
(
GNOME_DIALOG
(
dialog
))
==
GNOME_OK
)
{
text
=
gtk_entry_get_text
(
GTK_ENTRY
(
entry
));
text
=
gtk_entry_get_text
(
GTK_ENTRY
(
entry
));
if
(
*
text
){
if
(
workbook_parse_and_jump
(
wb
,
text
)){
gchar
*
texts
[
1
];
texts
[
0
]
=
text
;
gtk_clist_append
(
GTK_CLIST
(
clist
),
texts
);
if
(
*
text
){
if
(
workbook_parse_and_jump
(
wb
,
text
)){
gchar
*
texts
[
1
];
texts
[
0
]
=
text
;
gtk_clist_append
(
GTK_CLIST
(
clist
),
texts
);
}
}
}
}
gnome_dialog_close
(
GNOME_DIALOG
(
dialog
));
}
src/dialogs/dialog-paste-special.c
View file @
965b85ea
...
...
@@ -55,7 +55,7 @@ int
dialog_paste_special
(
Workbook
*
wb
)
{
GtkWidget
*
dialog
,
*
hbox
;
GtkWidget
*
f1
,
*
f1v
,
*
f2
,
*
f2v
,
*
cb
;
GtkWidget
*
f1
,
*
f1v
,
*
f2
,
*
f2v
,
*
cb
,
*
first_button
=
NULL
;
GSList
*
group_type
,
*
group_ops
;
int
result
,
i
;
int
v
;
...
...
@@ -90,6 +90,7 @@ dialog_paste_special (Workbook *wb)
gtk_signal_connect
(
GTK_OBJECT
(
r
),
"toggled"
,
func
,
f2
);
gtk_box_pack_start_defaults
(
GTK_BOX
(
f1v
),
r
);
if
(
i
==
0
)
first_button
=
r
;
}
group_ops
=
NULL
;
...
...
@@ -113,6 +114,7 @@ dialog_paste_special (Workbook *wb)
gtk_box_pack_start
(
GTK_BOX
(
GNOME_DIALOG
(
dialog
)
->
vbox
),
hbox
,
TRUE
,
TRUE
,
0
);
gtk_widget_show_all
(
hbox
);
gtk_widget_grab_focus
(
first_button
);
/* Run the dialog */
gtk_window_set_modal
(
GTK_WINDOW
(
dialog
),
TRUE
);
...
...
src/dialogs/dialog-solver.c
View file @
965b85ea
...
...
@@ -14,10 +14,7 @@
#include "func.h"
#include "tools.h"
#include "utils.h"
GtkWidget
*
hbox_pack_label_and_entry
(
char
*
str
,
char
*
default_str
,
int
entry_len
,
GtkWidget
*
vbox
);
#include "utils-dialog.h"
/* Different constraint types */
static
const
char
*
constraint_strs
[]
=
{
...
...
@@ -93,7 +90,7 @@ add_radio_buttons (GtkWidget *hbox, const char *title, const char *ops[])
for
(
i
=
0
;
ops
[
i
];
i
++
)
{
GtkWidget
*
r
;
r
=
gtk_radio_button_new_with_label
(
group_ops
,
_
(
ops
[
i
])
);
r
=
gtk_radio_button_new_with_label
(
group_ops
,
ops
[
i
]
);
group_ops
=
GTK_RADIO_BUTTON
(
r
)
->
group
;
gtk_box_pack_start_defaults
(
GTK_BOX
(
fv
),
r
);
}
...
...
@@ -116,19 +113,6 @@ add_check_buttons (GtkWidget *box, const char *ops[])
}
GList
*
add_strings_to_glist
(
const
char
*
strs
[])
{
int
i
;
GList
*
list
=
NULL
;
for
(
i
=
0
;
strs
[
i
]
!=
NULL
;
i
++
)
{
list
=
g_list_append
(
list
,
(
gpointer
)
strs
[
i
]);
}
return
list
;
}
typedef
struct
{
GSList
*
constraints
;
GtkCList
*
clist
;
...
...
@@ -161,11 +145,12 @@ dialog_solver_options (Workbook *wb, Sheet *sheet)
add_check_buttons
(
check_buttons_right
,
check_button_right_ops
);
group_estimates
=
add_radio_buttons
(
radio_buttons
,
"Estimates"
,
estimate_ops
);
_
(
"Estimates"
)
,
estimate_ops
);
group_derivatives
=
add_radio_buttons
(
radio_buttons
,
"Derivatives"
,
derivative_ops
);
_
(
"Derivatives"
),
derivative_ops
);
group_search
=
add_radio_buttons
(
radio_buttons
,
"Search"
,
search_ops
);
_
(
"Search"
)
,
search_ops
);
gtk_box_pack_start
(
GTK_BOX
(
check_buttons
),
check_buttons_left
,
TRUE
,
TRUE
,
0
);
...
...
@@ -387,7 +372,7 @@ dialog_solver (Workbook *wb, Sheet *sheet)
/* Radio buttons for problem type selection */
radio_buttons
=
gtk_hbox_new
(
TRUE
,
0
);
group_equal
=
add_radio_buttons
(
radio_buttons
,
"Equal to:"
,
equal_ops
);
_
(
"Equal to:"
)
,
equal_ops
);
gtk_box_pack_start
(
GTK_BOX
(
box
),
radio_buttons
,
TRUE
,
TRUE
,
0
);
...
...
@@ -412,16 +397,16 @@ dialog_solver (Workbook *wb, Sheet *sheet)
(
GTK_SCROLLED_WINDOW
(
scrolled_win
),
constraint_list
);
gtk_clist_set_selection_mode
(
GTK_CLIST
(
constraint_list
),
GTK_SELECTION_SINGLE
);
gtk_clist_set_column_title
(
GTK_CLIST
(
constraint_list
),
0
,
"Subject to the Constraints:"
);
gtk_clist_set_column_title
(
GTK_CLIST
(
constraint_list
),
0
,
_
(
"Subject to the Constraints:"
)
);
gtk_clist_column_titles_passive
(
GTK_CLIST
(
constraint_list
));
gtk_clist_column_titles_show
(
GTK_CLIST
(
constraint_list
));
gtk_clist_clear
(
GTK_CLIST
(
constraint_list
));
/* Constraint buttons */
constr_add_button
=
gtk_button_new_with_label
(
"Add"
);
constr_change_button
=
gtk_button_new_with_label
(
"Change"
);
constr_delete_button
=
gtk_button_new_with_label
(
"Delete"
);
constr_add_button
=
gtk_button_new_with_label
(
_
(
"Add"
)
);
constr_change_button
=
gtk_button_new_with_label
(
_
(
"Change"
)
);
constr_delete_button
=
gtk_button_new_with_label
(
_
(
"Delete"
)
);
constr_button_box
=
gtk_vbox_new
(
FALSE
,
0
);
constraint_dialog
.
constraints
=
NULL
;
constraint_dialog
.
clist
=
GTK_CLIST
(
constraint_list
);
...
...
src/dialogs/dialog-summary.c
View file @
965b85ea
...
...
@@ -76,6 +76,10 @@ dialog_summary_update (Workbook *wb, SummaryInfo *sin)
{
GladeXML
*
gui
=
glade_xml_new
(
GNUMERIC_GLADEDIR
"/summary.glade"
,
NULL
);
GtkWidget
*
dia
;
int
i
;
static
char
*
names
[]
=
{
"glade_title"
,
"glade_author"
,
"glade_category"
,
"glade_keywords"
,
"glade_manager"
};
gint
v
;
if
(
!
gui
)
{
...
...
@@ -88,6 +92,13 @@ dialog_summary_update (Workbook *wb, SummaryInfo *sin)
printf
(
"Corrupt file summary.glade
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
sizeof
(
names
)
/
sizeof
(
char
*
);
i
++
)
{
GtkWidget
*
entry
;
entry
=
glade_xml_get_widget
(
gui
,
names
[
i
]);
gnome_dialog_editable_enters
(
GNOME_DIALOG
(
dia
),
GTK_EDITABLE
(
entry
));
}
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dia
),
GTK_WINDOW
(
wb
->
toplevel
));
...
...
src/dialogs/names.glade
View file @
965b85ea
...
...
@@ -127,6 +127,7 @@
<class>
GtkButton
</class>
<name>
ok
</name>
<has_default>
True
</has_default>
<can_default>
True
</can_default>
<can_focus>
True
</can_focus>