Bug 15958

Summary: "Save media as" button does nothing by default
Product: swfdec Reporter: Matthew Paul Thomas <mpt>
Component: pluginAssignee: swfdec ml <swfdec>
Status: RESOLVED FIXED QA Contact: swfdec ml <swfdec>
Severity: minor    
Priority: medium    
Version: 0.6.0   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: select first media url by default
select first media url by default try 2
select first media url by default try 3

Description Matthew Paul Thomas 2008-05-16 03:36:29 UTC
swfdec-mozilla 0.6.0-2ubuntu1, Ubuntu 8.04

1. Go to a Web page containing a Flash object.
2. Right-click on the object and choose "Properties".
3. In the properties window, click "Save media as".

What should happen: A filepicker appears.
What actually happens: Nothing.

I think two things should be changed here:
(a) the first item in the list should be selected by default;
(b) either the "Save media as" button should be insensitive when no item is selected, or it should be impossible to not have an item selected.
Comment 1 Riccardo Magliocchetti 2008-05-21 02:37:25 UTC
Created attachment 16661 [details] [review]
select first media url by default

Make sense, attached a patch that implement your suggestion a): the first media url is selected by default.
Comment 2 Riccardo Magliocchetti 2008-05-21 08:33:52 UTC
Created attachment 16662 [details] [review]
select first media url by default try 2

New revision of the patch with this changes:
Use gtk_tree_path_new_from_indices instead of gtk_tree_path_new_from_string which looks like more cheap and fix leaking of the path as pointed out by Company.
Comment 3 Riccardo Magliocchetti 2008-05-22 07:43:20 UTC
Created attachment 16682 [details] [review]
select first media url by default try 3

New revision of the patch:
- set the selection mode so that there is always one element selected
- move the code where more appropriate
Comment 4 Benjamin Otte 2008-05-24 02:30:06 UTC
commit d673e1ffe79ac7be521f7b5bc17ea50db408603d
Author: Riccardo Magliocchetti <riccardo@datahost.it>
Date:   Sat May 24 11:28:44 2008 +0200

    select first media url by default (fixes #15958)
    
    Also set the selection mode so that there is always one element selected

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.