/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2005, 2007 Free Software Foundation
+ Copyright (C) 2005, 2007, 2010, 2011, 2012 Free Software Foundation
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
#include <config.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkentry.h>
+#include <gtk/gtk.h>
#include "customentry.h"
-
+#include "helper.h"
static void psppire_custom_entry_class_init (PsppireCustomEntryClass *klass);
static void psppire_custom_entry_init (PsppireCustomEntry *ce);
static void
psppire_custom_entry_map (GtkWidget *widget)
{
- if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_realized (widget) && !gtk_widget_get_mapped (widget))
{
GTK_WIDGET_CLASS (parent_class)->map (widget);
gdk_window_show (PSPPIRE_CUSTOM_ENTRY (widget)->panel);
static void
psppire_custom_entry_unmap (GtkWidget *widget)
{
- if (GTK_WIDGET_MAPPED (widget))
+ if (gtk_widget_get_mapped (widget))
{
gdk_window_hide (PSPPIRE_CUSTOM_ENTRY (widget)->panel);
GTK_WIDGET_CLASS (parent_class)->unmap (widget);
widget = GTK_WIDGET (custom_entry);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
gtk_widget_queue_draw (widget);
g_return_val_if_fail (PSPPIRE_IS_CUSTOM_ENTRY (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
- if (GTK_WIDGET_DRAWABLE (widget))
+ if (gtk_widget_is_drawable (widget))
{
gboolean is_editable;
GtkShadowType shadow_type;
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class;
- GtkEntryClass *entry_class;
parent_class = g_type_class_peek_parent (klass);
widget_class = (GtkWidgetClass*) klass;
- entry_class = (GtkEntryClass*) klass;
widget_class->map = psppire_custom_entry_map;
widget_class->unmap = psppire_custom_entry_unmap;
if (event->window == ce->panel)
{
gboolean is_editable ;
- if (!GTK_WIDGET_HAS_FOCUS (widget))
+ if (!gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
g_object_get (ce, "editable", &is_editable, NULL);
GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, &entry_allocation);
- if (GTK_WIDGET_REALIZED (widget))
+ if (gtk_widget_get_realized (widget))
{
gdk_window_move_resize (PSPPIRE_CUSTOM_ENTRY (widget)->panel,
panel_allocation.x,