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 680647 - Screen Recorder doesn't add video recordings to Recently Used
Screen Recorder doesn't add video recordings to Recently Used
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-07-26 13:18 UTC by D.S. (Spider) Ljungmark
Modified: 2012-10-26 17:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
recorder: Clean up stage lifetime handling (1.80 KB, patch)
2012-07-26 21:56 UTC, Ray Strode [halfline]
committed Details | Review
recorder: keep recorder object alive until pipeline finishes (1.73 KB, patch)
2012-07-26 21:56 UTC, Ray Strode [halfline]
committed Details | Review
recorder: keep test-recorder alive until done recording (1.22 KB, patch)
2012-07-26 21:56 UTC, Ray Strode [halfline]
committed Details | Review
recorder: save recorded video as recent item (2.89 KB, patch)
2012-07-26 21:56 UTC, Ray Strode [halfline]
needs-work Details | Review
recorder: rename "filename" property to "file-template" (18.42 KB, patch)
2012-10-25 22:19 UTC, Ray Strode [halfline]
committed Details | Review
recorder: save recorded video as recent item (11.15 KB, patch)
2012-10-25 22:19 UTC, Ray Strode [halfline]
needs-work Details | Review
recorder: save recorded video as recent item (11.11 KB, patch)
2012-10-26 15:47 UTC, Ray Strode [halfline]
committed Details | Review

Description D.S. (Spider) Ljungmark 2012-07-26 13:18:36 UTC
When taking a recorded video ( ctrl shift alt R , twice ) and trying to attach it in a bug report, I get the "recently used" by default, but the recently used recording isn't in the list.

Suggestion:
  Either add the video to the list of "recently used" or change the default for the file browser to not be "recently used" if "recently used" doesn't do what it says it does.
Comment 1 Ray Strode [halfline] 2012-07-26 21:56:00 UTC
Created attachment 219713 [details] [review]
recorder: Clean up stage lifetime handling

The stage is a floating object. We don't own a reference
to it, so we shouldn't unref it.

This commit removes the erroneous unref call and makes sure
we call clutter_actor_destroy on the stage when we're done
with it.
Comment 2 Ray Strode [halfline] 2012-07-26 21:56:02 UTC
Created attachment 219714 [details] [review]
recorder: keep recorder object alive until pipeline finishes

We want to make sure the recorder isn't finalized until the
saved recording hits disk.  This means the pipeline object needs
a hard reference on the recorder.
Comment 3 Ray Strode [halfline] 2012-07-26 21:56:05 UTC
Created attachment 219715 [details] [review]
recorder: keep test-recorder alive until done recording

Recording continues for some time after the recorder object
is closed, since closing isn't a synchronous operation.

This commit defers quiting the test-recorder application until
the recording is finished.
Comment 4 Ray Strode [halfline] 2012-07-26 21:56:08 UTC
Created attachment 219716 [details] [review]
recorder: save recorded video as recent item

Often the first thing a user wants to do after making a recording,
is posting it somewhere.

This commit adds the video to recently used items, so that it shows
up prominently in open file choosers.
Comment 5 Colin Walters 2012-07-26 22:03:18 UTC
Review of attachment 219713 [details] [review]:

::: src/test-recorder.c
@@ +20,3 @@
     }
 
+  clutter_actor_destroy (stage);

This commit is talking about the unref call, but you also seem to have deleted the call to clutter_main_quit().  That doesn't seem right.
Comment 6 Colin Walters 2012-07-26 22:14:05 UTC
Review of attachment 219714 [details] [review]:

The fact that the old code seems to have went out of its way to avoid a reference (with an explicit comment!) makes me nervous about this.  I don't see a problem immediately with holding the ref; at least there's no apparent circularity.

Probably Owen should review this one.
Comment 7 Ray Strode [halfline] 2012-07-26 22:16:09 UTC
Review of attachment 219713 [details] [review]:

::: src/test-recorder.c
@@ +23,1 @@
 

The code calls clutter_main_quit when the stage is destroyed.  I could improve the commit message to mention that.  clutter_main_quit is wrong, since it means the stage won't get destroyed (albeit that's probably harmless)
Comment 8 Colin Walters 2012-07-26 22:20:14 UTC
Review of attachment 219715 [details] [review]:

::: src/test-recorder.c
@@ +23,3 @@
+                         (GWeakNotify)
+                         clutter_actor_destroy,
+                         stage);

This is just test code so...whatever, but it seems like a cleaner fix would be to watch a "state" property on the recorder or something.

Anyways this is fine though.
Comment 9 Colin Walters 2012-07-26 22:21:04 UTC
Review of attachment 219716 [details] [review]:

Makes sense.
Comment 10 Ray Strode [halfline] 2012-07-26 22:25:53 UTC
i'll hold off on committing attachment 219716 [details] [review] until owen chimes in on attachment 219714 [details] [review] (also i need to fix the s/, is posting/is post/ typo in the commit message)
Comment 11 Owen Taylor 2012-10-02 14:06:51 UTC
Review of attachment 219714 [details] [review]:

It's certainly safer and more natural to not have a reference loops - so that's probably why I wrote it without that. But if we need to have a reference loop until the pipelines finish, I don't see a problem with that.
Comment 12 Ray Strode [halfline] 2012-10-25 20:06:21 UTC
Review of attachment 219716 [details] [review]:

Previously, I just looked at ~/.local/share/recently-used.xbel to confirm an entry was added. Today before pushing I did some better testing and this patch needs more work (or we need one more prerequisite patch)

::: src/shell-recorder.c
@@ +1465,3 @@
+      recent_manager = gtk_recent_manager_get_default ();
+
+      file = g_file_new_for_path (recorder->filename);

recorder->filename is a file pattern with substitution variables not a filename.
Comment 13 Ray Strode [halfline] 2012-10-25 22:19:54 UTC
Created attachment 227311 [details] [review]
recorder: rename "filename" property to "file-template"

The filename property is actually a template string with
substitution variables, not a filename.

This commit renames for clarity.
Comment 14 Ray Strode [halfline] 2012-10-25 22:19:57 UTC
Created attachment 227312 [details] [review]
recorder: save recorded video as recent item

Often the first thing a user wants to do after making a recording
is post it somewhere.

This commit adds the video to recently used items, so that it shows
up prominently in open file choosers.
Comment 15 Florian Müllner 2012-10-26 11:26:46 UTC
Review of attachment 227312 [details] [review]:

Untested? ;-)

::: src/shell-recorder.c
@@ +1224,3 @@
 
+          if (outfilename != NULL)
+              *outfilename = g_string_free (filename, FALSE);

This is wrong - if filename is not an absolute path (like our default of "Screencast from some time"), get_absolute_path() will resolve to $XDG_VIDEOS_DIR/filename.

You could do

  if (outfilename != NULL)
    *outfilename = path;
  else
    g_free (path);

to avoid the extra strdup I guess
Comment 16 Florian Müllner 2012-10-26 11:28:21 UTC
Review of attachment 227311 [details] [review]:

This one looks good to me
Comment 17 Ray Strode [halfline] 2012-10-26 15:42:47 UTC
(In reply to comment #15)
> Review of attachment 227312 [details] [review]:
> 
> Untested? ;-)
Nope, I tested it, I promise! (see comment 12)

For some reason my ~/.config/user-dirs.dirs has this in it:

XDG_VIDEOS_DIR="$HOME/"

no idea why.  Also my XDG_MUSIC_DIR is $HOME... weird.
Comment 18 Ray Strode [halfline] 2012-10-26 15:47:33 UTC
Created attachment 227369 [details] [review]
recorder: save recorded video as recent item

Often the first thing a user wants to do after making a recording
is post it somewhere.

This commit adds the video to recently used items, so that it shows
up prominently in open file choosers.
Comment 19 Florian Müllner 2012-10-26 16:06:25 UTC
Review of attachment 227369 [details] [review]:

Looks good, thanks!
Comment 20 Ray Strode [halfline] 2012-10-26 17:30:02 UTC
Attachment 219713 [details] pushed as f9819eb - recorder: Clean up stage lifetime handling
Attachment 219714 [details] pushed as 9171bab - recorder: keep recorder object alive until pipeline finishes
Attachment 219715 [details] pushed as 92033ce - recorder: keep test-recorder alive until done recording
Attachment 227311 [details] pushed as fbeb446 - recorder: rename "filename" property to "file-template"
Attachment 227369 [details] pushed as eb09f34 - recorder: save recorded video as recent item