diff --git a/configure.ac b/configure.ac
index 2677449..472cba7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,9 +93,9 @@ ALL_PLUGINS="bookmarks drawspaces wordcompletion taglist"
 USEFUL_PLUGINS="bookmarks drawspaces wordcompletion taglist"
 DEFAULT_PLUGINS="bookmarks drawspaces wordcompletion taglist"
 
-PYTHON_ALL_PLUGINS="bracketcompletion charmap codecomment colorpicker commander joinlines multiedit textsize sessionsaver smartspaces terminal synctex"
-PYTHON_USEFUL_PLUGINS="bracketcompletion charmap codecomment colorpicker commander joinlines multiedit textsize sessionsaver smartspaces terminal synctex"
-PYTHON_DEFAULT_PLUGINS="bracketcompletion charmap codecomment colorpicker commander joinlines multiedit textsize sessionsaver smartspaces terminal synctex"
+PYTHON_ALL_PLUGINS="bracketcompletion charmap codecomment colorpicker commander joinlines multiedit textsize sessionsaver smartspaces terminal synctex dashboard"
+PYTHON_USEFUL_PLUGINS="bracketcompletion charmap codecomment colorpicker commander joinlines multiedit textsize sessionsaver smartspaces terminal synctex dashboard"
+PYTHON_DEFAULT_PLUGINS="bracketcompletion charmap codecomment colorpicker commander joinlines multiedit textsize sessionsaver smartspaces terminal synctex dashboard"
 
 DIST_PLUGINS="$ALL_PLUGINS $PYTHON_ALL_PLUGINS"
 
@@ -116,9 +116,10 @@ AC_ARG_WITH([plugins],
 [  --with-plugins=plugin1,plugin2,...
 			  build the specified plugins. Available:
 			  bracketcompletion, charmap, codecomment,
-			  colorpicker, drawspaces, joinlines, multiedit,
-			  textsize, sessionsaver, smartspaces, taglist,
-			  terminal, wordcompletion, as well as the aliases
+			  colorpicker, drawspaces, dashboard, joinlines, 
+			  multiedit, textsize, sessionsaver, smartspaces, 
+			  taglist, terminal, wordcompletion, 
+			  as well as the aliases
 			  default, all, and really-all],
 			  [plugins=$with_plugins],
 			  [plugins="default"])
@@ -256,6 +257,49 @@ AC_SUBST([DIST_PLUGINS])
 AC_SUBST([BUILD_PLUGINS],[$PLUGINS])
 
 # ================================================================
+# dashboard (zeitgeist-daemon)
+# ================================================================
+plugin_defined dashboard
+if test "$?" = 1
+then
+	ZEITGEIST_REQUIRED=0.8
+	PKG_CHECK_MODULES([ZEITGEIST],
+		[zeitgeist-daemon >= $ZEITGEIST_REQUIRED],
+		[have_dashboard=yes],[have_dashboard=no])
+
+	if test "x$have_dashboard" = "xno"; then
+		plugin_defined_explicit dashboard
+		if test "$?" = 1
+		then
+			AC_MSG_ERROR([zeitgeist could not be found, needed for dashboard plugin])
+		else
+			AC_MSG_WARN([zeitgeist could not be found, dashboard plugin will be disabled])
+			undef_plugin dashboard "zeitgeist not found"
+		fi
+	fi
+	echo "import pygments" | python - 2>/dev/null
+	if test $? -ne 0 ; then
+		plugin_defined_explicit dashboard
+		if test "$?" = 1
+		then
+			AC_MSG_ERROR([python-pygments could not be found, needed for dashboard plugin])
+		else
+			AC_MSG_WARN([python-pygments could not be found, dashboard plugin will be disabled])
+			undef_plugin dashboard "python-pygments not found"
+		fi
+	fi
+fi
+
+if test -z "$disabled_plugins"
+then
+	disabled_plugins="none"
+fi
+
+PLUGINS=$(echo $PLUGINS | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
+AC_SUBST([DIST_PLUGINS])
+AC_SUBST([BUILD_PLUGINS],[$PLUGINS])
+
+# ================================================================
 # Misc
 # ================================================================
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
@@ -314,6 +358,8 @@ plugins/drawspaces/drawspaces.plugin.desktop.in
 plugins/drawspaces/Makefile
 plugins/drawspaces/org.gnome.gedit.plugins.drawspaces.gschema.xml.in
 plugins/joinlines/joinlines.plugin.desktop.in
+plugins/dashboard/Makefile
+plugins/dashboard/dashboard.plugin.desktop.in
 plugins/joinlines/Makefile
 plugins/multiedit/Makefile
 plugins/multiedit/multiedit.plugin.desktop.in
diff --git a/plugins/dashboard/COPYING.GPL b/plugins/dashboard/COPYING.GPL
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/plugins/dashboard/COPYING.GPL
@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program 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 2 of the License, or
+    (at your option) any later version.
+
+    This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/plugins/dashboard/Makefile.am b/plugins/dashboard/Makefile.am
new file mode 100644
index 0000000..6838146
--- /dev/null
+++ b/plugins/dashboard/Makefile.am
@@ -0,0 +1,15 @@
+plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
+plugin_PYTHON = \
+	dashboard.py
+
+plugin_in_files = dashboard.plugin.desktop.in.in
+%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
+
+EXTRA_DIST = $(plugin_in_files)
+
+CLEANFILES = $(plugin_DATA)
+DISTCLEANFILES = $(plugin_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/plugins/dashboard/dashboard.plugin.desktop.in.in b/plugins/dashboard/dashboard.plugin.desktop.in.in
new file mode 100644
index 0000000..08e8102
--- /dev/null
+++ b/plugins/dashboard/dashboard.plugin.desktop.in.in
@@ -0,0 +1,10 @@
+[Plugin]
+Loader=python
+Module=dashboard
+IAge=3
+Name=Dashboard
+Description=A Dashboard for new tabs
+Authors=Seif Lotfy <seif@lotfy.com>
+Copyright=Copyright © 2011 Seif Lotfy <seif@lotfy.com>
+Website=http://www.gedit.org
+Version=0.1
diff --git a/plugins/dashboard/dashboard.py b/plugins/dashboard/dashboard.py
new file mode 100644
index 0000000..4b238b9
--- /dev/null
+++ b/plugins/dashboard/dashboard.py
@@ -0,0 +1,779 @@
+#!/usr/bin/env python
+# -- coding: utf-8 --
+#
+# Copyright © 2011 Collabora Ltd.
+#            By Seif Lotfy <seif@lotfy.com>
+#
+# This program 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.1 of the License, or
+# (at your option) any later version.
+#
+# This program 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 Lesser General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#
+	  
+from gi.repository import GObject, Gedit, Gtk, Gdk, Gio, GLib, GdkPixbuf
+from zeitgeist.client import ZeitgeistClient
+from zeitgeist.datamodel import Event, Subject, Interpretation, Manifestation, StorageState, TimeRange
+
+import time
+import os
+import urllib
+import tempfile
+import time
+import dbus
+import datetime
+
+try:
+    BUS = dbus.SessionBus()
+except Exception:
+    BUS = None
+
+import chardet
+
+import pygments
+from pygments.lexers import get_lexer_for_filename, get_lexer_for_mimetype
+from pygments import highlight
+from pygments.formatters import ImageFormatter
+
+try:
+	CLIENT = ZeitgeistClient()
+	version = [int(x) for x in CLIENT.get_version()]
+	MIN_VERSION = [0, 8, 0, 0]
+	if version < MIN_VERSION:
+		print "PLEASE USE ZEITGEIST 0.8.0 or above"
+		sys.exit()
+except RuntimeError, e:
+	print "Unable to connect to Zeitgeist, won't send events. Reason: '%s'" %e
+	exit()
+
+
+thumb_cache = {}
+pixbuf_cache = {}
+
+ICON_SIZES = SIZE_NORMAL, SIZE_LARGE = ((128, 128), (256, 256))
+
+# Thumbview and Timelineview sizes
+SIZE_THUMBVIEW = [(48, 36), (96, 72), (150, 108), (256, 192)]
+SIZE_TIMELINEVIEW = [(16,12), (32, 24), (64, 48), (128, 96)] 
+SIZE_TEXT_TIMELINEVIEW = ["small", "medium", "large", "x-large"]
+SIZE_TEXT_THUMBVIEW = ["x-small", "small", "large", "xx-large"]
+
+no_pixbuf = Gtk.IconTheme.get_default().load_icon("gtk-file", 48, 0)
+
+def exists(uri):
+	return uri.startswith("note://") or os.path.exists(urllib.unquote(str(uri[7:])))
+
+def make_icon_frame(pixbuf, blend=False, border=1, color=0x000000ff):
+	"""creates a new Pixmap which contains 'pixbuf' with a border at given
+	size around it."""
+	if not pixbuf:
+		return pixbuf
+	result = GdkPixbuf.Pixbuf.new(pixbuf.get_colorspace(),
+							True,
+							pixbuf.get_bits_per_sample(),
+							pixbuf.get_width(),
+							pixbuf.get_height())
+	result.fill(color)
+	if blend:
+		pixbuf.composite(result, 0.5, 0.5,
+						pixbuf.get_width(), pixbuf.get_height(),
+						0.5, 0.5,
+						0.5, 0.5,
+						gtk.gdk.INTERP_NEAREST,
+						256)
+	pixbuf.copy_area(border, border,
+					pixbuf.get_width() - (border * 2), pixbuf.get_height() - (border * 2),
+					result,
+					border, border)
+	return result
+
+def shade_gdk_color(color, shade):
+	"""
+	Shades a color by a fraction
+
+	Arguments:
+	:param color: a gdk color
+	:param shade: fraction by which to shade the color
+
+	:returns: a :class:`Color <gtk.gdk.Color>`
+	"""
+	f = lambda num: min((num * shade, 65535.0))
+	red = int(f(color.red))
+	green = int(f(color.green))
+	blue = int(f(color.blue))
+	color = Gdk.Color(red=red, green=green, blue=blue)
+	return color
+
+def combine_gdk_color(color, fcolor):
+	"""
+	Combines a color with another color
+
+	Arguments:
+	:param color: a gdk color
+	:param fcolor: a gdk color to combine with color
+
+	:returns: a :class:`Color <gtk.gdk.Color>`
+	"""
+	red = int(((2*color.red + fcolor.red)/5))
+	green = int(((2*color.green + fcolor.green)/5))
+	blue = int(((2*color.blue + fcolor.blue)/5))
+	color = Gdk.Color(red=red, green=green, blue=blue)
+	return color
+
+def create_text_thumb(gio_file, size=None, threshold=2):
+	""" tries to use pygments to get a thumbnail of a text file """
+	if gio_file.subject.uri in thumb_cache.keys():
+		return thumb_cache[gio_file.subject.uri]
+	if pygments is None:
+		return None
+	try:
+		lexer = get_lexer_for_mimetype(gio_file.mime_type)
+	except pygments.util.ClassNotFound:
+		lexer = get_lexer_for_mimetype("text/plain")
+	if chardet:
+		lexer.encoding = "chardet"
+	thumb = tempfile.NamedTemporaryFile()
+	formatter = ImageFormatter(font_name="DejaVu Sans Mono", line_numbers=False, font_size=10)
+	# to speed things up only highlight the first 20 lines
+	content = gio_file.get_content().split("\n")
+	new_content = []
+	last_line = ""
+	for line in content:
+		x = line.strip()
+		if not (x.startswith ("/*") or x.startswith ("*")\
+			or x.startswith("#") or x.startswith("import ")\
+			or x.startswith("from ") or x.startswith("#include ")\
+			or x.startswith("#define") or x.startswith("using")\
+			or x == "") and not last_line.endswith("\\"): 
+			new_content.append(line)
+		else:
+			last_line = line
+	for i in xrange(10):
+		new_content.append(" \n")
+	content = "\n".join(new_content[:20])
+	try:
+		content = highlight(content, lexer, formatter)
+	except (UnicodeDecodeError, TypeError):
+		# we can't create the pixbuf
+		return None
+	thumb.write(content)
+	thumb.flush()
+	thumb.seek(0)
+	try:
+		pixbuf = GdkPixbuf.Pixbuf.new_from_file(thumb.name)
+	except GLib.GError:
+		return None # (LP: #743125)
+	thumb.close()
+	if size is not None:
+		new_height = None
+		new_width = None
+		height = pixbuf.get_height()
+		width = pixbuf.get_width()
+		if width > threshold*size[0]:
+			new_width = threshold*size[0]
+		if height > threshold*size[1]:
+			new_height = threshold*size[1]
+		if new_height is not None or new_width is not None:
+			pixbuf = __crop_pixbuf(pixbuf, 0, 0, (new_width or width, new_height or height))
+	thumb_cache[gio_file.subject.uri] = pixbuf
+	return pixbuf
+
+def __crop_pixbuf(pixbuf, x, y, size=SIZE_LARGE):
+	""" returns a part of the given pixbuf as new one """
+	result = GdkPixbuf.Pixbuf.new(pixbuf.get_colorspace(),
+		True,
+		pixbuf.get_bits_per_sample(),
+		size[0], size[1])
+	pixbuf.copy_area(x, y, x+size[0], y+size[1], result, 0, 0)
+	return result
+
+def get_pixbuf_from_cache(gicon, callback, size=48):
+	name = gicon.to_string()
+	if name in pixbuf_cache:
+		callback(pixbuf_cache[name])
+	else:
+		loadable = gicon.__gtype__.is_a(Gio.LoadableIcon)
+		theme = Gtk.IconTheme.get_default()
+		# blocks: do something with it
+		gtk_icon = theme.lookup_by_gicon(gicon, size, Gtk.IconLookupFlags.FORCE_SIZE)
+		if gtk_icon: icon = gtk_icon.load_icon()
+		else: icon = None
+		pixbuf_cache[name] = icon
+		callback(icon)
+
+def get_icon(item, callback, size = 48):
+	uri = item.uri
+	mimetype = item.mimetype
+	f = Gio.file_new_for_uri(uri)
+	def callback2(arg1, arg2, arg3):
+		info = f.query_info_finish(arg2)
+		icon_path = info.get_attribute_byte_string(Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH)
+
+		def pixbuf_loaded_cb(pixbuf):
+			if pixbuf is None: return
+			icon = pixbuf.scale_simple(size * pixbuf.get_width() / pixbuf.get_height(),
+											size, 2)
+			callback(icon)
+
+		def add_frame(pixbuf):
+			pixbuf_loaded_cb(icon_factory.make_icon_frame(pixbuf, 128))
+			
+		#print "***", icon
+		if icon_path:
+			gicon = Gio.FileIcon(gio.File(icon_path))
+			get_pixbuf_from_cache(gicon, add_frame, size)
+		else:
+			gicon = info.get_icon()
+			get_pixbuf_from_cache(gicon, pixbuf_loaded_cb, size)
+	
+	if f.is_native():
+		attr= Gio.FILE_ATTRIBUTE_STANDARD_ICON + "," +	Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH
+		def cancel_cb():
+			pass
+		f.query_info_async(attr, Gio.FileQueryInfoFlags.NONE, GLib.PRIORITY_DEFAULT, None, callback2, None)
+	else:
+		gicon = Gio.content_type_get_icon(mimetype)
+		icon = get_pixbuf_from_cache(gicon, lambda x: callback(x))
+
+
+class Item(Gtk.Button):
+	def __init__(self, subject):
+		Gtk.Button.__init__(self)
+		self._file_object = Gio.file_new_for_uri(subject.uri)
+		self._file_info = self._file_object.query_info(
+			"standard::content-type", Gio.FileQueryInfoFlags.NONE, None)
+		self.subject = subject
+		#self.set_label(subject.text)
+		SIZE_LARGE = (256, 160)
+		self.thumb = create_text_thumb(self, SIZE_LARGE, 1)
+		self.image = Gtk.Image()
+		#self.thumb = make_icon_frame(self.thumb)
+		self.image.set_from_pixbuf(self.thumb)
+		self.set_size_request(224, 196)
+		self.set_relief(1)
+		vbox = Gtk.VBox()
+		vbox.pack_start(self.image, True, True, 0)
+		self.label = Gtk.Label()
+		self.label.set_markup("<span size='large'><b>%s</b></span>"%subject.text)
+		vbox.pack_start(self.label, False, False, 6)
+		self.add(vbox)
+		#self.connect("clicked", self.open)
+
+	@property
+	def mime_type(self):
+		return self._file_info.get_attribute_string("standard::content-type")
+		
+	def get_content(self):
+		f = open(self._file_object.get_path())
+		try:
+			content = f.read()
+		finally:
+			f.close()
+		return content
+
+class StockButton(Gtk.Button):
+	def __init__(self, stock, label):
+		Gtk.Button.__init__(self)
+		"""
+		self._file_object = Gio.file_new_for_uri(subject.uri)
+		self._file_info = self._file_object.query_info(
+			"standard::content-type,standard::icon,time::modified", Gio.FileQueryInfoFlags.NONE, None)
+		self.subject = subject
+		#self.set_label(subject.text)
+		SIZE_LARGE = (256, 160)
+		self.thumb = create_text_thumb(self, SIZE_LARGE, 1)
+		"""
+		#self.image = Gtk.Image()
+		#self.image.set_from_stock(stock, Gtk.IconSize.DIALOG)
+		#self.thumb = make_icon_frame(self.thumb)
+		#self.image.set_from_pixbuf(self.thumb)
+		self.set_size_request(256, 196)
+		self.set_relief(1)
+		vbox = Gtk.VBox()
+		#vbox.pack_end(self.image, True, True, 0)
+		self.label = Gtk.Label()
+		self.label.set_markup("<span size='large'><b>%s</b></span>"%label)
+		vbox.pack_end(self.label, False, False, 6)
+		self.add(vbox)
+
+class DashView(Gtk.VBox):
+	def __init__(self, func, window):
+		Gtk.VBox.__init__(self)
+		hbox = Gtk.HBox()
+		self._window = window
+		self.pack_start(Gtk.Label(""), True, True, 0)
+		self.pack_start(hbox, False, False, 0)
+		self.pack_start(Gtk.Label(""), True, True, 0)
+		self.table = Gtk.Table(2, 4, True)
+		self.table.set_col_spacings(15)
+		self.table.set_row_spacings(15)
+		hbox.pack_start(Gtk.Label(""), True, True, 0)
+		hbox.pack_start(self.table, False, False, 0)
+		hbox.pack_start(Gtk.Label(""), True, True, 0)
+		
+		self.new_btn = StockButton(Gtk.STOCK_NEW,"Empty Document")
+		#self.open_btn = StockButton(Gtk.STOCK_OPEN, "Open Document")
+		self.new_btn.connect("clicked", lambda x: func())
+		
+	def populate_table(self, events):
+		
+		for child in self.table.get_children():
+			self.table.remove(child)
+		self.hide()
+		subjects = []
+		
+		self.table.attach(self.new_btn, 0, 1, 0, 1,
+				xoptions=Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.FILL, xpadding=0, ypadding=0)
+		self.show_all()
+		
+		for event in events:
+			for subject in event.subjects:
+				if exists(subject.uri):
+					subjects.append(subject)
+				if len(subjects) == 7:
+					break
+			if len(subjects) == 7:
+				break
+		
+		for j, subject in enumerate(subjects):
+			i = j + 1
+			item = Item(subjects[j])
+			item.connect("clicked", self.open)
+			self.table.attach(item, i%4, (i%4) + 1, i/4, i/4 + 1,
+				xoptions=Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.FILL, xpadding=0, ypadding=0)
+		self.show_all()
+		
+	def open(self, item):
+		#doc = self._window.get_active_document()
+		#doc.load(item._file_object, None, 0, 0, False)
+		Gedit.commands_load_location(self._window, item._file_object, None, 0, 0)
+
+class DashPanelButton (Gtk.VBox):
+	def __init__(self, label):
+		Gtk.VBox.__init__(self)
+		vbox = Gtk.VBox()
+		self.text = label
+		self.label = Gtk.Label()
+		self.label.set_markup("<b>%s</b>"%label)
+		self.label.set_alignment(0.5, 0.5)
+		self.btn = Gtk.Button()
+		self.btn.add(vbox)
+		self.btn.set_relief(2)
+		self.pack_start(self.btn, True, True, 0)
+		self.set_size_request(-1, 42)
+		self._active = False
+		self.connect("style-set", self.change_style)
+		self.btn.set_can_focus(False)
+		self.line = Gtk.EventBox()
+		self.line.set_size_request(-1,3)
+		box = Gtk.HBox()
+		box.pack_start(self.line, True, True, 4)
+		vbox.pack_start(Gtk.Box(), False, False, 6)
+		vbox.pack_start(self.label, False, False, 0)
+		vbox.pack_start(box, False, False, 1)
+	
+	def set_active(self, active):
+		self._active = active
+		if self._active == True:
+			self.line.show()
+			self.reset_style()
+		else:
+			self.line.hide()
+			self.change_style(None, None)
+	
+	def change_style(self, widget, style):
+		self.style = self.get_style()
+		color = self.style.base[3]
+		self.line.modify_bg(0, color)
+		if not self._active:
+			color = self.style.bg[0]
+			fcolor = self.style.fg[0]
+			color = combine_gdk_color(color, fcolor)
+			self.label.modify_text(0, color)
+		else:
+			self.reset_style()
+		
+	def reset_style(self):
+		self.label.reset_rc_styles()
+		self.style = self.get_default_style()
+		color = self.style.fg[0]
+		self.label.modify_text(0, color)
+		color = self.style.base[3]
+		self.line.modify_bg(0, color)
+
+class ZeitgeistFTS(object):
+	result_type_relevancy = 100
+	
+	def __init__(self):
+		self.template = Event()
+		self.template.actor = "application://gedit.desktop"
+		self._fts = BUS.get_object('org.gnome.zeitgeist.Engine',
+			'/org/gnome/zeitgeist/index/activity')
+		self.fts = dbus.Interface(self._fts, 'org.gnome.zeitgeist.Index')
+	def search(self, text, callback):
+		events, count = self.fts.Search(text+"*",  TimeRange.always(), [self.template] , 0, 100, 2)
+		callback(map(Event, events), count)
+
+ZG_FTS = ZeitgeistFTS()
+
+class SearchEntry(Gtk.Entry):
+
+    __gsignals__ = {
+        "clear" : (GObject.SIGNAL_RUN_FIRST,
+                   GObject.TYPE_NONE,
+                   ()),
+        "search" : (GObject.SIGNAL_RUN_FIRST,
+                    GObject.TYPE_NONE,
+                    (GObject.TYPE_STRING,)),
+        "close" : (GObject.SIGNAL_RUN_FIRST,
+                   GObject.TYPE_NONE,
+                   ()),
+    }
+
+    default_text = _("Type here to search...")
+    # TODO: What is this?
+    search_timeout = 0
+
+    def __init__(self, accel_group = None):
+        Gtk.Entry.__init__(self)
+        self.set_width_chars(40)
+        self.set_text(self.default_text)
+        self.connect("changed", lambda w: self._queue_search())
+        self.connect("focus-in-event", self._entry_focus_in)
+        self.connect("focus-out-event", self._entry_focus_out)
+        self.set_icon_from_stock(0, Gtk.STOCK_FIND)
+        self.set_icon_from_stock(1, Gtk.STOCK_CLEAR)
+        self.connect("icon-press", self._icon_press)
+        self.show_all()
+
+    def _icon_press(self, widget, pos, event):
+        if int(pos) == 1 and not self.get_text() == self.default_text:
+            self._entry_clear_no_change_handler()
+        elif event.button == 1 and pos == 0:
+            self.emit("close")
+
+    def _entry_focus_in(self, widget, x):
+        if self.get_text() == self.default_text:
+            self.set_text("")
+            #self.modify_font(self.font_style)
+
+    def _entry_focus_out(self, widget, x):
+        if self.get_text() == "":
+            self.set_text(self.default_text)
+            #self.modify_font(self.font_style)
+
+    def _entry_clear_no_change_handler(self):
+        if not self.get_text() == self.default_text:
+            self.set_text("")
+
+    def _queue_search(self):
+        if self.search_timeout != 0:
+            GObject.source_remove(self.search_timeout)
+            self.search_timeout = 0
+
+        if self.get_text() == self.default_text or len(self.get_text()) == 0:
+            self.emit("clear")
+        else:
+            self.search_timeout = GObject.timeout_add(200, self._typing_timeout)
+
+    def _typing_timeout(self):
+        if len(self.get_text()) > 0:
+            self.emit("search", self.get_text())
+
+        self.search_timeout = 0
+        return False
+
+class ListView(Gtk.TreeView):
+	def __init__(self):
+		Gtk.TreeView.__init__(self)
+		self.icontheme = Gtk.IconTheme.get_default()
+		self.model = Gtk.ListStore(str, GdkPixbuf.Pixbuf, str, str, GObject.TYPE_PYOBJECT)
+		
+		renderer_text = Gtk.CellRendererText()
+		column_text = Gtk.TreeViewColumn("Text", renderer_text, markup=0)
+		self.append_column(column_text)
+		
+		renderer_pixbuf = Gtk.CellRendererPixbuf()
+		column_pixbuf = Gtk.TreeViewColumn("Image", renderer_pixbuf, pixbuf=1)
+		self.append_column(column_pixbuf)
+		
+		renderer_text = Gtk.CellRendererText()
+		renderer_text.set_alignment(0.0, 0.5)
+		renderer_text.set_property('ellipsize', 1)
+		column_text = Gtk.TreeViewColumn("Text", renderer_text, markup=2)
+		column_text.set_expand(True)
+		self.append_column(column_text)
+		
+		renderer_text = Gtk.CellRendererText()
+		renderer_text.set_alignment(1.0, 0.5)
+		column_text = Gtk.TreeViewColumn("Text", renderer_text, markup=3)
+		self.append_column(column_text)
+		
+		self.style_get_property("horizontal-separator", 9)
+		self.set_headers_visible(False)
+		self.set_model(self.model)
+		self.home_path = "file://%s" %os.getenv("HOME")
+		self.now = time.time()
+		
+	def get_time_string(self, timestamp):
+		time_string = "   "
+		timestamp = int(timestamp)/1000
+		diff  = int(self.now - timestamp)
+		if diff < 60:
+			return "   few moment ago   "
+		diff = int(diff / 60)
+		if diff <60:
+			if diff == 1:
+				return "   %i minute ago   " %int(diff)
+			return "   %i minutes ago   " %int(diff)
+		diff = int(diff / 60)
+		if diff <24:
+			if diff == 1:
+				return "   %i hour ago   " %int(diff)
+			return "   %i hours ago   " %int(diff)
+		diff = int(diff / 24)
+		if diff <4:
+			if diff == 1:
+				return "   Yesterday   "
+			return "   %i days ago   " %int(diff)
+		
+		return datetime.datetime.fromtimestamp(timestamp).strftime('   %d %B %Y   ')
+		
+	def clear(self):
+		self.model.clear()
+		self.now = time.time()
+	
+	def insert_results(self, events, match):
+		self.clear()
+		for event in events:
+			self.add_item(event, 48)
+				
+	def add_item(self, event, icon_size):
+		item  = event.subjects[0]
+		if exists(item.uri):
+			uri = item.uri.replace(self.home_path, "Home").split("/")
+			uri = u" → ".join(uri[0:len(uri) - 1])
+			text = "<span size='large'><b>\n   %s\n</b></span><span color='darkgrey'>   %s\n</span>" \
+						%(item.text, uri)
+			iter = self.model.append(["   ", no_pixbuf, text, "<span color='darkgrey'>   %s</span>"%self.get_time_string(event.timestamp), item])
+			def callback(icon):
+				self.model[iter][1] = icon if icon is not None else no_pix
+			get_icon(item, callback, icon_size)
+
+
+class Dashboard (Gtk.VBox):
+	def __init__(self, window, func):
+		Gtk.VBox.__init__(self)
+		self._window = window
+		self._func = func
+		self.last_btn = None
+		self.freq_btn = DashPanelButton("Most Used")
+		self.rcnt_btn = DashPanelButton("Recently Used")
+		
+		hbox1 = Gtk.HBox()
+		hbox1.pack_start(self.rcnt_btn, False, False, 0)
+		hbox1.pack_start(self.freq_btn, False, False, 0)
+		
+		self.freq_btn.btn.connect("clicked", lambda x: self._toggle_panel_btn(self.freq_btn))
+		self.freq_btn.btn.connect("clicked", lambda x: self.get_frequent())
+		self.rcnt_btn.btn.connect("clicked", lambda x: self._toggle_panel_btn(self.rcnt_btn))
+		self.rcnt_btn.btn.connect("clicked", lambda x: self.get_recent())
+		
+		self.btns = [self.freq_btn, self.rcnt_btn]
+		
+		self.view = DashView(self._func, window)
+		
+		hbox = Gtk.HBox()
+		hbox.pack_start(self.view, True, True, 9)
+
+		self.scrolledwindow = scrolledwindow = Gtk.ScrolledWindow()
+		scrolledwindow.add_with_viewport(hbox)
+		self.connect("style-set", self.change_style)
+		self.search = SearchEntry()
+		hbox = Gtk.HBox()
+		toolbar = Gtk.Toolbar()
+		toolitem = Gtk.ToolItem()
+		toolitem.set_expand(True)
+		toolbar.insert(toolitem, 0)
+		context = toolbar.get_style_context()
+		context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
+		
+		d_toolbar = Gtk.Toolbar()
+		context = d_toolbar.get_style_context()
+		context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
+		
+		vbox = Gtk.VBox()
+		vbox.pack_start(self.search, True, True, 6)
+		
+		hbox.pack_start(Gtk.Label(""), True, True, 24)
+		hbox.pack_start(hbox1, True, True, 0)
+		hbox.pack_end(vbox, False, False, 9)
+		
+		self.pack_start(hbox, False, False, 0)
+		self.pack_start(Gtk.HSeparator(), False, False, 1)
+
+		self.dash_box = Gtk.VBox()
+		self.dash_box.pack_start(scrolledwindow, True, True, 0)
+		self.pack_end(self.dash_box, True, True, 0)
+
+		self.tree_view = ListView()
+		self.scrolledwindow2 = Gtk.ScrolledWindow()
+		self.scrolledwindow2.add(self.tree_view)
+		
+		self.search_result_box = Gtk.VBox()
+		self.search_result_box.pack_start(self.scrolledwindow2, True, True, 0)
+		self.pack_end(self.search_result_box, True, True, 0)
+
+		self.get_recent()
+		
+		self.search.connect("search", self._on_search)
+		self.search.connect("clear", self._on_clear)
+		
+		self.show_all()
+		self.rcnt_btn.set_active(True)
+		self.freq_btn.set_active(False)
+		self.last_btn = self.rcnt_btn
+		
+		def open_uri(widget, row, cell):
+			Gedit.commands_load_location(self._window, Gio.file_new_for_uri(widget.model[row][4].uri), None, 0, 0)
+		self.tree_view.connect("row-activated", open_uri)
+		
+		GObject.idle_add(lambda: self.search.grab_focus())
+	
+	def _on_search(self, widget, query):
+		self.search_result_box.show()
+		self.dash_box.hide()
+		print "Dashboard search for:", query
+		ZG_FTS.search(query, self.tree_view.insert_results)
+		self.last_btn.set_active(False)
+	
+	def _on_clear(self, widget):
+		self.search_result_box.hide()
+		self.dash_box.show()
+		self.tree_view.clear()
+		self.last_btn.set_active(True)
+	
+	def change_style(self, widget, style):
+		self.style = self.get_style()
+		viewport = self.scrolledwindow.get_children()[0]
+		color = self.style.base[0]
+		viewport.modify_bg(0, color)
+	
+	def get_recent(self):
+		template = Event()
+		template.actor = "application://gedit.desktop"
+		CLIENT.find_events_for_templates([template], self.view.populate_table,
+			num_events = 100, result_type = 2)
+	
+	def get_frequent(self):
+		template = Event()
+		template.actor = "application://gedit.desktop"
+		now = time.time()*1000
+		CLIENT.find_events_for_templates([template],
+			self.view.populate_table, [now-14*86400000, now], num_events = 100, result_type = 4)
+	
+	def _toggle_panel_btn(self, widget):
+		for btn in self.btns:
+			if btn == widget:
+				btn.set_active(True)
+				self.last_btn = btn
+				self.search.set_text("")
+			else:
+				btn.set_active(False)
+
+class WindowHelper:
+	def __init__(self, plugin, window):
+		print "Plugin created for", window
+		self._window = window
+		self._plugin = plugin
+		self.status_bar = window.get_statusbar()
+		self._handlers = [self._window.connect_after("tab-added", self._add_tab),
+			self._window.connect_after("active-tab-changed", self._toggle_status_bar),
+			self._window.connect_after("destroy", lambda x: self.status_bar.show())]
+		self.notebook = None
+
+	def _toggle_status_bar(self, window, tab):
+		self.status_bar.show()
+		for w in tab.get_children():
+			if type(w) == Dashboard:
+				self.status_bar.hide()
+				break
+
+	def _add_tab(self, window, tab):
+		
+		if not self.notebook:
+			self.notebook = tab.get_parent()
+		
+		doc = tab.get_document()
+		uri = doc.get_uri_for_display()
+		
+		if not uri.startswith("/"):
+			self.notebook.get_tab_label(tab).get_children()\
+					[0].get_children()[0].get_children()[1].hide()
+			self.status_bar.hide()
+			d = None
+			if str(type(self.notebook.get_tab_label(tab))) == \
+				"<class 'gi.types.__main__.GeditTabLabel'>":
+				label = self.notebook.get_tab_label(tab).get_children()\
+					[0].get_children()[0].get_children()[2]
+				text = label.get_text()
+				label.set_text("Getting Started")
+				def show_doc():
+					self.notebook.get_tab_label(tab).get_children()\
+						[0].get_children()[0].get_children()[1].show()
+					tab.remove(d)
+					tab.get_children()[0].show()
+					tab.grab_focus()
+					if label.get_text() == "Getting Started":
+						label.set_text(text)
+					self.status_bar.show()
+				d = Dashboard(self._window, show_doc)
+				tab.pack_start(d, True, True, 0)
+				tab.get_children()[1].hide()
+				doc.connect("loaded", lambda x, y: show_doc())
+		self._is_adding = False
+
+	def deactivate(self):
+		print "Plugin stopped for", self._window
+		for tab in self.notebook.get_children():
+			for w in tab.get_children():
+				if type(w) == Dashboard:
+					tab.remove(w)
+				else:
+					w.show()
+			doc = tab.get_document()
+			label = self.notebook.get_tab_label(tab).get_children()\
+				[0].get_children()[0].get_children()[2]
+			label.set_text(doc.get_short_name_for_display())
+
+		for handler in self._handlers:
+			self._window.disconnect(handler)
+		self._plugin = None
+		self._window = None
+
+class DashboardPlugin(GObject.Object, Gedit.WindowActivatable):
+	
+	__gtype_name__ = "Dashboard"
+	window = GObject.property(type=Gedit.Window)
+	
+	def __init__(self):
+		GObject.Object.__init__(self)
+		self._instances = {}
+
+	def do_activate(self):
+		self._instances[self.window] = WindowHelper(self, self.window)
+
+	def do_deactivate(self):
+		self._instances[self.window].deactivate()
+
+	def do_update_state(self):
+		pass
+
