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 747601 - Totem should add screenshots to "Recent" list
Totem should add screenshots to "Recent" list
Status: RESOLVED OBSOLETE
Product: totem
Classification: Core
Component: Plugins
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-04-10 06:47 UTC by Frank Dana
Modified: 2018-05-24 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot: Add screenshots to "Recent" list (2.51 KB, patch)
2016-12-23 23:29 UTC, gnome.vrb
needs-work Details | Review

Description Frank Dana 2015-04-10 06:47:56 UTC
When Totem internally captures a video screenshot (with Ctrl+Alt+S or via the menus), the resulting .png file does not appear in Nautilus' Recent list. 

Screenshots created with other methods (such as the Shell's gnome-screenshot integration) immediately appear in the Recent list for easy access.
Comment 1 Bastien Nocera 2015-04-10 12:45:28 UTC
Sure, looks easy enough to implement.
Comment 2 gnome.vrb 2016-12-23 23:29:38 UTC
Created attachment 342438 [details] [review]
screenshot: Add screenshots to "Recent" list
Comment 3 Bastien Nocera 2017-01-02 15:44:48 UTC
Review of attachment 342438 [details] [review]:

::: src/plugins/screenshot/totem-screenshot-plugin.c
@@ +69,3 @@
 	TotemScreenshotPlugin *plugin;
 	GdkPixbuf *pixbuf;
+	gchar *save_uri;

Use "char" please.

@@ +87,3 @@
+	GtkRecentManager *recent_manager;
+	static gchar *mime_type = "image/png";
+	static gchar *groups[2] = { "Graphics", NULL };

You can omit the "2" so it automatically has the correct size.

@@ +99,3 @@
+	recent_data.description = NULL;
+	recent_data.mime_type = mime_type;
+	recent_data.app_name = (gchar *) g_get_application_name ();

I think you should remove the app_name, and app_exec, if GtkRecentManager allows that, so that the default application is used. We won't be able to see what the default app is when running sandboxed anyway.

@@ +151,3 @@
 	}
 
+	job->save_uri = (gchar *) g_file_get_uri (G_FILE (source));

No need to cast it.
Comment 4 chris 2017-01-30 16:06:06 UTC
Came here to file an RFE to add a keybinding for "Take Screenshot". Due to the description of the bug, I now know it's Ctrl-Alt-S. Thanks! Doesn't show up in the keyboard shortcut help page though :-/
Comment 5 Frank Dana 2017-01-31 12:21:21 UTC
(In reply to chris from comment #4)

Yeah, that binding's not in the manpage either, now that I look. I honestly can't recall how I even found it. It's entirely possible I read the source.
Comment 6 Bastien Nocera 2017-01-31 14:50:21 UTC
(In reply to chris from comment #4)
> Came here to file an RFE to add a keybinding for "Take Screenshot". Due to
> the description of the bug, I now know it's Ctrl-Alt-S. Thanks! Doesn't show
> up in the keyboard shortcut help page though :-/

It's in the help page now, thanks.
Comment 7 chris 2017-01-31 15:29:02 UTC
(In reply to Bastien Nocera from comment #6)
> (In reply to chris from comment #4)
> > Came here to file an RFE to add a keybinding for "Take Screenshot". Due to
> > the description of the bug, I now know it's Ctrl-Alt-S. Thanks! Doesn't show
> > up in the keyboard shortcut help page though :-/
> 
> It's in the help page now, thanks.

Thanks! I'd left this in my inbox to file a specific RFE but you've saved me the time.

Cheers!
Comment 8 GNOME Infrastructure Team 2018-05-24 11:02:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/totem/issues/139.