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

Prepare for 0.4 release.



1998-10-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* Prepare for 0.4 release.

	* configure.in: Add test for new GTK+ selection code.

	* src/clipboard.c: Make it work with both APIs: the old and the
	new one.
parent 12477402
1998-10-28 Miguel de Icaza <miguel@nuclecu.unam.mx>
* Prepare for 0.4 release.
* configure.in: Add test for new GTK+ selection code.
* src/clipboard.c: Make it work with both APIs: the old and the
new one.
1998-10-28 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: now the basic I/O functions should be clean
......
1998-10-28 Miguel de Icaza <miguel@nuclecu.unam.mx>
* Prepare for 0.4 release.
* configure.in: Add test for new GTK+ selection code.
* src/clipboard.c: Make it work with both APIs: the old and the
new one.
1998-10-28 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: now the basic I/O functions should be clean
......
1998-10-28 Miguel de Icaza <miguel@nuclecu.unam.mx>
* Prepare for 0.4 release.
* configure.in: Add test for new GTK+ selection code.
* src/clipboard.c: Make it work with both APIs: the old and the
new one.
1998-10-28 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: now the basic I/O functions should be clean
......
1998-10-28 Miguel de Icaza <miguel@nuclecu.unam.mx>
* Prepare for 0.4 release.
* configure.in: Add test for new GTK+ selection code.
* src/clipboard.c: Make it work with both APIs: the old and the
new one.
1998-10-28 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: now the basic I/O functions should be clean
......
......@@ -7,3 +7,4 @@
#undef HAVE_LC_MESSAGES
#undef HAVE_STPCPY
#undef HAVE_ORBIT
#undef HAVE_GTK_SELECTION_ADD_TARGET
AC_INIT(src/gnumeric.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gnumeric,0.3)
AM_INIT_AUTOMAKE(gnumeric,0.4)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
......@@ -38,6 +38,14 @@ ALL_LINGUAS="es es_MX fr ko pt it hu cz"
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
dnl
dnl Compatibility with old Gtk+ (will be removed when new Gtk+ and gnome-libs go out).
dnl
OLD_LIBS="$LIBS"
LIBS="$LIBS $GTK_LIBS"
AC_CHECK_FUNC(gtk_selection_add_target, AC_DEFINE(HAVE_GTK_SELECTION_ADD_TARGET))
LIBS="$OLD_LIBS"
dnl
dnl Check for Perl
dnl
......
......@@ -6,7 +6,7 @@ PYTHON =
endif
if WITH_PERL
PERL = perl
PERL =
else
PERL =
endif
......
......@@ -4,6 +4,9 @@
* Author:
* Miguel de Icaza (miguel@gnu.org)
*
* FIXME:
* When the new GTK+ and gnome-libs is released remove all of the
* compatibility code
*/
#include <config.h>
#include <gnome.h>
......@@ -233,14 +236,18 @@ x_selection_to_cell_region (char *data, int len)
return cr;
}
/*
* x_selection_received
/**
* x_selection_received:
*
* Invoked when the selection has been received by our application.
* This is triggered by a call we do to gtk_selection_convert.
*/
static void
#ifdef HAVE_GTK_SELECTION_ADD_TARGET
x_selection_received (GtkWidget *widget, GtkSelectionData *sel, guint time, gpointer data)
#else
x_selection_received (GtkWidget *widget, GtkSelectionData *sel, gpointer data)
#endif
{
SheetSelection *ss;
Workbook *wb = data;
......@@ -298,13 +305,17 @@ x_selection_received (GtkWidget *widget, GtkSelectionData *sel, guint time, gpoi
wb->clipboard_paste_callback_data = NULL;
}
/*
/**
* x_selection_handler:
*
* Callback invoked when another application requests we render the selection.
*/
static void
#ifdef HAVE_GTK_SELECTION_ADD_TARGET
x_selection_handler (GtkWidget *widget, GtkSelectionData *selection_data, guint info, guint time, gpointer data)
#else
x_selection_handler (GtkWidget *widget, GtkSelectionData *selection_data, gpointer data)
#endif
{
Workbook *wb = (Workbook *) data;
char *rendered_selection;
......@@ -353,9 +364,16 @@ x_clipboard_bind_workbook (Workbook *wb)
GTK_OBJECT (wb->toplevel), "selection_get",
GTK_SIGNAL_FUNC(x_selection_handler), wb);
#ifdef HAVE_GTK_SELECTION_ADD_TARGET
gtk_selection_add_target (
wb->toplevel,
GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING, 0);
#else
gtk_selection_add_handler (
wb->toplevel,
GDK_SELECTION_PRIMARY, GDK_SELECTION_TYPE_STRING,
x_selection_handler, wb);
#endif
}
/*
......@@ -477,8 +495,13 @@ clipboard_paste_region (CellRegion *region, Sheet *dest_sheet,
GtkSelectionData sel;
sel.length = -1;
#ifdef HAVE_GTK_SELECTION_ADD_TARGET
x_selection_received (dest_sheet->workbook->toplevel, &sel,
0, dest_sheet->workbook);
#else
x_selection_received (dest_sheet->workbook->toplevel, &sel,
dest_sheet->workbook);
#endif
return;
}
......
......@@ -617,8 +617,10 @@ static GnomeUIInfo workbook_menu_edit [] = {
GNOMEUIINFO_SEPARATOR,
#if 0
{ GNOME_APP_UI_ITEM, N_("_Define cell names"), NULL, define_cell_cmd },
GNOMEUIINFO_SEPARATOR,
#endif
{ GNOME_APP_UI_ITEM, N_("_Recalculate"), NULL, recalc_cmd, NULL, NULL,
0, 0, GDK_F9, 0 },
......
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