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 679719 - Add a recent files backend
Add a recent files backend
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks: 325824
 
 
Reported: 2012-07-10 23:53 UTC by William Jon McCann
Modified: 2012-07-13 14:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a recent files backend (23.27 KB, patch)
2012-07-10 23:54 UTC, William Jon McCann
none Details | Review
Enable more warnings with git (855 bytes, patch)
2012-07-10 23:54 UTC, William Jon McCann
none Details | Review
Add a recent files backend (24.63 KB, patch)
2012-07-11 15:41 UTC, William Jon McCann
none Details | Review
Add a recent files backend (24.88 KB, patch)
2012-07-11 18:41 UTC, William Jon McCann
committed Details | Review
Enable more warnings with git (1.01 KB, patch)
2012-07-13 14:09 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-07-10 23:53:55 UTC
After discussing bug 325824 with Cosimo we thought it might be nice to implement this using a recent files backend.
Comment 1 William Jon McCann 2012-07-10 23:54:39 UTC
Created attachment 218493 [details] [review]
Add a recent files backend
Comment 2 William Jon McCann 2012-07-10 23:54:42 UTC
Created attachment 218494 [details] [review]
Enable more warnings with git
Comment 3 Tomas Bzatek 2012-07-11 14:06:46 UTC
Review of attachment 218493 [details] [review]:

Looks good otherwise, code is clean and readable.

::: configure.ac
@@ +562,3 @@
+dnl ****************************
+
+PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0])

Any dependency on gtk should be made conditional. GVfs can be very well used without gtk3 and outside Gnome.
Comment 4 Tomas Bzatek 2012-07-11 14:23:09 UTC
Review of attachment 218494 [details] [review]:

Btw. the --enable-more-warnings configure switch is disabled by default and it's not used in autogen.sh. The test logic just seems wrong, disabling warnings when explicitly asked for but no .git directory has been found?

The messages about using -Werror are wrong the same way, it's not included in CFLAGS even when --enable-more-warnings is active.

::: configure.ac
@@ +757,3 @@
 set_more_warnings="$enableval",[
+if test -f $srcdir/.git; then
+	is_git_version=true

is_{cvs,git}_version variable is not used anywhere, suggesting to remove it.
Comment 5 William Jon McCann 2012-07-11 15:41:33 UTC
Created attachment 218566 [details] [review]
Add a recent files backend

Made dep conditional, added file delete support, better clean up
at exit.
Comment 6 Cosimo Cecchi 2012-07-11 16:03:19 UTC
Review of attachment 218566 [details] [review]:

A couple of quick things I saw in passing

::: daemon/gvfsbackendrecent.c
@@ +633,3 @@
+
+  g_hash_table_destroy (backend->items);
+  g_hash_table_destroy (backend->uri_map);

Need to clear the file monitors here as well.

@@ +635,3 @@
+  g_hash_table_destroy (backend->uri_map);
+
+  g_signal_handlers_disconnect_by_func (backend->recent_manager, on_recent_manager_changed, backend);

You don't seem to be chaining up to the parent finalize method.
Comment 7 William Jon McCann 2012-07-11 18:41:44 UTC
Created attachment 218583 [details] [review]
Add a recent files backend

Addresses Cosimo's comments and uses a standard attribute
for the real-uri instead of our own.
Comment 8 Tomas Bzatek 2012-07-13 13:52:34 UTC
Review of attachment 218583 [details] [review]:

Looks good to me, thanks for adding the extra configure check. Tested in nautilus, seems to be working fine, files can be read and deleted.
Comment 9 William Jon McCann 2012-07-13 14:09:37 UTC
Created attachment 218729 [details] [review]
Enable more warnings with git
Comment 10 William Jon McCann 2012-07-13 14:22:44 UTC
Attachment 218583 [details] pushed as e3890dd - Add a recent files backend
Attachment 218729 [details] pushed as 86137e5 - Enable more warnings with git