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 a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
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
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs