Commit 4e296f3e authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Make sure new windows appear on the right screen. Make sure new windows

2004-04-07  Morten Welinder  <terra@gnome.org>

	* src/gui-file.c (gui_file_read): Make sure new windows appear
	on the right screen.
	* src/wbcg-actions.c (cb_file_new): Make sure new windows appear
	on the right screen.

2004-04-07  Morten Welinder  <terra@gnome.org>

	* dialog-view.c (dialog_new_view): Make sure "This screen" really
	does mean "This	screen" and not "Default screen".
parent 5cd4ec7d
2004-04-07 Morten Welinder <terra@gnome.org>
* src/gui-file.c (gui_file_read): Make sure new windows appear
on the right screen.
* src/wbcg-actions.c (cb_file_new): Make sure new windows appear
on the right screen.
2004-04-07 Morten Welinder <terra@gnome.org>
* src/wbcg-actions.c (cb_file_new): Copy toolbar visibility to new
......
......@@ -9,6 +9,7 @@ Morten:
* Fix [h]:mm precision (#138182). [backported]
* Make it possible to hide toolbars.
* Make it possible to hide the statusbar.
* A few multihead fixes.
--------------------------------------------------------------------------
......
2004-04-07 Morten Welinder <terra@gnome.org>
* src/gui-file.c (gui_file_read): Make sure new windows appear
on the right screen.
* src/wbcg-actions.c (cb_file_new): Make sure new windows appear
on the right screen.
2004-04-07 Morten Welinder <terra@gnome.org>
* src/wbcg-actions.c (cb_file_new): Copy toolbar visibility to new
......
2004-04-07 Morten Welinder <terra@gnome.org>
* dialog-view.c (cb_view_ok_clicked): Copy toolbar visibility.
(dialog_new_view): Make sure "This screen" really does mean "This
screen" and not "Default screen".
2004-04-01 Christian Neumair <chris@gnome-de.org>
......
......@@ -54,7 +54,7 @@ cb_view_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
WorkbookControl *wbc = WORKBOOK_CONTROL (wbcg);
WorkbookControl *new_wbc;
gboolean shared;
GdkScreen *screen = NULL;
GdkScreen *screen;
GSList *buttons = gtk_radio_button_get_group (state->location_elsewhere);
shared = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (state->gui, "view_shared")));
......@@ -88,7 +88,6 @@ cb_view_ok_clicked (G_GNUC_UNUSED GtkWidget *button,
screen = gdk_display_get_default_screen (display);
} else {
screen = g_object_get_data (buttons->data, "screen");
/* screen will be NULL for current screen. */
}
gtk_widget_destroy (state->dialog);
......@@ -163,10 +162,9 @@ dialog_new_view (WorkbookControlGUI *wbcg)
if (screen == this_screen)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
else
g_object_set_data (G_OBJECT (button),
"screen",
screen);
g_object_set_data (G_OBJECT (button),
"screen", screen);
gtk_box_pack_start (box, button, TRUE, TRUE, 0);
}
......
......@@ -117,8 +117,10 @@ gui_file_read (WorkbookControlGUI *wbcg, char const *file_name,
wb_control_set_view (WORKBOOK_CONTROL (wbcg), wbv, NULL);
wb_control_init_state (WORKBOOK_CONTROL (wbcg));
} else {
GdkScreen *screen = gtk_window_get_screen (wbcg_toplevel (wbcg));
WorkbookControl *new_wbc =
wb_control_wrapper_new (WORKBOOK_CONTROL (wbcg), wbv, NULL, NULL);
wb_control_wrapper_new (WORKBOOK_CONTROL (wbcg),
wbv, NULL, screen);
WorkbookControlGUI *new_wbcg = WORKBOOK_CONTROL_GUI (new_wbc);
wbcg_copy_toolbar_visibility (new_wbcg, wbcg);
}
......
......@@ -75,10 +75,10 @@
static GNM_ACTION_DEF (cb_file_new)
{
GdkScreen *screen = gtk_window_get_screen (wbcg_toplevel (wbcg));
Workbook *wb = workbook_new_with_sheets
(gnm_app_prefs->initial_sheet_number);
WorkbookControl *new_wbc =
workbook_control_gui_new (NULL, wb, NULL);
WorkbookControl *new_wbc = workbook_control_gui_new (NULL, wb, screen);
WorkbookControlGUI *new_wbcg = WORKBOOK_CONTROL_GUI (new_wbc);
wbcg_copy_toolbar_visibility (new_wbcg, wbcg);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment