diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-06-26 21:44:42 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-07-05 16:08:10 -0400 |
commit | 6aedf8f0669b8727aed0db92eda5ccb4fff2fd35 (patch) | |
tree | 4998ecb622d6d08c619469c142e63c0650ecb5ed | |
parent | 103b97301d80726a8e2d65fb911879512becdb83 (diff) | |
download | gtk+-6aedf8f0669b8727aed0db92eda5ccb4fff2fd35.tar.gz |
Remove GailCalendar
This was just setting a role, which we can do just as well
in get_accessible().
-rw-r--r-- | gtk/a11y/Makefile.am | 2 | ||||
-rw-r--r-- | gtk/a11y/gail.c | 3 | ||||
-rw-r--r-- | gtk/a11y/gailcalendar.c | 52 | ||||
-rw-r--r-- | gtk/a11y/gailcalendar.h | 51 | ||||
-rw-r--r-- | gtk/gtkcalendar.c | 16 |
5 files changed, 16 insertions, 108 deletions
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am index ab3212b423..109064cb33 100644 --- a/gtk/a11y/Makefile.am +++ b/gtk/a11y/Makefile.am @@ -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 \ diff --git a/gtk/a11y/gail.c b/gtk/a11y/gail.c index 7ca070bd25..dad5bc8c05 100644 --- a/gtk/a11y/gail.c +++ b/gtk/a11y/gail.c @@ -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 index 1185e137e5..0000000000 --- a/gtk/a11y/gailcalendar.c +++ /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 index 857358fb2c..0000000000 --- a/gtk/a11y/gailcalendar.h +++ /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__ */ diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 404dfe980c..227f4d22a6 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -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; +} + /**************************************** * Public API * |