After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 663466 - Proposal for dashboard plugin
Proposal for dashboard plugin
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-05 19:00 UTC by Manish Sinha
Modified: 2019-03-23 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Dashboard plugin patch (9.96 KB, patch)
2011-11-05 19:00 UTC, Manish Sinha
none Details | Review
Dashboard plugin patch (48.01 KB, patch)
2011-11-05 20:34 UTC, Manish Sinha
none Details | Review
git formatted patch for dashboard (54.05 KB, patch)
2011-11-08 20:49 UTC, Manish Sinha
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (32.40 KB, patch)
2011-11-16 14:10 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (31.54 KB, patch)
2011-11-16 15:33 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (30.12 KB, patch)
2011-11-16 17:23 UTC, Seif Lotfy
needs-work Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (30.73 KB, patch)
2011-11-16 21:41 UTC, Seif Lotfy
needs-work Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (31.18 KB, patch)
2011-11-17 17:10 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (31.17 KB, patch)
2011-11-17 17:15 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (31.18 KB, patch)
2011-11-17 17:22 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (31.31 KB, patch)
2011-11-17 22:11 UTC, Seif Lotfy
needs-work Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (31.56 KB, patch)
2011-11-20 16:14 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (31.01 KB, patch)
2011-11-21 13:13 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (26.67 KB, patch)
2011-11-29 23:27 UTC, Seif Lotfy
none Details | Review
Added a Dashboard for new tabs and zeitgeist powered searching (32.13 KB, patch)
2011-11-30 23:16 UTC, Seif Lotfy
none Details | Review

Description Manish Sinha 2011-11-05 19:00:58 UTC
Created attachment 200770 [details] [review]
Dashboard plugin patch

This is a dashboard plugin which was made by Seif Lotfy and blogged about it here
http://seilo.geekyogre.com/2011/11/gedit-dash-0-1/

I have added his work in gedit-plugins repo and updated the build system appropriately to find relevant dependency (zeitgeist in this case) to enable or disable the plugin
Comment 1 Paolo Borelli 2011-11-05 20:06:47 UTC
Review of attachment 200770 [details] [review]:

It's not entirely clear to me what this patch applies to... I do not see the python code and the patch seems to be against some branch which already contains the dash (e.g. I see it is removing dashboard.plugin and adding the .in.in).


As already discussed on irc with Seif, I do not have any problem if you want to go ahead and create a dashboard branch and push it to the repo, though as far as I understood from the discussion I thought the idea was that Seif creates a gedit-plugins clone tree in github/gitorius and developement is done there until things are ready to be merged since at the moment he does not have an account on gnome git.


Incidentally I did not know that the plugins ws using pygments: I do not think that's a dependency we want, I'd much rather see the highlighting done with gtksourceview unless there are some very specific problems. Adding a second syntax highlighting library with it's own language support, colors and style seems very redundant
Comment 2 Manish Sinha 2011-11-05 20:34:33 UTC
Created attachment 200778 [details] [review]
Dashboard plugin patch

Hi Paolo,
This patch applies against gedit-plugins master (git://git.gnome.org/gedit-plugins). I actually used git format-patch, so this patch is showing multiple commits. I am reattaching another patch which combines all the 5 commits.

WRT to me pushing it, Seif asked me to do it because I was free that time and till now Seif had only created the plugin and not integrated it into the build system. 

WRT to pygments, I think you and Seif need to finalize what needs to be done. I am just a person who was requested to do the autotools integration. By the way, I agree that having gtksourceview would be a good idea to remove extra dependency and checking for python-gtksourceview using autotools is a breeze. Right now I had to run a python shell and import pygments as a process to check if it is available or not.
Comment 3 Seif Lotfy 2011-11-05 22:26:57 UTC
Hi Paolo,
Manish is doing the merge proposal since I suck with autotools and build stuff.
As for GtkSourceView...
I fail to find something similar to 
    from pygments.formatters import ImageFormatter
which creates images from the text 

It would be nice if you could point me to an example in which some1 reads in text using gtk.sourceview, highlighting it and retrieving it back highlighted (as a buffer i guess)
Comment 4 Manish Sinha 2011-11-08 20:49:56 UTC
Created attachment 201029 [details] [review]
git formatted patch for dashboard
Comment 5 Paolo Borelli 2011-11-08 21:12:30 UTC
Review of attachment 201029 [details] [review]:

I have not (yet) looked at the code itself, but here are some generic comments,

 - For python code I'd prefer if it was PEP-8 compliant (so 4-space indent, not tabs), though it is obviusly your code, so it is your call.

 - I'd probably prefer if the plugin was made of a "dashboard" dir with an __init__.py file inside and the source split into different logical files (one for the plugin object, one for the dashboard widget, etc)


As said on irc I have no problem if you want to push this work to a git branch (e.g. called dashboard) and keep working on it there.

::: plugins/dashboard/COPYING.GPL
@@ +1,1 @@
+                    GNU GENERAL PUBLIC LICENSE

Any specific reason to add a COPYING file here? gedit-plugins is already GPL

::: plugins/dashboard/dashboard.plugin
@@ +1,1 @@
+[Plugin]

The .plugin file is generated from the .in.in file and should not be added to git

::: plugins/dashboard/dashboard.plugin.desktop.in.in
@@ +1,1 @@
+[Plugin]

why are there both .in.in and .desktop.in.in?
Comment 6 José Aliste 2011-11-09 12:52:37 UTC
Review of attachment 201029 [details] [review]:

some quick comments after  reading the code.

::: plugins/dashboard/dashboard.py
@@ +44,3 @@
+from pygments.formatters import ImageFormatter
+
+try:

Why do you have a sys.exit() call here??? What would this do for gedit if you don't have the correct version of zeitgeist?
I guess it's better to have the code checking for correct zeitgeist in the _activate() of the windowactivatable class.

@@ +305,3 @@
+		self.add(vbox)
+
+class DashView(Gtk.VBox):

Gtk.VBox and Gtk.HBox are deprecated, so it is better to use Gtk.Box right away.
Comment 7 Ignacio Casal Quinteiro (nacho) 2011-11-09 13:01:35 UTC
In fact I'd rather like a GtkGrid use.
Comment 8 Seif Lotfy 2011-11-12 12:37:39 UTC
Ok i added a git repo 
git@github.com:seiflotfy/gedit-dashboard.git 
please try out the "dashboard" branch
it has everything in it
Comment 9 Ignacio Casal Quinteiro (nacho) 2011-11-13 17:16:45 UTC
why there is a plugins/dashboard/dashboard.plugin.desktop.in.in and a plugins/dashboard/dashboard.plugin.in.in? Please remove it as only the desktop.in.in is needed
Comment 10 Ignacio Casal Quinteiro (nacho) 2011-11-13 17:17:27 UTC
Please add vim modelines.
Comment 11 Ignacio Casal Quinteiro (nacho) 2011-11-13 17:17:54 UTC
I see that you are using dbus. Is it possible to use gdbus instead?
Comment 12 Seif Lotfy 2011-11-14 12:03:05 UTC
OK fixed them for you except for gdbus since the zeitgeist python bindings use dbus
Comment 13 Seif Lotfy 2011-11-16 14:10:13 UTC
Created attachment 201533 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 14 Seif Lotfy 2011-11-16 14:12:06 UTC
The top comment is a patch based on the squashed commits in my new branch "squashed-dashboard"
Comment 15 Seif Lotfy 2011-11-16 15:32:27 UTC
OK a new fixed
Comment 16 Seif Lotfy 2011-11-16 15:33:15 UTC
Created attachment 201549 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 17 Seif Lotfy 2011-11-16 17:23:10 UTC
Created attachment 201555 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 18 Ignacio Casal Quinteiro (nacho) 2011-11-16 18:24:19 UTC
Review of attachment 201555 [details] [review]:

Apart from the inline comments, you are missing to add the specific files to POTFILES.in

::: README
@@ +25,3 @@
 commander		Command gedit from a command line like interface
+dashboard		A Dashboard created in every new tab for quick finding of
+			last and most items with a ability to search

last and most items? sounds weird
also "a ability" -> "an ability"

::: plugins/dashboard/dashboard/dashboard.py
@@ +68,3 @@
+        return pixbuf
+    result = GdkPixbuf.Pixbuf.new(pixbuf.get_colorspace(),
+                            True,

indentation

@@ +74,3 @@
+    result.fill(color)
+    pixbuf.copy_area(border, border,
+                    pixbuf.get_width() - (border * 2), pixbuf.get_height() - (border * 2),

indentation problem here?

@@ +142,3 @@
+        callback(icon)
+
+def get_icon(item, callback, size = 48):

consistency, size=48

@@ +153,3 @@
+            if pixbuf is None: return
+            icon = pixbuf.scale_simple(size * pixbuf.get_width() / pixbuf.get_height(),
+                                            size, 2)

indentation

@@ +163,3 @@
+    
+    if f.is_native():
+        attr= Gio.FILE_ATTRIBUTE_STANDARD_ICON + "," +    Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH

+  Gio... <- too much spaces there?

@@ +176,3 @@
+        Gtk.Button.__init__(self)
+        self._file_object = Gio.file_new_for_uri(subject.uri)
+        self._file_info = self._file_object.query_info(

I don't like this kind of cuts, let's \n in the ,

@@ +219,3 @@
+        self.pack_start(hbox, False, False, 0)
+        self.pack_start(Gtk.Label(""), True, True, 0)
+        self.table = Gtk.Table(2, 4, True)

table -> grid

@@ +231,3 @@
+        hbox.pack_start(Gtk.Label(""), True, True, 0)
+        
+        self.new_btn = StockButton(Gtk.STOCK_NEW,"Empty Document")

what is btn? meaningful names

@@ +235,3 @@
+        
+    def populate_table(self, events):
+        

no empty line

@@ +260,3 @@
+        
+    def open(self, item):
+        Gedit.commands_load_location(self._window, item._file_object, None, 0, 0)

last params should be -1, -1

@@ +282,3 @@
+        box = Gtk.Box()
+        box.pack_start(self.line, True, True, 4)
+        vbox.pack_start(Gtk.Box(), False, False, 6)

? why this Gtk.Box?

@@ +294,3 @@
+            self.line.hide()
+    
+    def change_style(self, widget):

using deprecated api

@@ +313,3 @@
+        self.template = Event()
+        self.template.actor = "application://gedit.desktop"
+        self._fts = BUS.get_object('org.gnome.zeitgeist.Engine',

align here

@@ +343,3 @@
+        self.set_placeholder_text(_("Type here to search..."))
+        self.connect("changed", lambda w: self._queue_search())
+        self.set_icon_from_stock(0, Gtk.STOCK_FIND)

let's follow gnome app convention, see quickopen plugin. They icons change whether we have or not text

@@ +453,3 @@
+        self._window = window
+        self._func = func
+        self.last_btn = None

ditto, btn?

@@ +461,3 @@
+        hbox1.pack_start(self.freq_btn, False, False, 0)
+        
+        self.freq_btn.btn.connect("clicked", lambda x: self._toggle_view(self.freq_btn))

clicked twice?

@@ +483,3 @@
+        toolbar.insert(toolitem, 0)
+        context = toolbar.get_style_context()
+        context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)

shouldn't be an inline toolbar?

@@ +492,3 @@
+        vbox.pack_start(self.search, True, True, 6)
+        
+        hbox.pack_start(Gtk.Label(""), True, True, 24)

why this? is this label even accesible?

@@ +498,3 @@
+        vbox = Gtk.Box(orientation = Gtk.Orientation.VERTICAL)
+        vbox.pack_start(hbox, False, False, 1)
+        vbox.pack_start(Gtk.HSeparator(), False, False, 0)

Separator is not like GtkBox? Gtk.Separator and then the oritation prop

@@ +511,3 @@
+        
+        self.search_result_box = Gtk.Box(orientation = Gtk.Orientation.VERTICAL)
+        self.search_result_box.pack_start(self.scrolledwindow2, True, True, 0)

scrolledwindow2? what's this sw for? meaningful names

@@ +544,3 @@
+        self.last_btn.set_active(True)
+    
+    def change_style(self, widget):

gtkstylecontext please

@@ +554,3 @@
+        template.actor = "application://gedit.desktop"
+        CLIENT.find_events_for_templates([template], self.view.populate_table,
+            num_events = 100, result_type = 2)

align

@@ +561,3 @@
+        now = time.time() * 1000
+        CLIENT.find_events_for_templates([template],
+            self.view.populate_table, [now - 14 * 86400000, now], num_events = 100, result_type = 4)

what's this 86400000 for? should we use a meaningful name constant here?
Comment 19 Seif Lotfy 2011-11-16 21:15:00 UTC
(In reply to comment #18)
> Review of attachment 201555 [details] [review]:
> 
> Apart from the inline comments, you are missing to add the specific files to
> POTFILES.in
> 
> ::: README
> @@ +25,3 @@
>  commander        Command gedit from a command line like interface
> +dashboard        A Dashboard created in every new tab for quick finding of
> +            last and most items with a ability to search
> 
> last and most items? sounds weird
> also "a ability" -> "an ability"
> 
> ::: plugins/dashboard/dashboard/dashboard.py
> @@ +68,3 @@
> +        return pixbuf
> +    result = GdkPixbuf.Pixbuf.new(pixbuf.get_colorspace(),
> +                            True,
> 
> indentation
> 
> @@ +74,3 @@
> +    result.fill(color)
> +    pixbuf.copy_area(border, border,
> +                    pixbuf.get_width() - (border * 2), pixbuf.get_height() -
> (border * 2),
> 
> indentation problem here?
> 
> @@ +142,3 @@
> +        callback(icon)
> +
> +def get_icon(item, callback, size = 48):
> 
> consistency, size=48
> 
> @@ +153,3 @@
> +            if pixbuf is None: return
> +            icon = pixbuf.scale_simple(size * pixbuf.get_width() /
> pixbuf.get_height(),
> +                                            size, 2)
> 
> indentation
> 
> @@ +163,3 @@
> +    
> +    if f.is_native():
> +        attr= Gio.FILE_ATTRIBUTE_STANDARD_ICON + "," +   
> Gio.FILE_ATTRIBUTE_THUMBNAIL_PATH
> 
> +  Gio... <- too much spaces there?
> 
> @@ +176,3 @@
> +        Gtk.Button.__init__(self)
> +        self._file_object = Gio.file_new_for_uri(subject.uri)
> +        self._file_info = self._file_object.query_info(
> 
> I don't like this kind of cuts, let's \n in the ,
> 
> @@ +219,3 @@
> +        self.pack_start(hbox, False, False, 0)
> +        self.pack_start(Gtk.Label(""), True, True, 0)
> +        self.table = Gtk.Table(2, 4, True)
> 
> table -> grid
> 
> @@ +231,3 @@
> +        hbox.pack_start(Gtk.Label(""), True, True, 0)
> +        
> +        self.new_btn = StockButton(Gtk.STOCK_NEW,"Empty Document")
> 
> what is btn? meaningful names
> 
> @@ +235,3 @@
> +        
> +    def populate_table(self, events):
> +        
> 
> no empty line
> 
> @@ +260,3 @@
> +        
> +    def open(self, item):
> +        Gedit.commands_load_location(self._window, item._file_object, None, 0,
> 0)
> 
> last params should be -1, -1
> 
> @@ +282,3 @@
> +        box = Gtk.Box()
> +        box.pack_start(self.line, True, True, 4)
> +        vbox.pack_start(Gtk.Box(), False, False, 6)
> 
> ? why this Gtk.Box?

This is purely cosmetic I can not get rid of it... I really need it there

> 
> @@ +294,3 @@
> +            self.line.hide()
> +    
> +    def change_style(self, widget):
> 
> using deprecated api
> 
> @@ +313,3 @@
> +        self.template = Event()
> +        self.template.actor = "application://gedit.desktop"
> +        self._fts = BUS.get_object('org.gnome.zeitgeist.Engine',
> 
> align here
> 
> @@ +343,3 @@
> +        self.set_placeholder_text(_("Type here to search..."))
> +        self.connect("changed", lambda w: self._queue_search())
> +        self.set_icon_from_stock(0, Gtk.STOCK_FIND)
> 
> let's follow gnome app convention, see quickopen plugin. They icons change
> whether we have or not text
> 
> @@ +453,3 @@
> +        self._window = window
> +        self._func = func
> +        self.last_btn = None
> 
> ditto, btn?
> 
> @@ +461,3 @@
> +        hbox1.pack_start(self.freq_btn, False, False, 0)
> +        
> +        self.freq_btn.btn.connect("clicked", lambda x:
> self._toggle_view(self.freq_btn))
> 
> clicked twice?
> 
> @@ +483,3 @@
> +        toolbar.insert(toolitem, 0)
> +        context = toolbar.get_style_context()
> +        context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR)
> 
> shouldn't be an inline toolbar?
> 
> @@ +492,3 @@
> +        vbox.pack_start(self.search, True, True, 6)
> +        
> +        hbox.pack_start(Gtk.Label(""), True, True, 24)
> 
> why this? is this label even accesible?

Also purely cosmetic that I couldn't do otherwise

> 
> @@ +498,3 @@
> +        vbox = Gtk.Box(orientation = Gtk.Orientation.VERTICAL)
> +        vbox.pack_start(hbox, False, False, 1)
> +        vbox.pack_start(Gtk.HSeparator(), False, False, 0)
> 
> Separator is not like GtkBox? Gtk.Separator and then the oritation prop
> 
> @@ +511,3 @@
> +        
> +        self.search_result_box = Gtk.Box(orientation =
> Gtk.Orientation.VERTICAL)
> +        self.search_result_box.pack_start(self.scrolledwindow2, True, True, 0)
> 
> scrolledwindow2? what's this sw for? meaningful names
> 
> @@ +544,3 @@
> +        self.last_btn.set_active(True)
> +    
> +    def change_style(self, widget):
> 
> gtkstylecontext please
> 
> @@ +554,3 @@
> +        template.actor = "application://gedit.desktop"
> +        CLIENT.find_events_for_templates([template], self.view.populate_table,
> +            num_events = 100, result_type = 2)
> 
> align
> 
> @@ +561,3 @@
> +        now = time.time() * 1000
> +        CLIENT.find_events_for_templates([template],
> +            self.view.populate_table, [now - 14 * 86400000, now], num_events =
> 100, result_type = 4)
> 
> what's this 86400000 for? should we use a meaningful name constant here?

I think I finished everything else will put up a new patch soon
Comment 20 Seif Lotfy 2011-11-16 21:41:13 UTC
Created attachment 201561 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 21 Ignacio Casal Quinteiro (nacho) 2011-11-17 07:28:17 UTC
Review of attachment 201561 [details] [review]:

More comments inline :)

::: plugins/dashboard/dashboard/dashboard.py
@@ +142,3 @@
+    mimetype = item.mimetype
+    f = Gio.file_new_for_uri(uri)
+    def query_info_callback(arg1, arg2, arg3):

arg1, arg2, arg3? what is that?

@@ +172,3 @@
+        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)

align

@@ +207,3 @@
+
+class DashView(Gtk.Box):
+    def __init__(self, func, window):

what is this func? Add a comment? change the name?

@@ +241,3 @@
+                if uri_exists(subject.uri):
+                    subjects.append(subject)
+                if len(subjects) == 7:

what's this 7? shouldn't be a constant?

@@ +269,3 @@
+        self.set_size_request(-1, 42)
+        self._active = False
+        self.connect("style-updated", self.change_style)

is this really needed? with gtkstylecontext this shouldn't be needed. just change the style once.

@@ +442,3 @@
+
+class Dashboard (Gtk.Box):
+    def __init__(self, window, func):

same, what's is func for?

@@ +447,3 @@
+        self._func = func
+        self.last_button = None
+        self.freq_button = DashPanelButton("Most Used")

still abbreviations, change it please, also missing to mark the string for translation?

@@ +448,3 @@
+        self.last_button = None
+        self.freq_button = DashPanelButton("Most Used")
+        self.rcnt_button = DashPanelButton("Recently Used")

here too

@@ +543,3 @@
+        template.actor = "application://gedit.desktop"
+        CLIENT.find_events_for_templates([template], self.view.populate_grid,
+            num_events = 100, result_type = 2)

aligh

@@ +551,3 @@
+        two_weeks_in_ms = 14 * 86400000 #14 being the amount of days and 86400000 the amount of milliseconds per day
+        CLIENT.find_events_for_templates([template],
+            self.view.populate_grid, [now - two_weeks_in_ms, now], num_events = 100, result_type = 4)

align

::: po/POTFILES.in
@@ +10,3 @@
 plugins/commander/commander.plugin.desktop.in.in
+plugins/dashboard/dashboard.plugin.desktop.in.in
+plugins/dashboard/dashboard/__init__.py

I don't think this file is needed here. Please check with intltool-update -m in the po directory.
Comment 22 Seif Lotfy 2011-11-17 17:10:47 UTC
Created attachment 201599 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 23 Seif Lotfy 2011-11-17 17:15:35 UTC
Created attachment 201600 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 24 Seif Lotfy 2011-11-17 17:22:14 UTC
Created attachment 201602 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 25 Seif Lotfy 2011-11-17 22:11:50 UTC
Created attachment 201624 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 26 Ignacio Casal Quinteiro (nacho) 2011-11-18 18:07:52 UTC
Review of attachment 201624 [details] [review]:

As a global note: see other plugins to see how they manage the gettext translations.

::: plugins/dashboard/dashboard/dashboard.py
@@ +18,3 @@
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+#

no need for extra empty lines. Check all copyrights

@@ +70,3 @@
+        return pixbuf
+    result = GdkPixbuf.Pixbuf.new(pixbuf.get_colorspace(), True,
+                 pixbuf.get_bits_per_sample(), pixbuf.get_width(),

alignment

@@ +172,3 @@
+    def __init__(self, subject):
+        Gtk.Button.__init__(self)
+        self._file_object = Gio.file_new_for_uri(subject.uri)

if you are getting outside the class add a getter

@@ +174,3 @@
+        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)

align

@@ +227,3 @@
+        hbox.pack_start(Gtk.Label(""), True, True, 0)
+        
+        self.new_button = StockButton(Gtk.STOCK_NEW,"Empty Document")

this string is not marked for translation

@@ +300,3 @@
+        self.template.actor = "application://gedit.desktop"
+        self._fts = BUS.get_object('org.gnome.zeitgeist.Engine',
+                        '/org/gnome/zeitgeist/index/activity')

align

@@ +329,3 @@
+        self.set_placeholder_text(_("Type here to search..."))
+        self.connect("changed", lambda w: self._queue_search())
+        self.set_icon_from_stock(0, Gtk.STOCK_FIND)

see http://git.gnome.org/browse/gedit/tree/plugins/quickopen/quickopen/popup.py#n368

you have to use symbolic icons

@@ +440,3 @@
+        self._show_doc = show_doc
+        self.last_used_button = None
+        self.frequently_used_toggle_button = DashPanelButton("Most Used")

missing translation

@@ +441,3 @@
+        self.last_used_button = None
+        self.frequently_used_toggle_button = DashPanelButton("Most Used")
+        self.recently_used_toggle_button = DashPanelButton("Recently Used")

missing translation
Comment 27 Seif Lotfy 2011-11-20 16:14:57 UTC
Created attachment 201744 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 28 Seif Lotfy 2011-11-21 13:12:38 UTC
OK I cleaned up the code using your own GDP plugin (text formatter)
Hope this is good
Comment 29 Seif Lotfy 2011-11-21 13:13:36 UTC
Created attachment 201805 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 30 Paolo Borelli 2011-11-29 21:01:58 UTC
Review of attachment 201805 [details] [review]:

::: plugins/dashboard/dashboard/__init__.py
@@ +21,3 @@
+      
+from gi.repository import GObject, Gedit
+from dashboard import CAN_LOAD, Dashboard

This CAN_LOAD is pretty ugly... 

1) Do we really need it? I mean, worse case the plugin fails and gets disabled by gedit itself

if we want to keep it I see a couple of possible solutions:

1) try the import zeitgeist here in __init__.py, get the self.client in DashboardWindowActivatable.__init__() and then pass it as an arg when instanciating Dashboard()

2) make import dashboard fail if import zeigeist fail (requires python wizardry beyong my day to day knowledgs :)

@@ +39,3 @@
+    
+    def _toggle_status_bar(self, window, tab):
+        self.status_bar.show()

The status bar could be always hidden if the user toggled it from the view->show status bar menu. We should not show it in that case.

@@ +47,3 @@
+    def _add_tab(self, window, tab):
+        
+        if not self.notebook:

any reason to store in self.notebook instead of just having a local var in the scope of the function?

@@ +85,3 @@
+    def do_deactivate(self):
+        if CAN_LOAD:
+            for tab in self.notebook.get_children():

You could call deactivate in a window where _add_tab was never called (e.g. after detaching a tab a tab with a doc open). Better to obtain the notebook from the current window

::: plugins/dashboard/dashboard/dashboard.py
@@ +58,3 @@
+
+no_pixbuf = Gtk.IconTheme.get_default().load_icon("gtk-file", 48, 0)
+

Maybe move these standlone functions to an utils.py module? they are not strictly bound to dashboard
Comment 31 Seif Lotfy 2011-11-29 23:27:00 UTC
Created attachment 202409 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching

pbor's last comments:
<pbor> seif: btw, none of the things I wrote are blocker for me
<pbor> so whenever you want to go ahead and push I have no objections
Comment 32 Seif Lotfy 2011-11-30 23:16:53 UTC
Created attachment 202487 [details] [review]
Added a Dashboard for new tabs and zeitgeist powered searching
Comment 33 Paolo Borelli 2011-11-30 23:39:38 UTC
I pushed the plugin. Further fixes can be done incrementally