Opened 12 years ago

Closed 8 years ago

Last modified 8 years ago

#834 closed enhancement (fixed)

Let activity use its own MIME type in ObjectChooser

Reported by: alsroot Owned by: erikos
Priority: Unspecified by Maintainer Milestone:
Component: Sugar Version: 0.84.x
Severity: Unspecified Keywords:
Cc: sayamindu, bert, eben, erikos Distribution/OS: Unspecified
Bug Status: Assigned

Description

At present(for 0.84) activity can use limited set of mime types - sugar.mime.GENERIC_TYPE_*, but many activities use another mimes(like text/plain(only), application/zip, etc)

Change History (12)

comment:1 Changed 12 years ago by alsroot

just an option - pass hash of custom MIME types to ObjectChooser():
ObjectChooser(what=('My filter', ['text/plain', 'application/zip']))

comment:2 Changed 12 years ago by sayamindu

  • Cc sayamindu added

comment:3 Changed 12 years ago by bert

  • Cc bert added

For better flexibility in a future implementation I'd make the parameter an array of filter specs (D-Bus signature 'aa{sv}'):

[
  {
    'name': 'Localized filter name one',
    'icon': 'first-icon-name',
    'mimetypes': ['first/mime-type', 'second/mime-type']
  },
  {
    'name': 'Localized filter name two',
    'icon': 'second-icon-name',
    'mimetypes': ['some/mime-type', 'other/mime-type']
  }
]

That way, additional properties could be passed, and unknown ones ignored, providing a forwards and backwards-compatible API. The API would not need to change if there were additional allowed filter properties.

comment:4 Changed 12 years ago by tomeu

  • Cc eben added

Eben, the last proposed design mockups play well with what Bert is proposing?

comment:5 Changed 12 years ago by erikos

  • Bug Status changed from Unconfirmed to Assigned
  • Cc erikos added

comment:7 Changed 12 years ago by tomeu

  • Milestone changed from 0.86 to 0.88

don't see this happening for 0.86, please help

comment:8 Changed 11 years ago by walter

  • Milestone changed from 0.88 to 0.90

No patch. 0.90?

comment:9 Changed 9 years ago by erikos

  • Milestone changed from 0.90 to 1.0
  • Owner changed from tomeu to erikos
  • Status changed from new to assigned

Came up again with the request of adding mime-types to the generic ones in sugar-base to use in the objectchooser filter.

http://lists.sugarlabs.org/archive/sugar-devel/2012-August/039192.html

comment:10 Changed 9 years ago by erikos

Related topic for the better mime type support: http://bugs.sugarlabs.org/ticket/3826

comment:11 Changed 8 years ago by dnarvaez

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:12 Changed 8 years ago by dnarvaez

  • Milestone 1.0 deleted

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.