[gnumeric] Fix editing of hyperlinks. [#700732]



commit 7460f9817e9950969ece51d30631f53c8682e948
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed May 22 20:02:27 2013 -0600

    Fix editing of hyperlinks. [#700732]
    
    2013-05-22  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * dialog-hyperlink.c (dialog_hyperlink): preserve the type of
        the link

 NEWS                           |    1 +
 src/dialogs/ChangeLog          |    5 +++++
 src/dialogs/dialog-hyperlink.c |    6 ++++--
 3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index e3d357e..1c8c4ac 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Andreas:
        * Fix border handling for merged cells in LaTeX export.
        * Fix 'Go to First'. [#699631]
        * Fix data merges. [#699897]
+       * Fix editing of hyperlinks. [#700732]
 
 Darrell Tangman:
        * Update documentation for Edit and Insert menus. [#700596]
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index fe04480..06d1139 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-22  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * dialog-hyperlink.c (dialog_hyperlink): preserve the type of
+       the link
+
 2013-05-13  Jean Brefort  <jean brefort normalesup org>
 
        * doc-meta-data.ui: adjust labels vertical alignment. [#700156]
diff --git a/src/dialogs/dialog-hyperlink.c b/src/dialogs/dialog-hyperlink.c
index 928f3c9..a88c37e 100644
--- a/src/dialogs/dialog-hyperlink.c
+++ b/src/dialogs/dialog-hyperlink.c
@@ -603,9 +603,11 @@ dialog_hyperlink (WBCGtk *wbcg, SheetControl *sc)
        /* We are duplicating it here rather than in an ok handler in case */
        /* The link is changed for a differnt cell in a different view. */
        state->link = g_object_new (gnm_hlink_url_get_type (), NULL);
-       if (link == NULL)
+       if (link == NULL) {
+               state->link = g_object_new (gnm_hlink_url_get_type (), NULL);
                state->is_new = TRUE;
-       else {
+       } else {
+               state->link = g_object_new (G_OBJECT_TYPE (link), NULL);
                state->is_new = FALSE;
                gnm_hlink_set_target (state->link, gnm_hlink_get_target (link));
                gnm_hlink_set_tip (state->link, gnm_hlink_get_tip (link));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]