Jaap, forgive me if I misunderstand, but does this only add an inline
search for the current page, or does it search across all pages? I
think the latter is what we are hoping to have in a side pane.
On Mon, Feb 18, 2013 at 9:47 AM, Jaap Karssenberg
<email address hidden> wrote:
> Code below can be added in "zim/gui/__init__.py" just below the call
> "self.uimanager.ensure_update()" (around line 540) and will add a search
> entry in the toolbar. In my mind this removes the need for adding search
> to the side pane, but open to suggestions.
>
>
> ###
> space = gtk.SeparatorToolItem()
> space.set_draw(False)
> space.set_expand(True)
> self.mainwindow.toolbar.insert(space, -1)
>
> def inline_search(entry, *a):
> text = entry.get_text()
> if text:
> self.show_search(text)
>
> from zim.gui.widgets import InputEntry
> entry = InputEntry()
> if gtk.gtk_version >= (2, 16):
> entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, gtk.STOCK_FIND)
> entry.set_icon_activatable(gtk.ENTRY_ICON_SECONDARY, True)
> entry.set_icon_tooltip_text(gtk.ENTRY_ICON_SECONDARY, _('Search Pages...'))
> # FIXME would be nice to have function to set "Search" as grey background
> #entry.set_icon_to_clear()
> entry.connect('activate', inline_search)
> entry.connect('icon-release', inline_search)
> entry.show()
> item = gtk.ToolItem()
> item.add(entry)
> self.mainwindow.toolbar.insert(item, -1)
> ###
>
> ** Changed in: zim
> Status: Confirmed => In Progress
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/134736
>
> Title:
> Integrate search in the side pane
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/134736/+subscriptions
Jaap, forgive me if I misunderstand, but does this only add an inline
search for the current page, or does it search across all pages? I
think the latter is what we are hoping to have in a side pane.
On Mon, Feb 18, 2013 at 9:47 AM, Jaap Karssenberg __init_ _.py" just below the call .ensure_ update( )" (around line 540) and will add a search olItem( ) draw(False) expand( True) .toolbar. insert( space, -1) search( entry, *a): search( text) icon_from_ stock(gtk. ENTRY_ICON_ SECONDARY, gtk.STOCK_FIND) icon_activatabl e(gtk.ENTRY_ ICON_SECONDARY, True) icon_tooltip_ text(gtk. ENTRY_ICON_ SECONDARY, _('Search Pages...')) set_icon_ to_clear( ) 'activate' , inline_search) 'icon-release' , inline_search) .toolbar. insert( item, -1) /bugs.launchpad .net/bugs/ 134736 /bugs.launchpad .net/zim/ +bug/134736/ +subscriptions
<email address hidden> wrote:
> Code below can be added in "zim/gui/
> "self.uimanager
> entry in the toolbar. In my mind this removes the need for adding search
> to the side pane, but open to suggestions.
>
>
> ###
> space = gtk.SeparatorTo
> space.set_
> space.set_
> self.mainwindow
>
> def inline_
> text = entry.get_text()
> if text:
> self.show_
>
> from zim.gui.widgets import InputEntry
> entry = InputEntry()
> if gtk.gtk_version >= (2, 16):
> entry.set_
> entry.set_
> entry.set_
> # FIXME would be nice to have function to set "Search" as grey background
> #entry.
> entry.connect(
> entry.connect(
> entry.show()
> item = gtk.ToolItem()
> item.add(entry)
> self.mainwindow
> ###
>
> ** Changed in: zim
> Status: Confirmed => In Progress
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Integrate search in the side pane
>
> To manage notifications about this bug go to:
> https:/