Commit aed4a766 authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

Fix editing of hyperlinks.

2010-07-25  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* dialog-hyperlink.c (dialog_hyperlink): duplicate the hyperlink, it
	  may be used in many cells and we want to change it only here.
parent 6c91b262
......@@ -46,6 +46,7 @@ Andreas:
argument tooltips.
* Fix undo of Clear->All and Clear->Comments. [#625151][#623803]
* Add menu items to allow clearing of filtered rows only.
* Fix editing of hyperlinks.
Jean:
* Fix strong/weak cursor display. [#623241]
......
2010-07-25 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* dialog-hyperlink.c (dialog_hyperlink): duplicate the hyperlink, it
may be used in many cells and we want to change it only here.
2010-07-22 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* dialog-function-select.c (pref_tool_page_initializer): add checkboxes
......
......@@ -590,15 +590,19 @@ dialog_hyperlink (WBCGtk *wbcg, SheetControl *sc)
if (NULL != (link = sheet_style_region_contains_link (sheet, ptr->data)))
break;
if (link == NULL) {
link = g_object_new (gnm_hlink_url_get_type (), NULL);
/* We are creating a new link since the existing link */
/* may be used in many places. */
/* 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)
state->is_new = TRUE;
} else {
g_object_ref (link);
else {
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));
}
state->link = link;
if (dhl_init (state)) {
go_gtk_notice_dialog (wbcg_toplevel (wbcg), GTK_MESSAGE_ERROR,
_("Could not create the hyperlink dialog."));
......
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