Commit 3aa7fa31 authored by Morten Welinder's avatar Morten Welinder

compilation: gtk compatiblity work.

parent 05c8ac73
2010-06-09 Morten Welinder <terra@gnome.org>
* src/dead-kittens.h: New file for kittens killed by gtk.
2010-06-09 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* component/Gnumeric-embed.xml.in: add Function Help
......
......@@ -689,7 +689,7 @@ LIBS="$GNUMERIC_LIBS $LIBS"
AC_CHECK_FUNCS(g_date_set_time_t g_slice_alloc g_option_context_set_delocalize)
AC_CHECK_FUNCS(pango_font_map_create_context)
AC_CHECK_FUNCS(gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area gtk_entry_get_buffer gtk_widget_get_can_focus gtk_entry_get_text_length gtk_entry_set_icon_from_stock)
AC_CHECK_FUNCS(gtk_orientable_set_orientation gtk_adjustment_configure gtk_widget_set_visible gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gsf_open_pkg_foreach_rel gtk_dialog_get_content_area gtk_entry_get_buffer gtk_widget_get_can_focus gtk_entry_get_text_length gtk_entry_set_icon_from_stock)
AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules)
AC_MSG_CHECKING([for PANGO_WEIGHT_THIN etc.])
......
......@@ -10,6 +10,8 @@ bin_PROGRAMS =
check_PROGRAMS =
noinst_PROGRAMS = sstest
noinst_HEADERS = dead-kittens.h
if WITH_GTK
SUBDIRS += pixmaps dialogs widgets
bin_PROGRAMS += gnumeric
......
#ifndef GNUMERIC_GTK_DEAD_KITTENS_H
#define GNUMERIC_GTK_DEAD_KITTENS_H
/* To be included only from C files, not headers. */
#ifndef HAVE_GTK_ENTRY_GET_TEXT_LENGTH
#define gtk_entry_get_text_length(x) g_utf8_strlen (gtk_entry_get_text (x), -1)
#endif
#ifndef HAVE_GTK_WIDGET_SET_VISIBLE
#define gtk_widget_set_visible(_w_,_v_) do { if (_v_) gtk_widget_show (_w_); else gtk_widget_hide (_w_); } while (0)
#endif
#ifndef HAVE_GTK_WIDGET_IS_TOPLEVEL
#define gtk_widget_is_toplevel(w_) (GTK_WIDGET_FLAGS ((w_)) & GTK_TOPLEVEL)
#endif
#ifndef HAVE_GTK_WIDGET_GET_STATE
#define gtk_widget_get_state(_w) GTK_WIDGET_STATE((_w))
#endif
#ifndef HAVE_GTK_WIDGET_GET_WINDOW
#define gtk_widget_get_window(w) ((w)->window)
#endif
#endif
......@@ -41,6 +41,7 @@
#include <gui-util.h>
#include <parse-util.h>
#include <commands.h>
#include <dead-kittens.h>
#include <widgets/gnumeric-expr-entry.h>
#include <widgets/gnumeric-cell-renderer-expr-entry.h>
#include <widgets/gnumeric-cell-renderer-toggle.h>
......@@ -52,12 +53,6 @@
#define DEFINE_NAMES_KEY "define-names-dialog"
#define PASTE_NAMES_KEY "paste-names-dialog"
#ifndef HAVE_GTK_ENTRY_GET_TEXT_LENGTH
#define gtk_entry_get_text_length(x) g_utf8_strlen (gtk_entry_get_text (x), -1)
#endif
typedef struct {
GladeXML *gui;
GtkWidget *dialog;
......
......@@ -38,6 +38,7 @@
#include <expr.h>
#include <value.h>
#include <sheet.h>
#include <dead-kittens.h>
#include <gnumeric-gconf.h>
#include <gsf/gsf-impl-utils.h>
......
......@@ -1011,13 +1011,11 @@ cb_pane_drag_data_received (GtkWidget *widget, GdkDragContext *context,
{
double wx, wy;
#ifdef DEBUG_DND
{
if (gnm_debug_flag ("dnd")) {
gchar *target_name = gdk_atom_name (selection_data->target);
g_printerr ("drag-data-received - %s\n", target_name);
g_free (target_name);
}
#endif
goc_canvas_w2c (GOC_CANVAS (pane), x, y, &wx, &wy);
scg_drag_data_received (pane->simple.scg,
......@@ -1031,11 +1029,12 @@ cb_pane_drag_data_get (GtkWidget *widget, GdkDragContext *context,
guint info, guint time,
SheetControlGUI *scg)
{
#ifdef DEBUG_DND
gchar *target_name = gdk_atom_name (selection_data->target);
g_printerr ("drag-data-get - %s \n", target_name);
g_free (target_name);
#endif
if (gnm_debug_flag ("dnd")) {
gchar *target_name = gdk_atom_name (selection_data->target);
g_printerr ("drag-data-get - %s \n", target_name);
g_free (target_name);
}
scg_drag_data_get (scg, selection_data);
}
......@@ -2515,8 +2514,9 @@ gnm_pane_drag_begin (GnmPane *pane, SheetObject *so, GdkEvent *event)
gtk_target_list_unref (im_targets);
}
}
#ifdef DEBUG_DND
{
if (gnm_debug_flag ("dnd")) {
GList *l;
g_printerr ("%d offered formats:\n", g_list_length (targets->list));
for (l = targets->list; l; l = l->next) {
......@@ -2526,7 +2526,6 @@ gnm_pane_drag_begin (GnmPane *pane, SheetObject *so, GdkEvent *event)
g_free (target_name);
}
}
#endif
context = gtk_drag_begin (GTK_WIDGET (canvas), targets,
GDK_ACTION_COPY | GDK_ACTION_MOVE,
......
......@@ -32,15 +32,12 @@
#include "parse-util.h"
#include "gui-util.h"
#include "sheet-autofill.h"
#include "dead-kittens.h"
#include <gsf/gsf-impl-utils.h>
#include <gtk/gtk.h>
#include <goffice/goffice.h>
#define GNUMERIC_ITEM "CURSOR"
#ifndef HAVE_GTK_WIDGET_GET_WINDOW
#define gtk_widget_get_window(w) ((w)->window)
#endif
#define ITEM_CURSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), item_cursor_get_type (), ItemCursorClass))
#define AUTO_HANDLE_WIDTH 2
......
......@@ -17,12 +17,9 @@
*/
#include <gnumeric-config.h>
#include <dead-kittens.h>
#include "gnumeric-cell-renderer-text.h"
#ifndef HAVE_GTK_WIDGET_GET_STATE
#define gtk_widget_get_state(_w) GTK_WIDGET_STATE((_w))
#endif
static void gnumeric_cell_renderer_text_class_init
(GnumericCellRendererTextClass *cell_text_class);
......
......@@ -32,6 +32,7 @@
#include <number-match.h>
#include <gnm-datetime.h>
#include <gnumeric-gconf.h>
#include <dead-kittens.h>
#include <goffice/goffice.h>
#include <gsf/gsf-impl-utils.h>
......@@ -39,10 +40,6 @@
#include <gdk/gdkkeysyms.h>
#include <string.h>
#ifndef HAVE_GTK_WIDGET_IS_TOPLEVEL
#define gtk_widget_is_toplevel(w_) (GTK_WIDGET_FLAGS ((w_)) & GTK_TOPLEVEL)
#endif
typedef struct {
GnmRangeRef ref;
int text_start;
......
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