[gnumeric] Fix hyperlink placement when inserting or adding hyperlink. [#662310]
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Fix hyperlink placement when inserting or adding hyperlink. [#662310]
- Date: Thu, 20 Oct 2011 18:25:16 +0000 (UTC)
commit 7e99bf0046597bf31dfc62336bcbb0e62bb8164e
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Thu Oct 20 12:24:47 2011 -0600
Fix hyperlink placement when inserting or adding hyperlink. [#662310]
2011-10-20 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-hyperlink.c (dhl_cb_ok): refocus original sheet, fixes #662310
(dialog_hyperlink): save focussed sheet
NEWS | 1 +
src/dialogs/ChangeLog | 5 +++++
src/dialogs/dialog-hyperlink.c | 8 +++++---
3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/NEWS b/NEWS
index 927f642..75091a3 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,7 @@ Andreas:
* Fix cell extent caclulation for xlsx export. [#661958]
* Speed up printing of few pages of large sheets. [#662056]
* Provide an information dialog for print preview. [#662056]
+ * Fix hyperlink placement when inserting or adding hyperlink. [#662310]
Jean:
* Make things build against gtk+-3.0.
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index f036bd1..80ec5b3 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-20 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * dialog-hyperlink.c (dhl_cb_ok): refocus original sheet, fixes #662310
+ (dialog_hyperlink): save focussed sheet
+
2011-10-19 Morten Welinder <terra gnome org>
* Makefile.am: Don't create uidir when we have nothing to put
diff --git a/src/dialogs/dialog-hyperlink.c b/src/dialogs/dialog-hyperlink.c
index 4d630ff..c629db9 100644
--- a/src/dialogs/dialog-hyperlink.c
+++ b/src/dialogs/dialog-hyperlink.c
@@ -51,6 +51,7 @@ typedef struct {
WBCGtk *wbcg;
Workbook *wb;
SheetControl *sc;
+ Sheet *sheet;
GtkBuilder *gui;
GtkWidget *dialog;
@@ -381,6 +382,8 @@ dhl_cb_ok (G_GNUC_UNUSED GtkWidget *button, HyperlinkState *state)
if (!success)
return; /* Let user continue editing */
+ wb_control_sheet_focus (WORKBOOK_CONTROL (state->wbcg), state->sheet);
+
if (target) {
gnm_hlink_set_target (state->link, target);
tip = dhl_get_tip (state, target);
@@ -570,7 +573,6 @@ dialog_hyperlink (WBCGtk *wbcg, SheetControl *sc)
GtkBuilder *gui;
HyperlinkState* state;
GnmHLink *link = NULL;
- Sheet *sheet;
GSList *ptr;
g_return_if_fail (wbcg != NULL);
@@ -589,9 +591,9 @@ dialog_hyperlink (WBCGtk *wbcg, SheetControl *sc)
state->gui = gui;
state->dialog = go_gtk_builder_get_widget (state->gui, "hyperlink-dialog");
- sheet = sc_sheet (sc);
+ state->sheet = sc_sheet (sc);
for (ptr = sc_view (sc)->selections; ptr != NULL; ptr = ptr->next)
- if (NULL != (link = sheet_style_region_contains_link (sheet, ptr->data)))
+ if (NULL != (link = sheet_style_region_contains_link (state->sheet, ptr->data)))
break;
/* We are creating a new link since the existing link */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]