Commit 4266edce authored by Jean Bréfort's avatar Jean Bréfort

Cleaned dead kittens from obsolete content.

parent 90927531
2011-10-25 Jean Brefort <jean.brefort@normalesup.org>
* configure.in: cleaned dead-kittens.h.
* src/dead-kittens.h: ditto.
* src/gui-util.c (gnm_canvas_get_position): ditto.
* src/style.c (gnm_pango_context_get): ditto.
2011-10-25 Jean Brefort <jean.brefort@normalesup.org>
* src/sheet-object-image.c (so_image_view_set_bounds): fixed after
......
......@@ -150,12 +150,12 @@ libspreadsheet_reqs="
libxml-2.0 >= 2.4.12
"
gnumeric_reqs="$libspreadsheet_reqs
glib-2.0 >= 2.12.0
gobject-2.0 >= 2.10.0
gmodule-2.0 >= 2.10.0
gthread-2.0 >= 2.10.0
pango >= 1.12.0
pangocairo >= 1.10.0
glib-2.0 >= 2.28.0
gobject-2.0 >= 2.28.0
gmodule-2.0 >= 2.28.0
gthread-2.0 >= 2.28.0
pango >= 1.24.0
pangocairo >= 1.24.0
"
libspreadsheet_gtk_reqs="
gtk+-3.0 >= 3.0.0
......@@ -617,63 +617,9 @@ SAVE_LIBS=$LIBS
CFLAGS="$CFLAGS $GNUMERIC_CFLAGS"
LIBS="$GNUMERIC_LIBS $LIBS"
AC_CHECK_FUNCS(g_option_context_set_delocalize g_hash_table_get_keys)
AC_CHECK_FUNCS(gdk_cairo_set_source_rgba gdk_window_get_screen)
AC_CHECK_FUNCS(gtk_adjustment_configure gtk_adjustment_get_page_increment gtk_adjustment_get_page_size gtk_adjustment_get_lower gtk_adjustment_get_upper gtk_adjustment_get_step_increment gtk_adjustment_set_lower gtk_adjustment_set_upper gtk_adjustment_set_page_increment gtk_adjustment_set_step_increment)
AC_CHECK_FUNCS(gtk_cell_renderer_get_alignment gtk_cell_renderer_get_padding)
AC_CHECK_FUNCS(gtk_cell_renderer_text_get_background_set gtk_cell_renderer_text_get_foreground_set gtk_cell_renderer_text_get_editable)
AC_CHECK_FUNCS(gtk_dialog_get_content_area gtk_dialog_get_action_area)
AC_CHECK_FUNCS(gtk_entry_get_text_length gtk_entry_set_icon_from_stock gtk_entry_get_buffer gtk_entry_get_text_area gtk_entry_set_editing_cancelled gtk_entry_get_overwrite_mode)
AC_CHECK_FUNCS(gtk_layout_get_bin_window)
AC_CHECK_FUNCS(gtk_object_destroy)
AC_CHECK_FUNCS(gtk_orientable_set_orientation)
AC_CHECK_FUNCS(gtk_selection_data_get_data gtk_selection_data_get_length gtk_selection_data_get_target)
AC_CHECK_FUNCS(gtk_table_get_size)
AC_CHECK_FUNCS(gtk_tree_view_column_get_button)
AC_CHECK_FUNCS(gtk_widget_get_visible gtk_widget_set_visible gtk_widget_get_state gtk_widget_is_toplevel gtk_widget_get_window gtk_widget_get_can_focus gtk_widget_has_focus gtk_widget_get_style gtk_widget_get_allocation gtk_widget_is_sensitive gtk_widget_set_can_focus gtk_widget_set_can_default gtk_widget_get_realized gtk_widget_render_icon_pixbuf)
AC_CHECK_FUNCS(gtk_window_get_default_widget)
AC_CHECK_FUNCS(gtk_entry_set_editing_cancelled)
AC_CHECK_FUNCS(gsf_infile_msvba_steal_modules gsf_open_pkg_foreach_rel )
AC_CHECK_FUNCS(pango_font_map_create_context)
AC_MSG_CHECKING([for working GTK_WIDGET_REALIZED.])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
[[GtkWidget *w = NULL;
(void)(GTK_WIDGET_REALIZED (w));]])],
[AC_DEFINE(HAVE_WORKING_GTK_WIDGET_REALIZED, 1, [Define if GTK_WIDGET_REALIZED exists and works])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for GtkEntry::text_area])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
[[GtkEntry *e = NULL;
(void)(e->text_area);]])],
[AC_DEFINE(HAVE_GTK_ENTRY_TEXT_AREA, 1, [Define if GtkEntry::text_area exists])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for GtkHandleBox::float_window])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
[[GtkHandleBox *hb = NULL;
(void)(hb->float_window);]])],
[AC_DEFINE(HAVE_GTK_HANDLE_BOX_FLOAT_WINDOW, 1, [Define if GtkHandleBox::float_window exists])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for GtkTable::nrows])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
[[GtkTable *t = NULL;
(void)(t->nrows == t->ncols);]])],
[AC_DEFINE(HAVE_GTK_TABLE_NROWS, 1, [Define if GtkTable::nrows exists])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for GtkTreeViewColumn::button])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gtk/gtk.h>]],
[[GtkTreeViewColumn *c = NULL;
(void)(c->button);]])],
[AC_DEFINE(HAVE_GTK_TREE_VIEW_COLUMN_BUTTON, 1, [Define if GtkTreeViewColumn::button exists])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for PANGO_WEIGHT_THIN etc.])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pango/pango.h>]],
......
......@@ -5,9 +5,6 @@
#include <gdk/gdkkeysyms.h>
/* To be included only from C files, not headers. */
#ifndef HAVE_GDK_WINDOW_GET_SCREEN
#define gdk_window_get_screen gdk_drawable_get_screen
#endif
#ifndef GDK_KEY_VoidSymbol
#define GDK_KEY_VoidSymbol GDK_VoidSymbol
......@@ -1486,24 +1483,6 @@
#define GDK_KEY_TopMenu GDK_TopMenu
#endif
#ifndef HAVE_GTK_CELL_RENDERER_GET_ALIGNMENT
#define gtk_cell_renderer_get_alignment(_cr_,_px_,_py_) do { \
gfloat *px = (_px_); \
gfloat *py = (_py_); \
if (px) *px = (_cr_)->xalign; \
if (py) *py = (_cr_)->yalign; \
} while (0)
#endif
#ifndef HAVE_GTK_CELL_RENDERER_GET_PADDING
#define gtk_cell_renderer_get_padding(_cr_,_px_,_py_) do { \
int *px = (_px_); \
int *py = (_py_); \
if (px) *px = (_cr_)->xpad; \
if (py) *py = (_cr_)->ypad; \
} while (0)
#endif
/* This function does not exist in gtk+ yet. 634344. */
#ifndef HAVE_GTK_CELL_RENDERER_TEXT_GET_BACKGROUND_SET
#define gtk_cell_renderer_text_get_background_set(_cr_) \
......@@ -1522,214 +1501,10 @@
gnm_object_get_bool ((_cr_), "editable")
#endif
#ifdef HAVE_GTK_OBJECT_DESTROY
#define gnm_destroy_class(_class_) ((GtkObjectClass *)(_class_))
#define gnm_destroy_class_chain(_class_,_obj_) gnm_destroy_class(_class_)->destroy((GtkObject*)(_obj_))
#define gnm_destroy_class_set(_class_,_func_) gnm_destroy_class(_class_)->destroy = ((void (*)(GtkObject*))(_func_))
#else
#define gnm_destroy_class(_class_) ((GtkWidgetClass *)(_class_))
#define gnm_destroy_class_chain(_class_,_obj_) gnm_destroy_class(_class_)->destroy((GtkWidget*)(_obj_))
#define gnm_destroy_class_set(_class_,_func_) gnm_destroy_class(_class_)->destroy = (_func_)
#endif
#ifndef HAVE_GTK_DIALOG_GET_ACTION_AREA
#define gtk_dialog_get_action_area(x) ((x)->action_area)
#endif
#ifndef HAVE_GTK_DIALOG_GET_CONTENT_AREA
#define gtk_dialog_get_content_area(x) ((x)->vbox)
#endif
#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_ENTRY_GET_TEXT_AREA
# ifdef HAVE_GTK_ENTRY_TEXT_AREA
# define gtk_entry_get_text_area(x) ((x)->text_area)
# else
# define gtk_entry_get_text_area(x) ((x)->_g_sealed__text_area)
# endif
#endif
#ifndef HAVE_GTK_ENTRY_GET_OVERWRITE_MODE
#define gtk_entry_get_overwrite_mode(_e_) ((_e_)->overwrite_mode)
#endif
/* This function does not exist in gtk+ yet. 634342. */
#ifndef HAVE_GTK_ENTRY_SET_EDITING_CANCELLED
#define gtk_entry_set_editing_cancelled(_e_,_b_) \
g_object_set ((_e_), "editing-canceled", (gboolean)(_b_), NULL)
#endif
#ifndef HAVE_GTK_LAYOUT_GET_BIN_WINDOW
#define gtk_layout_get_bin_window(x) ((x)->bin_window)
#endif
#ifndef HAVE_GTK_SELECTION_DATA_GET_DATA
#define gtk_selection_data_get_data(_s_) ((_s_)->data)
#endif
#ifndef HAVE_GTK_SELECTION_DATA_GET_LENGTH
#define gtk_selection_data_get_length(_s_) ((_s_)->length)
#endif
#ifndef HAVE_GTK_SELECTION_DATA_GET_TARGET
#define gtk_selection_data_get_target(_s_) ((_s_)->target)
#endif
#ifndef HAVE_GTK_WIDGET_RENDER_ICON_PIXBUF
#define gtk_widget_render_icon_pixbuf(_w_,_sid_,_size_) gtk_widget_render_icon((_w_),(_sid_),(_size_),NULL)
#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_GET_VISIBLE
#define gtk_widget_get_visible(_w_) GTK_WIDGET_VISIBLE((_w_))
#endif
#ifndef HAVE_GTK_WIDGET_IS_SENSITIVE
#define gtk_widget_is_sensitive(w) GTK_WIDGET_IS_SENSITIVE ((w))
#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
#ifndef HAVE_GTK_WIDGET_GET_ALLOCATION
#define gtk_widget_get_allocation(w,a) (*(a) = (w)->allocation)
#endif
#ifndef HAVE_GTK_WIDGET_GET_STYLE
#define gtk_widget_get_style(w) ((w)->style)
#endif
#ifndef HAVE_GTK_WIDGET_HAS_FOCUS
#define gtk_widget_has_focus(w) GTK_WIDGET_HAS_FOCUS (w)
#endif
#ifndef HAVE_GTK_WIDGET_SET_CAN_DEFAULT
#define gtk_widget_set_can_default(w,t) \
do { \
if (t) GTK_WIDGET_SET_FLAGS ((w), GTK_CAN_DEFAULT); \
else GTK_WIDGET_UNSET_FLAGS ((w), GTK_CAN_DEFAULT); \
} while (0)
#endif
#ifndef HAVE_GTK_WIDGET_GET_CAN_FOCUS
#define gtk_widget_get_can_focus(_w_) GTK_WIDGET_CAN_FOCUS((_w_))
#endif
#ifndef HAVE_GTK_WIDGET_SET_CAN_FOCUS
#define gtk_widget_set_can_focus(w,t) \
do { \
if ((t)) GTK_WIDGET_SET_FLAGS ((w), GTK_CAN_FOCUS); \
else GTK_WIDGET_UNSET_FLAGS ((w), GTK_CAN_FOCUS); \
} while (0)
#endif
#ifndef HAVE_GTK_WIDGET_GET_REALIZED
# ifdef HAVE_WORKING_GTK_WIDGET_REALIZED
# define gtk_widget_get_realized(w) GTK_WIDGET_REALIZED ((w))
# else
# define gtk_widget_get_realized(wid) (((GTK_OBJECT (wid)->_g_sealed__flags) & GTK_REALIZED) != 0)
# endif
#endif
#ifndef HAVE_GTK_ADJUSTMENT_CONFIGURE
#define gtk_adjustment_configure(_a,_v,_l,_u,_si,_pi,_ps) \
g_object_set ((_a), \
"lower", (double)(_l), \
"upper", (double)(_u), \
"step-increment", (double)(_si), \
"page-increment", (double)(_pi), \
"page-size", (double)(_ps), \
"value", (double)(_v), \
NULL)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_GET_LOWER
#define gtk_adjustment_get_lower(_a) ((_a)->lower)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_GET_UPPER
#define gtk_adjustment_get_upper(_a) ((_a)->upper)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE
#define gtk_adjustment_get_page_size(_a) ((_a)->page_size)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_GET_PAGE_INCREMENT
#define gtk_adjustment_get_page_increment(_a) ((_a)->page_increment)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_GET_STEP_INCREMENT
#define gtk_adjustment_get_step_increment(_a) ((_a)->step_increment)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_SET_LOWER
#define gtk_adjustment_set_lower(_a,_l) \
g_object_set ((_a), "lower", (double)(_l), NULL)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_SET_UPPER
#define gtk_adjustment_set_upper(_a,_u) \
g_object_set ((_a), "upper", (double)(_u), NULL)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_PAGE_INCREMENT
#define gtk_adjustment_set_page_increment(_a,_pi) \
g_object_set ((_a), "page-increment", (double)(_pi), NULL)
#endif
#ifndef HAVE_GTK_ADJUSTMENT_STEP_INCREMENT
#define gtk_adjustment_set_step_increment(_a,_si) \
g_object_set ((_a), "step-increment", (double)(_si), NULL)
#endif
#ifndef HAVE_GTK_TABLE_GET_SIZE
# ifdef HAVE_GTK_TABLE_NROWS
# define gtk_table_get_size(_t,_r,_c) do { \
int *_pr = (_r); \
int *_pc = (_c); \
GtkTable *_pt = (_t); \
if (_pr) *_pr = _pt->nrows; \
if (_pc) *_pc = _pt->ncols; \
} while (0)
# else
/* At first sealed with no accessors. */
# define gtk_table_get_size(_t,_r,_c) do { \
int *_pr = (_r); \
int *_pc = (_c); \
GtkTable *_pt = (_t); \
if (_pr) g_object_get (_pt, "n-rows", _pr, NULL); \
if (_pc) g_object_get (_pt, "n-columns", _pc, NULL); \
} while (0)
# endif
#endif
/* This function does not exist in gtk+ yet. 634100. */
#ifndef HAVE_GTK_TREE_VIEW_COLUMN_GET_BUTTON
# ifdef HAVE_GTK_TREE_VIEW_COLUMN_BUTTON
# define gtk_tree_view_column_get_button(_c) ((_c)->button)
# else
# define gtk_tree_view_column_get_button(_c) ((_c)->_g_sealed__button)
# endif
#endif
#ifndef HAVE_GTK_WINDOW_GET_DEFAULT_WIDGET
#define gtk_window_get_default_widget(_w_) ((_w_)->default_widget)
#endif
#endif
......@@ -1432,18 +1432,6 @@ gnm_canvas_get_position (GocCanvas *canvas, int *x, int *y, gint64 px, gint64 py
int wx, wy;
int ox = 0, oy = 0;
#ifndef HAVE_GTK_ENTRY_GET_BUFFER
/*
* So we haven't gotten gtk 2.18 yet where we apparently should call
* this anymore.
*/
/*
* Get offsets for the 16-bit X11 system within the 32-bit gdk system.
* I don't think this should be necessary, see bug 586756.
*/
gdk_window_get_internal_paint_info (cbw, NULL, &ox, &oy);
#endif
gdk_window_get_origin (cbw, &wx, &wy);
px = (px - canvas->scroll_x1) / canvas->pixels_per_unit;
......
......@@ -343,11 +343,7 @@ gnm_pango_context_get (void)
if (!fontmap)
fontmap = pango_cairo_font_map_new ();
pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (fontmap), 96);
#ifdef HAVE_PANGO_FONT_MAP_CREATE_CONTEXT
context = pango_font_map_create_context (PANGO_FONT_MAP (fontmap));
#else /* deprecated in 1.22.0 */
context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap));
#endif
}
pango_context_set_language (context, gtk_get_default_language ());
pango_context_set_base_dir (context, PANGO_DIRECTION_LTR);
......
2011-10-25 Jean Brefort <jean.brefort@normalesup.org>
* gnm-dao.c (gnm_dao_destroy), (gnm_dao_class_init): cleaned dead-kittens.h.
* gnumeric-expr-entry.c (gee_destroy), (gee_class_init): ditto.
* gnumeric-text-view.c (gtv_destroy), (gtv_class_init): ditto.
* widget-editable-label.c (el_destroy), (el_class_init): ditto.
* widget-font-selector.c (fs_destroy), (fs_class_init): ditto.
2011-09-12 Jean Brefort <jean.brefort@normalesup.org>
* gnm-cell-combo-view.c (gnm_cell_combo_view_popdown): fixed poupu
......
......@@ -115,13 +115,13 @@ gnm_dao_destroy (GtkWidget *widget)
gdao->gui = NULL;
}
gnm_destroy_class_chain (gnm_dao_parent_class, widget);
((GtkWidgetClass *)(gnm_dao_parent_class))->destroy (widget);
}
static void
gnm_dao_class_init (GObjectClass *klass)
{
gnm_destroy_class_set (klass, gnm_dao_destroy);
((GtkWidgetClass *)(klass))->destroy = gnm_dao_destroy;
gnm_dao_parent_class = g_type_class_peek (gtk_box_get_type ());
......
......@@ -238,7 +238,7 @@ gee_destroy (GtkWidget *widget)
GnmExprEntry *gee = GNM_EXPR_ENTRY (widget);
gee_remove_update_timer (gee);
gee_detach_scg (gee);
gnm_destroy_class_chain (parent_class, widget);
((GtkWidgetClass *)(parent_class))->destroy (widget);
}
static void
......@@ -1560,7 +1560,7 @@ gee_class_init (GObjectClass *gobject_class)
gobject_class->set_property = gee_set_property;
gobject_class->get_property = gee_get_property;
gobject_class->finalize = gee_finalize;
gnm_destroy_class_set (gobject_class, gee_destroy);
widget_class->destroy = gee_destroy;
widget_class->mnemonic_activate = gee_mnemonic_activate;
signals[UPDATE] = g_signal_new ("update",
......
......@@ -278,7 +278,7 @@ static GObjectClass *parent_class = NULL;
static void
gtv_destroy (GtkWidget *widget)
{
gnm_destroy_class_chain (parent_class, widget);
((GtkWidgetClass *)(parent_class))->destroy (widget);
}
......@@ -384,7 +384,7 @@ gtv_class_init (GObjectClass *gobject_class)
gobject_class->set_property = gtv_set_property;
gobject_class->get_property = gtv_get_property;
gnm_destroy_class_set (gobject_class, gtv_destroy);
((GtkWidgetClass *)(gobject_class))->destroy = gtv_destroy;
signals [CHANGED] = g_signal_new ("changed",
GNM_TEXT_VIEW_TYPE,
......
......@@ -159,7 +159,7 @@ el_destroy (GtkWidget *widget)
EditableLabel *el = EDITABLE_LABEL (widget);
el_cancel_editing (el);
gnm_destroy_class_chain (parent_class, widget);
((GtkWidgetClass *)(parent_class))->destroy (widget);
}
static gint
......@@ -259,7 +259,7 @@ el_class_init (GObjectClass *object_class)
parent_class = g_type_class_peek_parent (object_class);
gnm_destroy_class_set (object_class, el_destroy);
widget_class->destroy = el_destroy;
widget_class->button_press_event = el_button_press_event;
widget_class->key_press_event = el_key_press_event;
widget_class->get_preferred_width = el_get_preferred_width;
......
......@@ -438,13 +438,13 @@ fs_destroy (GtkWidget *widget)
g_slist_free (fs->font_sizes);
fs->font_sizes = NULL;
gnm_destroy_class_chain (fs_parent_class, widget);
((GtkWidgetClass *)(fs_parent_class))->destroy (widget);
}
static void
fs_class_init (GObjectClass *klass)
{
gnm_destroy_class_set (klass, fs_destroy);
((GtkWidgetClass *)(klass))->destroy = fs_destroy;
fs_parent_class = g_type_class_peek (gtk_box_get_type ());
......
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