Hook up etoys projects
This commit is contained in:
parent
c49c8150d2
commit
1f61c5f65e
@ -1,4 +1,4 @@
|
||||
geckoconfdir = $(pkgdatadir)
|
||||
geckoconf_DATA = gecko-prefs.js
|
||||
geckoconf_DATA = gecko-prefs.js mime.types
|
||||
|
||||
EXTRA_DIST = $(geckoconf_DATA)
|
||||
|
1
lib/data/mime.types
Normal file
1
lib/data/mime.types
Normal file
@ -0,0 +1 @@
|
||||
application/x-squeak-project pr
|
@ -135,6 +135,8 @@ sugar_browser_startup(const char *profile_path, const char *profile_name)
|
||||
prefService->GetBranch ("", getter_AddRefs(pref));
|
||||
NS_ENSURE_TRUE(pref, FALSE);
|
||||
|
||||
pref->SetCharPref ("helpers.private_mime_types_file", SHARE_DIR"/mime.types");
|
||||
|
||||
rv = prefService->ReadUserPrefs (nsnull);
|
||||
if (NS_FAILED(rv)) {
|
||||
g_warning ("failed to read user preferences, error: %x", rv);
|
||||
|
@ -146,6 +146,26 @@ class RtfFileType(TextFileType):
|
||||
return mime_type in cls._types
|
||||
matches_mime_type = classmethod(matches_mime_type)
|
||||
|
||||
class SqueakProjectFileType(FileType):
|
||||
|
||||
_types = set(['application/x-squeak-project'])
|
||||
|
||||
def get_name(self):
|
||||
return _('Squeak project')
|
||||
|
||||
def get_icon(self):
|
||||
return 'theme:object-squeak-project'
|
||||
|
||||
def get_preview(self):
|
||||
return ''
|
||||
|
||||
def get_activity(self):
|
||||
return 'org.vpri.EtoysActivity'
|
||||
|
||||
def matches_mime_type(cls, mime_type):
|
||||
return mime_type in cls._types
|
||||
matches_mime_type = classmethod(matches_mime_type)
|
||||
|
||||
class OOTextFileType(FileType):
|
||||
|
||||
_types = set(['application/vnd.oasis.opendocument.text'])
|
||||
@ -193,6 +213,7 @@ class TypeRegistry:
|
||||
self._types.append(UriFileType)
|
||||
self._types.append(ImageFileType)
|
||||
self._types.append(TextFileType)
|
||||
self._types.append(SqueakProjectFileType)
|
||||
|
||||
def get_type(self, formats):
|
||||
for file_type in self._types:
|
||||
|
@ -1,6 +1,6 @@
|
||||
VERSION=0.63
|
||||
DATE=`date +%Y%m%d`
|
||||
RELEASE=2.57
|
||||
RELEASE=2.58
|
||||
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
|
||||
|
||||
rm sugar-$VERSION.tar.bz2
|
||||
|
Loading…
Reference in New Issue
Block a user