Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement filter by mime types used by activities in the objectchooser #22

Closed
wants to merge 1 commit into from
Closed

Implement filter by mime types used by activities in the objectchooser #22

wants to merge 1 commit into from

Conversation

godiard
Copy link
Contributor

@godiard godiard commented Jun 19, 2013

Add a optative parameter use_mime_types to ObjectChooser constructor.
If this parameter is True, the parameter what_filter should be a
bundle_id, and the filter will be set to the collection of mime types
the activity can manage, as configured in the activity.info file.
The title in the toolbar is changed, and the what_filter combo
is not visible when this parameter is used.

A example of use is:

chooser = ObjectChooser(parent=self, what_filter=self.get_bundle_id(),
use_mime_types=True)

This patch need a change in sugar-toolkit-gtk3 because a paramter was
added.

Signed-off-by: Gonzalo Odiard gonzalo@laptop.org

Add a optative parameter use_mime_types to ObjectChooser constructor.
If this parameter is True, the parameter what_filter should be a
bundle_id, and the filter will be set to the collection of mime types
the activity can manage, as configured in the activity.info file.
The title in the toolbar is changed, and the what_filter combo
is not visible when this parameter is used.

A example of use is:

chooser = ObjectChooser(parent=self, what_filter=self.get_bundle_id(),
                        use_mime_types=True)

This patch need a change in sugar-toolkit-gtk3 because a paramter was
added.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
@godiard
Copy link
Contributor Author

godiard commented Jun 19, 2013

Comment: I am not in love with the name of the parameter "use_mime_types". If there are better ideas, we can change it.

@dnarvaez
Copy link
Contributor

Maybe filter_type generic/mime/activity or something?

@walterbender
Copy link
Member

+1 to filter_type= more future proof

@godiard
Copy link
Contributor Author

godiard commented Jun 19, 2013

Ok. Closing to change the api

@godiard godiard closed this Jun 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants