[gnumeric] GUI: Fix multihead issue with graph windows.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Fix multihead issue with graph windows.
- Date: Thu, 25 Dec 2014 23:09:41 +0000 (UTC)
commit 0d41ce35a5557def8240a22c22ab53afae725527
Author: Morten Welinder <terra gnome org>
Date: Thu Dec 25 18:09:19 2014 -0500
GUI: Fix multihead issue with graph windows.
ChangeLog | 3 +++
NEWS | 1 +
src/gnm-graph-window.c | 2 +-
src/sheet-object-graph.c | 3 +++
4 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a2d539c..9a8d6e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2014-12-25 Morten Welinder <terra gnome org>
+ * src/sheet-object-graph.c (sog_cb_open_in_new_window): Fix
+ multihead issue.
+
* src/gnm-graph-window.c: Avoid GTK_STOCK_xxx completely.
* src/wbc-gtk-actions.c (SheetDirection): use proper icon.
diff --git a/NEWS b/NEWS
index e01df92..3d0570b 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,7 @@ Morten:
* Fix undo crash with conditional formatting and insert row. [#741197]
* Fix xlsx export of HYPGEOMDIST.
* Fix xlsx export of document properties.
+ * Fix multihead issue with graph windows.
Thomas Kluyver:
* Fix import of extended floats from wk4 files. [#739697]
diff --git a/src/gnm-graph-window.c b/src/gnm-graph-window.c
index 2764c53..c90f49e 100644
--- a/src/gnm-graph-window.c
+++ b/src/gnm-graph-window.c
@@ -70,7 +70,7 @@ update_graph_sizing_mode (GnmGraphWindow *window)
GOGraphWidgetSizeMode size_mode;
ChartSize size;
- g_assert (GO_IS_GRAPH_WIDGET (window->graph));
+ g_return_if_fail (GO_IS_GRAPH_WIDGET (window->graph));
obey_ratio = FALSE;
diff --git a/src/sheet-object-graph.c b/src/sheet-object-graph.c
index 576214f..31eff74 100644
--- a/src/sheet-object-graph.c
+++ b/src/sheet-object-graph.c
@@ -351,6 +351,7 @@ sog_cb_open_in_new_window (SheetObject *so, SheetControl *sc)
{
SheetObjectGraph *sog = SHEET_OBJECT_GRAPH (so);
SheetControlGUI *scg = SHEET_CONTROL_GUI (sc);
+ WBCGtk *wbcg = scg_wbcg (scg);
GtkWidget *window;
double coords[4];
@@ -360,6 +361,8 @@ sog_cb_open_in_new_window (SheetObject *so, SheetControl *sc)
window = gnm_graph_window_new (sog->graph,
floor (fabs (coords[2] - coords[0]) + 0.5),
floor (fabs (coords[3] - coords[1]) + 0.5));
+ gtk_window_set_screen (GTK_WINDOW (window),
+ gtk_window_get_screen (wbcg_toplevel (wbcg)));
gtk_window_present (GTK_WINDOW (window));
g_signal_connect (window, "delete-event",
G_CALLBACK (gtk_widget_destroy),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]