From 2cc662a32f10ac921426a861f6f4ba453d0c9edd Mon Sep 17 00:00:00 2001 From: Nohemi Fernandez Date: Thu, 4 Aug 2011 14:11:53 -0500 Subject: Remove get_acc_geometry --- modules/gtk2/Makefile.am | 4 --- modules/gtk2/vapi-fixes.vapi | 1 - modules/gtk3/Makefile.am | 4 --- modules/gtk3/caribou-gtk-module.vala | 56 ++---------------------------------- modules/gtk3/vapi-fixes.vapi | 10 ------- 5 files changed, 2 insertions(+), 73 deletions(-) delete mode 120000 modules/gtk2/vapi-fixes.vapi delete mode 100644 modules/gtk3/vapi-fixes.vapi diff --git a/modules/gtk2/Makefile.am b/modules/gtk2/Makefile.am index d47a6a4..57e9022 100644 --- a/modules/gtk2/Makefile.am +++ b/modules/gtk2/Makefile.am @@ -9,7 +9,6 @@ libcaribou_la_SOURCES = \ libcaribou_la_VALAFLAGS = \ -h caribou-gtk-module.h \ --vapidir=. \ - --pkg vapi-fixes \ --pkg gtk+-2.0 \ -D GTK2 \ $(VALAGLAFS) @@ -28,6 +27,3 @@ libcaribou_la_LDFLAGS = \ -module \ $(NULL) -EXTRA_DIST = \ - vapi-fixes.vapi \ - $(NULL) diff --git a/modules/gtk2/vapi-fixes.vapi b/modules/gtk2/vapi-fixes.vapi deleted file mode 120000 index cb1b309..0000000 --- a/modules/gtk2/vapi-fixes.vapi +++ /dev/null @@ -1 +0,0 @@ -../gtk3/vapi-fixes.vapi \ No newline at end of file diff --git a/modules/gtk3/Makefile.am b/modules/gtk3/Makefile.am index 6d95287..c25655c 100644 --- a/modules/gtk3/Makefile.am +++ b/modules/gtk3/Makefile.am @@ -9,7 +9,6 @@ libcaribou_la_SOURCES = \ libcaribou_la_VALAFLAGS = \ -h caribou-gtk-module.h \ --vapidir=. \ - --pkg vapi-fixes \ --pkg gtk+-3.0 \ $(VALAGLAFS) @@ -27,6 +26,3 @@ libcaribou_la_LDFLAGS = \ -module \ $(NULL) -EXTRA_DIST = \ - vapi-fixes.vapi \ - $(NULL) diff --git a/modules/gtk3/caribou-gtk-module.vala b/modules/gtk3/caribou-gtk-module.vala index c662878..5c0f062 100644 --- a/modules/gtk3/caribou-gtk-module.vala +++ b/modules/gtk3/caribou-gtk-module.vala @@ -52,12 +52,11 @@ namespace Caribou { Gtk.Widget? widget = window.get_focus(); uint32 timestamp = Gtk.get_current_event_time(); if (widget != null && (widget is Gtk.Entry || widget is Gtk.TextView) && widget is Gtk.Editable) { - Atk.Object focus_object = widget.get_accessible(); Gdk.Window current_window = widget.get_window(); int x=0, y=0, w=0, h=0; - if (current_window != null && !get_acc_geometry (focus_object, out x, out y, out w, out h)) { + if (current_window != null) get_origin_geometry (current_window, out x, out y, out w, out h); - } + try { keyboard.show (timestamp); keyboard.set_entry_location (x, y, w, h); @@ -85,56 +84,5 @@ namespace Caribou { #endif } - private Atk.Object? find_focused_accessible (Atk.Object acc) { - Atk.StateSet state = acc.ref_state_set (); - - bool match = (state.contains_state (Atk.StateType.EDITABLE) && - state.contains_state (Atk.StateType.FOCUSED) && - acc.get_n_accessible_children () == 0); - - if (match) - return acc; - - for (int i=0;i