Author: everaldo
Date: 2007-03-30 05:57:03 -0500 (Fri, 30 Mar 2007)
New Revision: 75186

Added:
   trunk/maemo-sharp/samples/FindBar.cs
Removed:
   trunk/maemo-sharp/samples/Makefile.in
Modified:
   trunk/maemo-sharp/ChangeLog
   trunk/maemo-sharp/samples/Makefile.am
Log:
        * samples/FindBar.cs, samples/Makefile.am: FindToolbar sample added.

2007-03-30  Everaldo Canuto  <[EMAIL PROTECTED]>



Modified: trunk/maemo-sharp/ChangeLog
===================================================================
--- trunk/maemo-sharp/ChangeLog 2007-03-30 10:53:59 UTC (rev 75185)
+++ trunk/maemo-sharp/ChangeLog 2007-03-30 10:57:03 UTC (rev 75186)
@@ -1,5 +1,9 @@
 2007-03-30  Everaldo Canuto  <[EMAIL PROTECTED]>
 
+       * samples/FindBar.cs, samples/Makefile.am: FindToolbar sample added.
+
+2007-03-30  Everaldo Canuto  <[EMAIL PROTECTED]>
+
        * maemo/maemo.metadata: Closed, Search, InvalidInput and HistoryAppend
        events added to FindToolbar.
 

Added: trunk/maemo-sharp/samples/FindBar.cs
===================================================================
--- trunk/maemo-sharp/samples/FindBar.cs        2007-03-30 10:53:59 UTC (rev 
75185)
+++ trunk/maemo-sharp/samples/FindBar.cs        2007-03-30 10:57:03 UTC (rev 
75186)
@@ -0,0 +1,96 @@
+//
+// Maemo# - Maemo bindings for Mono
+//
+// Author: 
+//   Everaldo Canuto <[EMAIL PROTECTED]>
+//
+// Copyright (c) 2006 - 2007 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using Gtk;
+using Hildon;
+
+public class FindWindow : Hildon.Window
+{
+       FindToolbar findbar;
+       Button button;
+       
+       public static void Main (string[] args)
+       {
+               Application.Init ("Maemo# FindToolbar", ref args);
+
+               Program program = Program.Instance;
+               program.AddWindow ( new FindWindow () );
+
+               Application.Run ();
+       }
+
+       public FindWindow ()
+       {
+               this.Destroyed += delegate {Application.Quit ();};
+
+               // Button               
+               button = new Button ("Show FindToolbar");
+               button.Clicked += new EventHandler (show_findbar);
+               this.Add (button);
+               
+               this.ShowAll ();
+       }
+       
+       protected void show_findbar (object source, EventArgs e)
+       {
+               if (findbar == null) {
+                       findbar = new FindToolbar ("Search:");
+                       findbar.Closed += new EventHandler (findbar_close);
+                       findbar.Search += new EventHandler (findbar_search);
+                       findbar.InvalidInput += new EventHandler 
(findbar_invalid_input);
+                       findbar.HistoryAppend += new EventHandler 
(findbar_history_append);
+                       this.AddToolbar (findbar);
+               }
+               findbar.Show ();
+               button.Hide ();
+       }
+       
+       protected void findbar_close (object obj, EventArgs args)
+       {
+               FindToolbar control = (FindToolbar) obj;
+               Console.WriteLine ("close");
+               button.Show ();
+               findbar.Hide ();
+       }
+       
+       protected void findbar_search (object obj, EventArgs args)
+       {
+               Console.WriteLine ("search");
+       }
+
+       protected void findbar_invalid_input (object obj, EventArgs args)
+       {
+               Console.WriteLine ("invalid input");
+       }
+
+       protected void findbar_history_append (object obj, EventArgs args)
+       {
+               Console.WriteLine ("history append");
+       }
+}

Modified: trunk/maemo-sharp/samples/Makefile.am
===================================================================
--- trunk/maemo-sharp/samples/Makefile.am       2007-03-30 10:53:59 UTC (rev 
75185)
+++ trunk/maemo-sharp/samples/Makefile.am       2007-03-30 10:57:03 UTC (rev 
75186)
@@ -1,7 +1,7 @@
 
-TARGETS = basic.exe hello-world.exe calendar.exe banner.exe
+TARGETS = basic.exe hello-world.exe calendar.exe banner.exe findbar.exe
 
-EXTRA_DIST = BasicSample.cs HelloWorld.cs CalendarApp.cs gorilla.png
+EXTRA_DIST = BasicSample.cs HelloWorld.cs CalendarApp.cs Banner.cs FindBar.cs 
gorilla.png
 
 DEBUGS = $(addsuffix .mdb, $(TARGETS))
 
@@ -22,3 +22,6 @@
 
 banner.exe: $(srcdir)/Banner.cs
        $(CSC)  /out:$@ $(references) $(srcdir)/Banner.cs
+
+findbar.exe: $(srcdir)/FindBar.cs
+       $(CSC)  /out:$@ $(references) $(srcdir)/FindBar.cs

Deleted: trunk/maemo-sharp/samples/Makefile.in
===================================================================
--- trunk/maemo-sharp/samples/Makefile.in       2007-03-30 10:53:59 UTC (rev 
75185)
+++ trunk/maemo-sharp/samples/Makefile.in       2007-03-30 10:57:03 UTC (rev 
75186)
@@ -1,314 +0,0 @@
-# Makefile.in generated by automake 1.8.5 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
[EMAIL PROTECTED]@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = samples
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.in
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-       $(ACLOCAL_M4)
-mkinstalldirs = $(mkdir_p)
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-API_VERSION = @API_VERSION@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CSC = @CSC@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-ENABLE_MONODOC_FALSE = @ENABLE_MONODOC_FALSE@
-ENABLE_MONODOC_TRUE = @ENABLE_MONODOC_TRUE@
-GACUTIL = @GACUTIL@
-GACUTIL_FLAGS = @GACUTIL_FLAGS@
-GAPI_CODEGEN = @GAPI_CODEGEN@
-GAPI_FIXUP = @GAPI_FIXUP@
-GTK_SHARP_CFLAGS = @GTK_SHARP_CFLAGS@
-GTK_SHARP_LIBS = @GTK_SHARP_LIBS@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIB_PREFIX = @LIB_PREFIX@
-LIB_SUFFIX = @LIB_SUFFIX@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MDASSEMBLER = @MDASSEMBLER@
-MONODOCER = @MONODOCER@
-MONO_DEPENDENCY_CFLAGS = @MONO_DEPENDENCY_CFLAGS@
-MONO_DEPENDENCY_LIBS = @MONO_DEPENDENCY_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RUNTIME = @RUNTIME@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__leading_dot = @am__leading_dot@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-gtksharp_prefix = @gtksharp_prefix@
-hildon_CFLAGS = @hildon_CFLAGS@
-hildon_LIBS = @hildon_LIBS@
-hildon_prefix = @hildon_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libosso_CFLAGS = @libosso_CFLAGS@
-libosso_LIBS = @libosso_LIBS@
-libosso_prefix = @libosso_prefix@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-TARGETS = basic.exe hello-world.exe calendar.exe banner.exe
-EXTRA_DIST = BasicSample.cs HelloWorld.cs CalendarApp.cs gorilla.png
-DEBUGS = $(addsuffix .mdb, $(TARGETS))
-CLEANFILES = $(TARGETS) $(DEBUGS)
-references = -r:../maemo/maemo-sharp.dll -pkg:gtk-sharp-2.0
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  
$(am__configure_deps)
-       @for dep in $?; do \
-         case '$(am__configure_deps)' in \
-           *$$dep*) \
-             cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-               && exit 0; \
-             exit 1;; \
-         esac; \
-       done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  samples/Makefile'; \
-       cd $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  samples/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-       @case '$?' in \
-         *config.status*) \
-           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
-         *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ 
$(am__depfiles_maybe);; \
-       esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure 
$(CONFIG_STATUS_DEPENDENCIES)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
-       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
-       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-       list='$(DISTFILES)'; for file in $$list; do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-           $(top_srcdir)/*) file=`echo "$$file" | sed 
"s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-         esac; \
-         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-           dir="/$$dir"; \
-           $(mkdir_p) "$(distdir)$$dir"; \
-         else \
-           dir=''; \
-         fi; \
-         if test -d $$d/$$file; then \
-           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
-           fi; \
-           cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
-         else \
-           test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
-         fi; \
-       done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
-       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-         `test -z '$(STRIP)' || \
-           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
-       -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
-       -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic distclean \
-       distclean-generic distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am install-exec \
-       install-exec-am install-info install-info-am install-man \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-info-am
-
-
-all: $(TARGETS)
-
-basic.exe: $(srcdir)/BasicSample.cs
-       $(CSC)  /out:$@ $(references) $(srcdir)/BasicSample.cs
-
-hello-world.exe: $(srcdir)/HelloWorld.cs
-       $(CSC)  /out:$@ $(references) $(srcdir)/HelloWorld.cs
-
-calendar.exe: $(srcdir)/CalendarApp.cs
-       $(CSC)  /out:$@ $(references) $(srcdir)/CalendarApp.cs
-
-banner.exe: $(srcdir)/Banner.cs
-       $(CSC)  /out:$@ $(references) $(srcdir)/Banner.cs
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to