]> Pileus Git - ~andy/gtk/commitdiff
Remove GailCalendar
authorMatthias Clasen <mclasen@redhat.com>
Mon, 27 Jun 2011 01:44:42 +0000 (21:44 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jul 2011 20:08:10 +0000 (16:08 -0400)
This was just setting a role, which we can do just as well
in get_accessible().

gtk/a11y/Makefile.am
gtk/a11y/gail.c
gtk/a11y/gailcalendar.c [deleted file]
gtk/a11y/gailcalendar.h [deleted file]
gtk/gtkcalendar.c

index ab3212b4231c4721e0d26e46372fb0c3c2f5fdc4..109064cb331c9b3bbffff4ece0dd172d46a0d819 100644 (file)
@@ -10,7 +10,6 @@ gail_c_sources =                      \
        gailbooleancell.c               \
        gailbox.c                       \
        gailbutton.c                    \
-       gailcalendar.c                  \
        gailcell.c                      \
        gailcellparent.c                \
        gailcheckmenuitem.c             \
@@ -63,7 +62,6 @@ gail_private_h_sources =              \
        gailbooleancell.h               \
        gailbox.h                       \
        gailbutton.h                    \
-       gailcalendar.h                  \
        gailcell.h                      \
        gailcellparent.h                \
        gailcheckmenuitem.h             \
index 7ca070bd2570464ce9ea1a90529e7b0f6657e264..dad5bc8c052337afc2a2b5fe1434f581a7b5165f 100644 (file)
@@ -27,7 +27,6 @@
 #include "gailbooleancell.h"
 #include "gailbox.h"
 #include "gailbutton.h"
-#include "gailcalendar.h"
 #include "gailcell.h"
 #include "gailcheckmenuitem.h"
 #include "gailcombobox.h"
@@ -121,7 +120,6 @@ GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_RANGE, GailRange, gail_range, GTK_TYPE_RANGE)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_SCALE_BUTTON, GailScaleButton, gail_scale_button, GTK_TYPE_SCALE_BUTTON)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_STATUSBAR, GailStatusbar, gail_statusbar, GTK_TYPE_STATUSBAR)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_NOTEBOOK, GailNotebook, gail_notebook, GTK_TYPE_NOTEBOOK)
-GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_CALENDAR, GailCalendar, gail_calendar, GTK_TYPE_CALENDAR)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_PROGRESS_BAR, GailProgressBar, gail_progress_bar, GTK_TYPE_PROGRESS_BAR)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_TREE_VIEW, GailTreeView, gail_tree_view, GTK_TYPE_TREE_VIEW)
 GAIL_IMPLEMENT_FACTORY (GAIL_TYPE_FRAME, GailFrame, gail_frame, GTK_TYPE_FRAME)
@@ -892,7 +890,6 @@ gail_accessibility_module_init (void)
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_SCALE_BUTTON, gail_scale_button);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_STATUSBAR, gail_statusbar);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_NOTEBOOK, gail_notebook);
-  GAIL_WIDGET_SET_FACTORY (GTK_TYPE_CALENDAR, gail_calendar);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_PROGRESS_BAR, gail_progress_bar);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_TREE_VIEW, gail_tree_view);
   GAIL_WIDGET_SET_FACTORY (GTK_TYPE_FRAME, gail_frame);
diff --git a/gtk/a11y/gailcalendar.c b/gtk/a11y/gailcalendar.c
deleted file mode 100644 (file)
index 1185e13..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* GAIL - The GNOME Accessibility Implementation Library
- * Copyright 2001 Sun Microsystems Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "config.h"
-
-#include <gtk/gtk.h>
-#include "gailcalendar.h"
-
-static void         gail_calendar_class_init          (GailCalendarClass *klass);
-static void         gail_calendar_init                (GailCalendar      *calendar);
-static void         gail_calendar_initialize          (AtkObject         *accessible,
-                                                       gpointer           data);
-
-G_DEFINE_TYPE (GailCalendar, gail_calendar, GAIL_TYPE_WIDGET)
-
-static void
-gail_calendar_class_init (GailCalendarClass *klass)
-{
-  AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
-
-  atk_object_class->initialize = gail_calendar_initialize;
-}
-
-static void
-gail_calendar_init (GailCalendar *calendar)
-{
-}
-
-static void
-gail_calendar_initialize (AtkObject *accessible,
-                          gpointer  data)
-{
-  ATK_OBJECT_CLASS (gail_calendar_parent_class)->initialize (accessible, data);
-
-  accessible->role = ATK_ROLE_CALENDAR;
-}
diff --git a/gtk/a11y/gailcalendar.h b/gtk/a11y/gailcalendar.h
deleted file mode 100644 (file)
index 857358f..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* GAIL - The GNOME Accessibility Implementation Library
- * Copyright 2001 Sun Microsystems Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GAIL_CALENDAR_H__
-#define __GAIL_CALENDAR_H__
-
-#include "gailcontainer.h"
-
-G_BEGIN_DECLS
-
-#define GAIL_TYPE_CALENDAR                   (gail_calendar_get_type ())
-#define GAIL_CALENDAR(obj)                   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAIL_TYPE_CALENDAR, GailCalendar))
-#define GAIL_CALENDAR_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST ((klass), GAIL_TYPE_CALENDAR, GailCalendarClass))
-#define GAIL_IS_CALENDAR(obj)                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAIL_TYPE_CALENDAR))
-#define GAIL_IS_CALENDAR_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((klass), GAIL_TYPE_CALENDAR))
-#define GAIL_CALENDAR_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), GAIL_TYPE_CALENDAR, GailCalendarClass))
-
-typedef struct _GailCalendar              GailCalendar;
-typedef struct _GailCalendarClass         GailCalendarClass;
-
-struct _GailCalendar
-{
-  GailWidget parent;
-};
-
-GType gail_calendar_get_type (void);
-
-struct _GailCalendarClass
-{
-  GailWidgetClass parent_class;
-};
-
-G_END_DECLS
-
-#endif /* __GAIL_CALENDAR_H__ */
index 404dfe980c289843fd239672e908299b24d28a17..227f4d22a64874e992612254b99da1f3ffb65c2d 100644 (file)
@@ -393,6 +393,8 @@ static gboolean gtk_calendar_drag_drop          (GtkWidget        *widget,
                                                  gint              y,
                                                  guint             time);
 
+static AtkObject *gtk_calendar_get_accessible   (GtkWidget        *widget);
+
 static void calendar_start_spinning (GtkCalendar *calendar,
                                      gint         click_child);
 static void calendar_stop_spinning  (GtkCalendar *calendar);
@@ -455,6 +457,8 @@ gtk_calendar_class_init (GtkCalendarClass *class)
   widget_class->drag_drop = gtk_calendar_drag_drop;
   widget_class->drag_data_received = gtk_calendar_drag_data_received;
 
+  widget_class->get_accessible = gtk_calendar_get_accessible;
+
   /**
    * GtkCalendar:year:
    *
@@ -3554,6 +3558,18 @@ gtk_calendar_drag_data_received (GtkWidget        *widget,
   g_object_thaw_notify (G_OBJECT (calendar));
 }
 
+static AtkObject *
+gtk_calendar_get_accessible (GtkWidget *widget)
+{
+  AtkObject *obj;
+
+  obj = GTK_WIDGET_CLASS (gtk_calendar_parent_class)->get_accessible (widget);
+
+  atk_object_set_role (obj, ATK_ROLE_CALENDAR);
+
+  return obj;
+}
+
 \f
 /****************************************
  *              Public API              *