#!/usr/bin/env python2.5
#
# This file is part of isearch-edit, a tool to create mis-files for 
# the maemo internet search applet
#
# (c) 2007-2008 Thomas Schmidt <tschmidt@debian.org>
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This code 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with isearch-edit. If not, see <http://www.gnu.org/licenses/>.
#

import osso
import hildon
import gtk

def send_rpc(widget, osso_c):
	osso_rpc = osso.Rpc(osso_c)
	osso_rpc.rpc_run("org.maemo.isearchedit", "/org/maemo/isearchedit", "org.maemo.isearchedit", "do_something")
	print "RPC sent"

osso_c = osso.Context("isearchedit", "0.1.0", False)
window = hildon.Window()
window.connect("destroy", gtk.main_quit)
send_button = gtk.Button("Send RPC")
window.add(send_button)
send_button.connect("clicked", send_rpc, osso_c)
window.show_all()
gtk.main()

# vim: set expandtab tabstop=4 shiftwidth=4 autoindent smartindent foldmethod=indent:
