*
* @Copyright (C) 2004-2006 Christian Hammond.
* Some of this code is from gtkspell, Copyright (C) 2002 Evan Martin.
- * Adapted for Claws Mail (c) 2009 Pawel Pekala and the Claws Mail team
+ * Adapted for Claws Mail (c) 2009-2011 Pawel Pekala and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
static void claws_spell_entry_init (ClawsSpellEntry *entry);
static void claws_spell_entry_editable_init (GtkEditableClass *iface);
static void claws_spell_entry_finalize (GObject *object);
+#if !GTK_CHECK_VERSION(3, 0, 0)
static void claws_spell_entry_destroy (GtkObject *object);
static gint claws_spell_entry_expose (GtkWidget *widget,
GdkEventExpose *event);
+#else
+static void claws_spell_entry_destroy (GtkWidget *object);
+static gint claws_spell_entry_expose (GtkWidget *widget,
+ cairo_t *cr);
+#endif
static gint claws_spell_entry_button_press (GtkWidget *widget,
GdkEventButton *event);
static gboolean claws_spell_entry_popup_menu (GtkWidget *widget,
static void claws_spell_entry_class_init(ClawsSpellEntryClass *klass)
{
GObjectClass *g_object_class;
+#if !GTK_CHECK_VERSION(3, 0, 0)
GtkObjectClass *gtk_object_class;
+#endif
GtkWidgetClass *widget_class;
parent_class = g_type_class_peek_parent(klass);
g_object_class = G_OBJECT_CLASS(klass);
g_object_class->finalize = claws_spell_entry_finalize;
+#if !GTK_CHECK_VERSION(3, 0, 0)
gtk_object_class = GTK_OBJECT_CLASS(klass);
gtk_object_class->destroy = claws_spell_entry_destroy;
+#endif
widget_class = GTK_WIDGET_CLASS(klass);
- widget_class->expose_event = claws_spell_entry_expose;
widget_class->button_press_event = claws_spell_entry_button_press;
+#if !GTK_CHECK_VERSION(3, 0, 0)
+ widget_class->expose_event = claws_spell_entry_expose;
+#else
+ widget_class->draw = claws_spell_entry_expose;
+ widget_class->destroy = claws_spell_entry_destroy;
+#endif
g_type_class_add_private(g_object_class,
sizeof(struct _ClawsSpellEntryPriv));
G_OBJECT_CLASS(parent_class)->finalize(object);
}
+#if !GTK_CHECK_VERSION(3, 0, 0)
static void claws_spell_entry_destroy(GtkObject *object)
{
GTK_OBJECT_CLASS(parent_class)->destroy(object);
}
+#else
+static void claws_spell_entry_destroy(GtkWidget *object)
+{
+ GTK_WIDGET_CLASS(parent_class)->destroy(object);
+}
+#endif
GtkWidget *claws_spell_entry_new(void)
{
}
}
+#if !GTK_CHECK_VERSION(3, 0, 0)
static gint claws_spell_entry_expose(GtkWidget *widget, GdkEventExpose *event)
+#else
+static gint claws_spell_entry_expose(GtkWidget *widget, cairo_t *cr)
+#endif
{
ClawsSpellEntry *entry = CLAWS_SPELL_ENTRY(widget);
GtkEntry *gtk_entry = GTK_ENTRY(widget);
pango_layout_set_attributes(layout, entry->priv->attr_list);
}
+#if !GTK_CHECK_VERSION(3, 0, 0)
return GTK_WIDGET_CLASS(parent_class)->expose_event (widget, event);
+#else
+ return GTK_WIDGET_CLASS(parent_class)->draw (widget, cr);
+#endif
}
static gint claws_spell_entry_button_press(GtkWidget *widget, GdkEventButton *event)