Commit 5fa8e0c8 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa
Browse files

Correct fix to the paste problem: dont pass current_workbook, but rather

1998-09-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/clipboard.c (clipboard_export_cell_region): Correct fix to
	the paste problem: dont pass current_workbook, but rather the wb
	we get.
parent 6c1143a7
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/clipboard.c (clipboard_export_cell_region): Correct fix to
the paste problem: dont pass current_workbook, but rather the wb
we get.
* src/format.c (split_time): Compute the day of week. This was
done before by localtime, but the new code was not doing it (thus,
format "ddd" always reported "Sun").
* src/clipboard.c (x_selection_handler): Use the last workbook
that claimed the selection instead of using the value provided by
the callback, as gtk_selection_set_owner just ignores who is the
owner.
* src/item-edit.c (item_edit_reconfigure): Call reconfigure in parent.
* src/item-cursor.c (item_cursor_reconfigure): Call reconfigure in parent.
......
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/clipboard.c (clipboard_export_cell_region): Correct fix to
the paste problem: dont pass current_workbook, but rather the wb
we get.
* src/format.c (split_time): Compute the day of week. This was
done before by localtime, but the new code was not doing it (thus,
format "ddd" always reported "Sun").
* src/clipboard.c (x_selection_handler): Use the last workbook
that claimed the selection instead of using the value provided by
the callback, as gtk_selection_set_owner just ignores who is the
owner.
* src/item-edit.c (item_edit_reconfigure): Call reconfigure in parent.
* src/item-cursor.c (item_cursor_reconfigure): Call reconfigure in parent.
......
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/clipboard.c (clipboard_export_cell_region): Correct fix to
the paste problem: dont pass current_workbook, but rather the wb
we get.
* src/format.c (split_time): Compute the day of week. This was
done before by localtime, but the new code was not doing it (thus,
format "ddd" always reported "Sun").
* src/clipboard.c (x_selection_handler): Use the last workbook
that claimed the selection instead of using the value provided by
the callback, as gtk_selection_set_owner just ignores who is the
owner.
* src/item-edit.c (item_edit_reconfigure): Call reconfigure in parent.
* src/item-cursor.c (item_cursor_reconfigure): Call reconfigure in parent.
......
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/clipboard.c (clipboard_export_cell_region): Correct fix to
the paste problem: dont pass current_workbook, but rather the wb
we get.
* src/format.c (split_time): Compute the day of week. This was
done before by localtime, but the new code was not doing it (thus,
format "ddd" always reported "Sun").
* src/clipboard.c (x_selection_handler): Use the last workbook
that claimed the selection instead of using the value provided by
the callback, as gtk_selection_set_owner just ignores who is the
owner.
* src/item-edit.c (item_edit_reconfigure): Call reconfigure in parent.
* src/item-cursor.c (item_cursor_reconfigure): Call reconfigure in parent.
......
......@@ -27,8 +27,6 @@ typedef struct {
int paste_flags;
} clipboard_paste_closure_t;
static Workbook *workbook_with_selection = NULL;
/*
* Pastes a cell in the spreadsheet
*/
......@@ -307,7 +305,7 @@ x_selection_received (GtkWidget *widget, GtkSelectionData *sel, gpointer data)
static void
x_selection_handler (GtkWidget *widget, GtkSelectionData *selection_data, gpointer data)
{
Workbook *wb = workbook_with_selection;
Workbook *wb = (Workbook *) data;
char *rendered_selection;
g_assert (wb->clipboard_contents);
......@@ -352,7 +350,7 @@ x_clipboard_bind_workbook (Workbook *wb)
gtk_selection_add_handler (
wb->toplevel,
GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING,
x_selection_handler, NULL);
x_selection_handler, wb);
}
/*
......@@ -363,10 +361,8 @@ x_clipboard_bind_workbook (Workbook *wb)
static void
clipboard_export_cell_region (Workbook *wb)
{
workbook_with_selection = wb;
wb->have_x_selection = gtk_selection_owner_set (
current_workbook->toplevel,
wb->toplevel,
GDK_SELECTION_PRIMARY,
GDK_CURRENT_TIME);
......
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