From: Peng Huang Date: Mon, 28 Nov 2011 16:30:22 +0000 (-0500) Subject: Remove switchertest.vala X-Git-Tag: 1.4.99.20121006~86^2~73 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2af1fcdd8626fa04c8736d5e3076e9dbd6381c43;p=platform%2Fupstream%2Fibus.git Remove switchertest.vala --- diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am index 330d55b..ac6c3ac 100644 --- a/ui/gtk3/Makefile.am +++ b/ui/gtk3/Makefile.am @@ -84,22 +84,4 @@ ibus_ui_gtk3_LDADD = \ $(AM_LDADD) \ $(NULL) -TESTS = \ - test-switcher \ - $(NULL) - -# noinst_PROGRAMS = $(TESTS) - -test_switcher_SOURCES = \ - iconwidget.vala \ - keybindingmanager.vala \ - switcher.vala \ - switchertest.vala \ - grabkeycode.c \ - $(NULL) - -test_switcher_LDADD = \ - $(AM_LDADD) \ - $(NULL) - -include $(top_srcdir)/git.mk diff --git a/ui/gtk3/switchertest.vala b/ui/gtk3/switchertest.vala deleted file mode 100644 index 2a237de..0000000 --- a/ui/gtk3/switchertest.vala +++ /dev/null @@ -1,65 +0,0 @@ -/* vim:set et sts=4 sw=4: - * - * ibus - The Input Bus - * - * Copyright(c) 2011 Peng Huang - * - * 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 program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307 USA - */ - -using Gdk; -using Gtk; -using IBus; - -void handler(Gdk.Event event) { - var keyevent = event.key; - var window = keyevent.window; - var display = window.get_display(); - var device = display.get_device_manager().get_client_pointer(); - uint state = 0; - - device.get_state(window, null, out state); - - if ((state & Gdk.ModifierType.CONTROL_MASK) == 0) { - debug ("Control is Up state=%08x event.state=%08x", state, keyevent.state); - } else { - debug ("Control is Down"); - } -} - -public void main(string[] argv) { - Gtk.init(ref argv); - IBus.init(); - var bus = new IBus.Bus(); - string[] names = { "xkb:us:eng", "pinyin", "anthy" }; - var engines = bus.get_engines_by_names(names); - Switcher switcher = new Switcher(); - - switcher.update_engines(engines); - - switcher.delete_event.connect((e) => { - Gtk.main_quit(); - return true; - }); - - switcher.show_all(); - - - KeybindingManager.get_instance().bind("M", handler); - - Gtk.main(); -} -