[gtk+/a11y] Remove GailCalendar
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/a11y] Remove GailCalendar
- Date: Mon, 27 Jun 2011 01:45:27 +0000 (UTC)
commit a73fef856d6ddb56168a090d5fe774271a5c2404
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 26 21:44:42 2011 -0400
Remove GailCalendar
This was just setting a role, which we can do just as well
in get_accessible().
gtk/a11y/Makefile.am | 2 -
gtk/a11y/gail.c | 3 --
gtk/a11y/gailcalendar.c | 52 -----------------------------------------------
gtk/a11y/gailcalendar.h | 51 ----------------------------------------------
gtk/gtkcalendar.c | 16 ++++++++++++++
5 files changed, 16 insertions(+), 108 deletions(-)
---
diff --git a/gtk/a11y/Makefile.am b/gtk/a11y/Makefile.am
index ab3212b..109064c 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 7ca070b..dad5bc8 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/gtkcalendar.c b/gtk/gtkcalendar.c
index 404dfe9..227f4d2 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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]