Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gnumeric
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
355
Issues
355
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnumeric
Commits
9d99ee8e
Commit
9d99ee8e
authored
Dec 10, 1998
by
Arturo Espinosa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the new gnome_dialog_set_parent -mig
parent
03467aba
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
67 additions
and
53 deletions
+67
-53
src/about.c
src/about.c
+2
-1
src/dialog-cell-format.c
src/dialog-cell-format.c
+3
-1
src/dialog-define-names.c
src/dialog-define-names.c
+2
-1
src/dialog-delete-cells.c
src/dialog-delete-cells.c
+1
-1
src/dialog-insert-cells.c
src/dialog-insert-cells.c
+1
-1
src/dialog-paste-special.c
src/dialog-paste-special.c
+2
-1
src/dialog-zoom.c
src/dialog-zoom.c
+1
-1
src/dialogs.h
src/dialogs.h
+7
-7
src/dialogs/dialog-about.c
src/dialogs/dialog-about.c
+2
-1
src/dialogs/dialog-cell-format.c
src/dialogs/dialog-cell-format.c
+3
-1
src/dialogs/dialog-define-names.c
src/dialogs/dialog-define-names.c
+2
-1
src/dialogs/dialog-delete-cells.c
src/dialogs/dialog-delete-cells.c
+1
-1
src/dialogs/dialog-insert-cells.c
src/dialogs/dialog-insert-cells.c
+1
-1
src/dialogs/dialog-paste-special.c
src/dialogs/dialog-paste-special.c
+2
-1
src/dialogs/dialog-zoom.c
src/dialogs/dialog-zoom.c
+1
-1
src/dialogs/dialogs.h
src/dialogs/dialogs.h
+7
-7
src/file.c
src/file.c
+5
-3
src/item-grid.c
src/item-grid.c
+4
-4
src/plugin-manager.c
src/plugin-manager.c
+8
-6
src/plugin.h
src/plugin.h
+1
-1
src/workbook.c
src/workbook.c
+11
-11
No files found.
src/about.c
View file @
9d99ee8e
...
...
@@ -16,7 +16,7 @@
* nice
*/
void
dialog_about
(
void
)
dialog_about
(
Workbook
*
wb
)
{
GtkWidget
*
about
;
const
gchar
*
authors
[]
=
{
...
...
@@ -37,6 +37,7 @@ dialog_about (void)
"http://www.gnome.org/gnumeric"
),
NULL
);
gtk_window_set_modal
(
GTK_WINDOW
(
about
),
TRUE
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
about
),
GTK_WINDOW
(
wb
->
toplevel
));
gnome_dialog_set_close
(
GNOME_DIALOG
(
about
),
TRUE
);
gtk_widget_show
(
about
);
}
...
...
src/dialog-cell-format.c
View file @
9d99ee8e
...
...
@@ -786,7 +786,7 @@ cell_properties_close (void)
* Main entry point for the Cell Format dialog box
*/
void
dialog_cell_format
(
Sheet
*
sheet
)
dialog_cell_format
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
GtkWidget
*
prop_win
;
CellList
*
cells
;
...
...
@@ -799,6 +799,8 @@ dialog_cell_format (Sheet *sheet)
cells
=
sheet_selection_to_list
(
sheet
);
prop_win
=
gnome_property_box_new
();
gnome_dialog_set_parent
(
GNOME_DIALOG
(
prop_win
),
GTK_WINDOW
(
wb
->
toplevel
));
if
(
cells
)
first_cell
=
cells
->
data
;
else
...
...
src/dialog-define-names.c
View file @
9d99ee8e
...
...
@@ -26,7 +26,8 @@ dialog_define_names (Workbook *wb)
_
(
"Add"
),
_
(
"Remove"
),
NULL
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dialog
),
GTK_WINDOW
(
wb
->
toplevel
));
swin
=
gtk_scrolled_window_new
(
NULL
,
NULL
);
clist
=
(
GtkCList
*
)
gtk_clist_new
(
1
);
gtk_container_add
(
GTK_CONTAINER
(
swin
),
GTK_WIDGET
(
clist
));
...
...
src/dialog-delete-cells.c
View file @
9d99ee8e
...
...
@@ -12,7 +12,7 @@
#include "dialogs.h"
void
dialog_delete_cells
(
Sheet
*
sheet
)
dialog_delete_cells
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
int
state
[
4
]
=
{
1
,
0
,
0
,
0
};
SheetSelection
*
ss
;
...
...
src/dialog-insert-cells.c
View file @
9d99ee8e
...
...
@@ -12,7 +12,7 @@
#include "dialogs.h"
void
dialog_insert_cells
(
Sheet
*
sheet
)
dialog_insert_cells
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
int
state
[
4
]
=
{
1
,
0
,
0
,
0
};
SheetSelection
*
ss
;
...
...
src/dialog-paste-special.c
View file @
9d99ee8e
...
...
@@ -46,7 +46,7 @@ enable_op_group (GtkWidget *widget, GtkWidget *group)
}
int
dialog_paste_special
(
void
)
dialog_paste_special
(
Workbook
*
wb
)
{
GtkWidget
*
dialog
,
*
hbox
;
GtkWidget
*
f1
,
*
f1v
,
*
f2
,
*
f2v
;
...
...
@@ -57,6 +57,7 @@ dialog_paste_special (void)
GNOME_STOCK_BUTTON_OK
,
GNOME_STOCK_BUTTON_CANCEL
,
NULL
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dialog
),
GTK_WINDOW
(
wb
->
toplevel
));
f1
=
gtk_frame_new
(
_
(
"Paste type"
));
f1v
=
gtk_vbox_new
(
TRUE
,
0
);
gtk_container_add
(
GTK_CONTAINER
(
f1
),
f1v
);
...
...
src/dialog-zoom.c
View file @
9d99ee8e
...
...
@@ -13,7 +13,7 @@
#include "dialogs.h"
void
dialog_zoom
(
Sheet
*
sheet
)
dialog_zoom
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
char
*
custom
;
int
state
[
7
];
...
...
src/dialogs.h
View file @
9d99ee8e
...
...
@@ -2,13 +2,13 @@
#define GNUMERIC_DIALOGS_H
void
dialog_goto_cell
(
Workbook
*
wb
);
void
dialog_cell_format
(
Sheet
*
sheet
);
int
dialog_paste_special
(
void
);
void
dialog_insert_cells
(
Sheet
*
sheet
);
void
dialog_delete_cells
(
Sheet
*
sheet
);
void
dialog_zoom
(
Sheet
*
sheet
);
char
*
dialog_query_load_file
(
void
);
void
dialog_about
(
void
);
void
dialog_cell_format
(
Workbook
*
wb
,
Sheet
*
sheet
);
int
dialog_paste_special
(
Workbook
*
wb
);
void
dialog_insert_cells
(
Workbook
*
wb
,
Sheet
*
sheet
);
void
dialog_delete_cells
(
Workbook
*
wb
,
Sheet
*
sheet
);
void
dialog_zoom
(
Workbook
*
wb
,
Sheet
*
sheet
);
char
*
dialog_query_load_file
(
Workbook
*
wb
);
void
dialog_about
(
Workbook
*
wb
);
void
dialog_define_names
(
Workbook
*
wb
);
#endif
/* GNUMERIC_DIALOGS_H */
src/dialogs/dialog-about.c
View file @
9d99ee8e
...
...
@@ -16,7 +16,7 @@
* nice
*/
void
dialog_about
(
void
)
dialog_about
(
Workbook
*
wb
)
{
GtkWidget
*
about
;
const
gchar
*
authors
[]
=
{
...
...
@@ -37,6 +37,7 @@ dialog_about (void)
"http://www.gnome.org/gnumeric"
),
NULL
);
gtk_window_set_modal
(
GTK_WINDOW
(
about
),
TRUE
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
about
),
GTK_WINDOW
(
wb
->
toplevel
));
gnome_dialog_set_close
(
GNOME_DIALOG
(
about
),
TRUE
);
gtk_widget_show
(
about
);
}
...
...
src/dialogs/dialog-cell-format.c
View file @
9d99ee8e
...
...
@@ -786,7 +786,7 @@ cell_properties_close (void)
* Main entry point for the Cell Format dialog box
*/
void
dialog_cell_format
(
Sheet
*
sheet
)
dialog_cell_format
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
GtkWidget
*
prop_win
;
CellList
*
cells
;
...
...
@@ -799,6 +799,8 @@ dialog_cell_format (Sheet *sheet)
cells
=
sheet_selection_to_list
(
sheet
);
prop_win
=
gnome_property_box_new
();
gnome_dialog_set_parent
(
GNOME_DIALOG
(
prop_win
),
GTK_WINDOW
(
wb
->
toplevel
));
if
(
cells
)
first_cell
=
cells
->
data
;
else
...
...
src/dialogs/dialog-define-names.c
View file @
9d99ee8e
...
...
@@ -26,7 +26,8 @@ dialog_define_names (Workbook *wb)
_
(
"Add"
),
_
(
"Remove"
),
NULL
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dialog
),
GTK_WINDOW
(
wb
->
toplevel
));
swin
=
gtk_scrolled_window_new
(
NULL
,
NULL
);
clist
=
(
GtkCList
*
)
gtk_clist_new
(
1
);
gtk_container_add
(
GTK_CONTAINER
(
swin
),
GTK_WIDGET
(
clist
));
...
...
src/dialogs/dialog-delete-cells.c
View file @
9d99ee8e
...
...
@@ -12,7 +12,7 @@
#include "dialogs.h"
void
dialog_delete_cells
(
Sheet
*
sheet
)
dialog_delete_cells
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
int
state
[
4
]
=
{
1
,
0
,
0
,
0
};
SheetSelection
*
ss
;
...
...
src/dialogs/dialog-insert-cells.c
View file @
9d99ee8e
...
...
@@ -12,7 +12,7 @@
#include "dialogs.h"
void
dialog_insert_cells
(
Sheet
*
sheet
)
dialog_insert_cells
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
int
state
[
4
]
=
{
1
,
0
,
0
,
0
};
SheetSelection
*
ss
;
...
...
src/dialogs/dialog-paste-special.c
View file @
9d99ee8e
...
...
@@ -46,7 +46,7 @@ enable_op_group (GtkWidget *widget, GtkWidget *group)
}
int
dialog_paste_special
(
void
)
dialog_paste_special
(
Workbook
*
wb
)
{
GtkWidget
*
dialog
,
*
hbox
;
GtkWidget
*
f1
,
*
f1v
,
*
f2
,
*
f2v
;
...
...
@@ -57,6 +57,7 @@ dialog_paste_special (void)
GNOME_STOCK_BUTTON_OK
,
GNOME_STOCK_BUTTON_CANCEL
,
NULL
);
gnome_dialog_set_parent
(
GNOME_DIALOG
(
dialog
),
GTK_WINDOW
(
wb
->
toplevel
));
f1
=
gtk_frame_new
(
_
(
"Paste type"
));
f1v
=
gtk_vbox_new
(
TRUE
,
0
);
gtk_container_add
(
GTK_CONTAINER
(
f1
),
f1v
);
...
...
src/dialogs/dialog-zoom.c
View file @
9d99ee8e
...
...
@@ -13,7 +13,7 @@
#include "dialogs.h"
void
dialog_zoom
(
Sheet
*
sheet
)
dialog_zoom
(
Workbook
*
wb
,
Sheet
*
sheet
)
{
char
*
custom
;
int
state
[
7
];
...
...
src/dialogs/dialogs.h
View file @
9d99ee8e
...
...
@@ -2,13 +2,13 @@
#define GNUMERIC_DIALOGS_H
void
dialog_goto_cell
(
Workbook
*
wb
);
void
dialog_cell_format
(
Sheet
*
sheet
);
int
dialog_paste_special
(
void
);
void
dialog_insert_cells
(
Sheet
*
sheet
);
void
dialog_delete_cells
(
Sheet
*
sheet
);
void
dialog_zoom
(
Sheet
*
sheet
);
char
*
dialog_query_load_file
(
void
);
void
dialog_about
(
void
);
void
dialog_cell_format
(
Workbook
*
wb
,
Sheet
*
sheet
);
int
dialog_paste_special
(
Workbook
*
wb
);
void
dialog_insert_cells
(
Workbook
*
wb
,
Sheet
*
sheet
);
void
dialog_delete_cells
(
Workbook
*
wb
,
Sheet
*
sheet
);
void
dialog_zoom
(
Workbook
*
wb
,
Sheet
*
sheet
);
char
*
dialog_query_load_file
(
Workbook
*
wb
);
void
dialog_about
(
Workbook
*
wb
);
void
dialog_define_names
(
Workbook
*
wb
);
#endif
/* GNUMERIC_DIALOGS_H */
src/file.c
View file @
9d99ee8e
...
...
@@ -34,7 +34,7 @@ workbook_save_as (Workbook *wb)
GTK_SIGNAL_FUNC
(
set_ok
),
&
accepted
);
gtk_signal_connect
(
GTK_OBJECT
(
fsel
->
cancel_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
gtk_main_quit
),
NULL
);
gtk_window_position
(
GTK_WINDOW
(
fsel
),
GTK_WIN_POS_MOUSE
);
gtk_window_
set_
position
(
GTK_WINDOW
(
fsel
),
GTK_WIN_POS_MOUSE
);
/* Run the dialog */
gtk_widget_show
(
GTK_WIDGET
(
fsel
));
...
...
@@ -67,7 +67,7 @@ workbook_save (Workbook *wb)
}
char
*
dialog_query_load_file
(
void
)
dialog_query_load_file
(
Workbook
*
wb
)
{
GtkFileSelection
*
fsel
;
gboolean
accepted
;
...
...
@@ -75,12 +75,14 @@ dialog_query_load_file (void)
fsel
=
(
GtkFileSelection
*
)
gtk_file_selection_new
(
_
(
"Load file"
));
gtk_window_set_transient_for
(
GTK_WINDOW
(
fsel
),
GTK_WINDOW
(
wb
->
toplevel
));
/* Connect the signals for Ok and Cancel */
gtk_signal_connect
(
GTK_OBJECT
(
fsel
->
ok_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
set_ok
),
&
accepted
);
gtk_signal_connect
(
GTK_OBJECT
(
fsel
->
cancel_button
),
"clicked"
,
GTK_SIGNAL_FUNC
(
gtk_main_quit
),
NULL
);
gtk_window_position
(
GTK_WINDOW
(
fsel
),
GTK_WIN_POS_MOUSE
);
gtk_window_
set_
position
(
GTK_WINDOW
(
fsel
),
GTK_WIN_POS_MOUSE
);
/* Run the dialog */
gtk_widget_show
(
GTK_WIDGET
(
fsel
));
...
...
src/item-grid.c
View file @
9d99ee8e
...
...
@@ -467,7 +467,7 @@ context_paste_special_cmd (GtkWidget *widget, ItemGrid *item_grid)
Sheet
*
sheet
=
item_grid
->
sheet
;
int
flags
;
flags
=
dialog_paste_special
();
flags
=
dialog_paste_special
(
sheet
->
workbook
);
sheet_selection_paste
(
sheet
,
sheet
->
cursor_col
,
sheet
->
cursor_row
,
...
...
@@ -479,14 +479,14 @@ context_paste_special_cmd (GtkWidget *widget, ItemGrid *item_grid)
static
void
context_insert_cmd
(
GtkWidget
*
widget
,
ItemGrid
*
item_grid
)
{
dialog_insert_cells
(
item_grid
->
sheet
);
dialog_insert_cells
(
item_grid
->
sheet
->
workbook
,
item_grid
->
sheet
);
context_destroy_menu
(
widget
);
}
static
void
context_delete_cmd
(
GtkWidget
*
widget
,
ItemGrid
*
item_grid
)
{
dialog_delete_cells
(
item_grid
->
sheet
);
dialog_delete_cells
(
item_grid
->
sheet
->
workbook
,
item_grid
->
sheet
);
context_destroy_menu
(
widget
);
}
...
...
@@ -500,7 +500,7 @@ context_clear_cmd (GtkWidget *widget, ItemGrid *item_grid)
static
void
context_cell_format_cmd
(
GtkWidget
*
widget
,
ItemGrid
*
item_grid
)
{
dialog_cell_format
(
item_grid
->
sheet
);
dialog_cell_format
(
item_grid
->
sheet
->
workbook
,
item_grid
->
sheet
);
context_destroy_menu
(
widget
);
}
...
...
src/plugin-manager.c
View file @
9d99ee8e
...
...
@@ -13,6 +13,7 @@
typedef
struct
{
Workbook
*
workbook
;
GtkWidget
*
dialog
;
GtkWidget
*
hbox
;
GtkWidget
*
vbbox
;
...
...
@@ -26,7 +27,7 @@ typedef struct
static
void
add_to_clist
(
PluginData
*
pd
,
GtkWidget
*
clist
)
{
const
gchar
*
data
[
2
];
gchar
*
data
[
2
];
gint
row
;
data
[
0
]
=
pd
->
title
;
...
...
@@ -55,7 +56,7 @@ close_cb (GtkWidget *button, PluginManager *pm)
static
void
add_cb
(
GtkWidget
*
button
,
PluginManager
*
pm
)
{
char
*
modfile
=
dialog_query_load_file
();
char
*
modfile
=
dialog_query_load_file
(
pm
->
workbook
);
PluginData
*
pd
;
if
(
!
modfile
)
...
...
@@ -87,16 +88,17 @@ row_cb (GtkWidget * clist, gint row, gint col,
}
GtkWidget
*
plugin_manager_new
(
void
)
plugin_manager_new
(
Workbook
*
wb
)
{
PluginManager
*
pm
;
const
gchar
*
n_titles
[
2
]
=
{
N_
(
"Name"
),
N_
(
"File"
)
};
const
gchar
*
titles
[
2
]
=
{
N_
(
"Name"
),
N_
(
"File"
)
};
gchar
*
n_titles
[
2
]
=
{
N_
(
"Name"
),
N_
(
"File"
)
};
gchar
*
titles
[
2
]
=
{
N_
(
"Name"
),
N_
(
"File"
)
};
pm
=
g_new0
(
PluginManager
,
1
);
if
(
!
pm
)
return
NULL
;
pm
->
workbook
=
wb
;
pm
->
dialog
=
gtk_window_new
(
GTK_WINDOW_DIALOG
);
pm
->
hbox
=
gtk_hbox_new
(
0
,
0
);
...
...
src/plugin.h
View file @
9d99ee8e
...
...
@@ -22,6 +22,6 @@ extern GList *plugin_list;
void
plugins_init
(
void
);
PluginData
*
plugin_load
(
gchar
*
filename
);
void
plugin_unload
(
PluginData
*
pd
);
GtkWidget
*
plugin_manager_new
(
void
);
GtkWidget
*
plugin_manager_new
(
Workbook
*
wb
);
#endif
/* GNUMERIC_PLUGIN_H */
src/workbook.c
View file @
9d99ee8e
...
...
@@ -61,13 +61,13 @@ new_cmd (void)
}
static
void
open_cmd
(
void
)
open_cmd
(
GtkWidget
*
widget
,
Workbook
*
wb
)
{
char
*
fname
=
dialog_query_load_file
();
Workbook
*
wb
;
char
*
fname
=
dialog_query_load_file
(
wb
);
Workbook
*
new_
wb
;
if
((
wb
=
workbook_read
(
fname
)))
gtk_widget_show
(
wb
->
toplevel
);
if
((
new_
wb
=
workbook_read
(
fname
)))
gtk_widget_show
(
new_
wb
->
toplevel
);
}
static
void
...
...
@@ -85,7 +85,7 @@ save_as_cmd (GtkWidget *widget, Workbook *wb)
static
void
plugins_cmd
(
GtkWidget
*
widget
,
Workbook
*
wb
)
{
GtkWidget
*
pm
=
plugin_manager_new
(
);
GtkWidget
*
pm
=
plugin_manager_new
(
wb
);
gtk_widget_show
(
pm
);
}
...
...
@@ -443,7 +443,7 @@ paste_special_cmd (GtkWidget *widget, Workbook *wb)
int
flags
;
sheet
=
workbook_get_current_sheet
(
wb
);
flags
=
dialog_paste_special
();
flags
=
dialog_paste_special
(
wb
);
sheet_selection_paste
(
sheet
,
sheet
->
cursor_col
,
sheet
->
cursor_row
,
flags
,
GDK_CURRENT_TIME
);
...
...
@@ -489,7 +489,7 @@ insert_cells_cmd (GtkWidget *widget, Workbook *wb)
Sheet
*
sheet
;
sheet
=
workbook_get_current_sheet
(
wb
);
dialog_insert_cells
(
sheet
);
dialog_insert_cells
(
wb
,
sheet
);
}
static
void
...
...
@@ -566,7 +566,7 @@ zoom_cmd (GtkWidget *widget, Workbook *wb)
Sheet
*
sheet
;
sheet
=
workbook_get_current_sheet
(
wb
);
dialog_zoom
(
sheet
);
dialog_zoom
(
wb
,
sheet
);
}
static
void
...
...
@@ -575,7 +575,7 @@ format_cells_cmd (GtkWidget *widget, Workbook *wb)
Sheet
*
sheet
;
sheet
=
workbook_get_current_sheet
(
wb
);
dialog_cell_format
(
sheet
);
dialog_cell_format
(
wb
,
sheet
);
}
static
void
...
...
@@ -646,7 +646,7 @@ workbook_edit_comment (GtkWidget *widget, Workbook *wb)
static
void
about_cmd
(
GtkWidget
*
widget
,
Workbook
*
wb
)
{
dialog_about
();
dialog_about
(
wb
);
}
/* File menu */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment