aboutsummaryrefslogtreecommitdiffstats
path: root/a11y
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-04-28 03:36:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-04-28 03:36:19 +0800
commit4449a34101406bffe508dd40b8b653f7c7d14c7d (patch)
treee9fb2ce7efd3901cf1090040666f0ce15ad70554 /a11y
parente377ea5e61171e57f9e892652d0fd1f77953eda8 (diff)
downloadgsoc2013-evolution-4449a34101406bffe508dd40b8b653f7c7d14c7d.tar
gsoc2013-evolution-4449a34101406bffe508dd40b8b653f7c7d14c7d.tar.gz
gsoc2013-evolution-4449a34101406bffe508dd40b8b653f7c7d14c7d.tar.bz2
gsoc2013-evolution-4449a34101406bffe508dd40b8b653f7c7d14c7d.tar.lz
gsoc2013-evolution-4449a34101406bffe508dd40b8b653f7c7d14c7d.tar.xz
gsoc2013-evolution-4449a34101406bffe508dd40b8b653f7c7d14c7d.tar.zst
gsoc2013-evolution-4449a34101406bffe508dd40b8b653f7c7d14c7d.zip
Commit the rest of the attachment UI rewrite
Oops, last commit only included the -new- files. This also removes EExpander, which is no longer used.
Diffstat (limited to 'a11y')
-rw-r--r--a11y/e-table/Makefile.am5
-rw-r--r--a11y/widgets/Makefile.am2
-rw-r--r--a11y/widgets/ea-expander.c165
-rw-r--r--a11y/widgets/ea-expander.h51
-rw-r--r--a11y/widgets/ea-widgets.c7
-rw-r--r--a11y/widgets/ea-widgets.h1
6 files changed, 3 insertions, 228 deletions
diff --git a/a11y/e-table/Makefile.am b/a11y/e-table/Makefile.am
index 1884c3a1c5..f344d7b8c3 100644
--- a/a11y/e-table/Makefile.am
+++ b/a11y/e-table/Makefile.am
@@ -1,6 +1,7 @@
INCLUDES = \
- -I$(top_srcdir) \
- -I$(top_srcdir)/widgets \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/widgets \
+ $(E_UTIL_CFLAGS) \
$(GNOME_PLATFORM_CFLAGS) \
-DG_LOG_DOMAIN=\"e-table\"
diff --git a/a11y/widgets/Makefile.am b/a11y/widgets/Makefile.am
index e157f82188..6fb8c80048 100644
--- a/a11y/widgets/Makefile.am
+++ b/a11y/widgets/Makefile.am
@@ -22,8 +22,6 @@ libevolution_widgets_a11y_la_SOURCES = \
ea-calendar-cell.h \
ea-combo-button.c \
ea-combo-button.h \
- ea-expander.c \
- ea-expander.h \
ea-widgets.c \
ea-widgets.h
diff --git a/a11y/widgets/ea-expander.c b/a11y/widgets/ea-expander.c
deleted file mode 100644
index ae9da5fb61..0000000000
--- a/a11y/widgets/ea-expander.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- *
- * This program 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) version 3.
- *
- * This program 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 the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Boby Wang <boby.wang@sun.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#include <config.h>
-#include "ea-expander.h"
-#include <glib/gi18n.h>
-
-static AtkObjectClass *parent_class;
-static GType parent_type;
-
-/* Action IDs */
-enum {
- ACTIVATE,
- LAST_ACTION
-};
-
-static G_CONST_RETURN gchar*
-ea_expander_get_name (AtkObject *a11y)
-{
- return _("Toggle Attachment Bar");
-}
-
-/* Action interface */
-static G_CONST_RETURN gchar *
-ea_expander_action_get_name (AtkAction *action, gint i)
-{
- switch (i)
- {
- case ACTIVATE:
- return _("activate");
- default:
- return NULL;
- }
-}
-
-static gboolean
-ea_expander_do_action (AtkAction *action, gint i)
-{
- GtkWidget *widget;
- EExpander *expander;
-
- widget = GTK_ACCESSIBLE (action)->widget;
- if (!widget || !GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
- return FALSE;
-
- expander = E_EXPANDER (widget);
-
- switch (i)
- {
- case ACTIVATE:
- g_signal_emit_by_name (expander, "activate");
- return TRUE;
- default:
- return FALSE;
- }
-}
-
-static gint
-ea_expander_get_n_actions (AtkAction *action)
-{
- return LAST_ACTION;
-}
-
-static void
-atk_action_interface_init (AtkActionIface *iface)
-{
- g_return_if_fail (iface != NULL);
-
- iface->do_action = ea_expander_do_action;
- iface->get_n_actions = ea_expander_get_n_actions;
- iface->get_name = ea_expander_action_get_name;
-}
-
-static void
-ea_expander_class_init (EaExpanderClass *klass)
-{
- AtkObjectClass *atk_object_class = ATK_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (parent_type);
-
- atk_object_class->get_name = ea_expander_get_name;
-}
-
-static void
-ea_expander_init (EaExpander *a11y)
-{
- /* Empty */
-}
-
-GType
-ea_expander_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- AtkObjectFactory *factory;
- GTypeQuery query;
-
- GTypeInfo info = {
- sizeof (EaExpanderClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) ea_expander_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class data */
- sizeof (EaExpander),
- 0,
- (GInstanceInitFunc) ea_expander_init,
- NULL /* value_tree */
- };
-
- static const GInterfaceInfo atk_action_info = {
- (GInterfaceInitFunc) atk_action_interface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL
- };
-
- factory = atk_registry_get_factory (atk_get_default_registry (), GTK_TYPE_BIN);
- parent_type = atk_object_factory_get_accessible_type (factory);
- g_type_query (parent_type, &query);
-
- info.class_size = query.class_size;
- info.instance_size = query.instance_size;
-
- type = g_type_register_static (parent_type, "EaExpander", &info, 0);
- g_type_add_interface_static (type, ATK_TYPE_ACTION,
- &atk_action_info);
- }
-
- return type;
-}
-
-AtkObject *
-ea_expander_new (GtkWidget *widget)
-{
- EaExpander *a11y;
-
- a11y = g_object_new (ea_expander_get_type (), NULL);
-
- GTK_ACCESSIBLE (a11y)->widget = GTK_WIDGET (widget);
- ATK_OBJECT (a11y)->role = ATK_ROLE_TOGGLE_BUTTON;
-
- return ATK_OBJECT (a11y);
-}
-
diff --git a/a11y/widgets/ea-expander.h b/a11y/widgets/ea-expander.h
deleted file mode 100644
index e670ad07be..0000000000
--- a/a11y/widgets/ea-expander.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * This program 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) version 3.
- *
- * This program 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 the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Boby Wang <boby.wang@sun.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef _EA_EXPANDER_H_
-#define _EA_EXPANDER_H_
-
-#include <gtk/gtk.h>
-#include <misc/e-expander.h>
-
-#define EA_TYPE_EXPANDER (ea_expander_get_type ())
-#define EA_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EA_TYPE_EXPANDER, EaExpander))
-#define EA_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass,), EA_TYPE_EXPANDER, EaExpanderClass))
-#define EA_IS_EXPANDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EA_TYPE_EXPANDER))
-#define EA_IS_EXPANDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EA_TYPE_EXPANDER_CLASS))
-
-typedef struct _EaExpander EaExpander;
-typedef struct _EaExpanderClass EaExpanderClass;
-
-struct _EaExpander {
- GtkAccessible object;
-};
-
-struct _EaExpanderClass {
- GtkAccessibleClass parent_class;
-};
-
-/* Standard Glib function */
-GType ea_expander_get_type (void);
-AtkObject* ea_expander_new (GtkWidget *expander);
-
-#endif /* ! _EA_EXPANDER_H_ */
diff --git a/a11y/widgets/ea-widgets.c b/a11y/widgets/ea-widgets.c
index 66c1668baf..5befb44837 100644
--- a/a11y/widgets/ea-widgets.c
+++ b/a11y/widgets/ea-widgets.c
@@ -23,12 +23,10 @@
#include "ea-factory.h"
#include "widgets/ea-calendar-item.h"
#include "widgets/ea-combo-button.h"
-#include "widgets/ea-expander.h"
#include "ea-widgets.h"
EA_FACTORY_GOBJECT (EA_TYPE_CALENDAR_ITEM, ea_calendar_item, ea_calendar_item_new)
EA_FACTORY (EA_TYPE_COMBO_BUTTON, ea_combo_button, ea_combo_button_new)
-EA_FACTORY (EA_TYPE_EXPANDER, ea_expander, ea_expander_new)
void e_calendar_item_a11y_init (void)
{
@@ -39,8 +37,3 @@ void e_combo_button_a11y_init (void)
{
EA_SET_FACTORY (e_combo_button_get_type (), ea_combo_button);
}
-
-void e_expander_a11y_init (void)
-{
- EA_SET_FACTORY (e_expander_get_type (), ea_expander);
-}
diff --git a/a11y/widgets/ea-widgets.h b/a11y/widgets/ea-widgets.h
index f4aff74655..20c1c9698d 100644
--- a/a11y/widgets/ea-widgets.h
+++ b/a11y/widgets/ea-widgets.h
@@ -29,6 +29,5 @@
void e_calendar_item_a11y_init (void);
void e_combo_button_a11y_init (void);
-void e_expander_a11y_init (void);
#endif /* _EA_WIDGETS_H__ */