2008/11/3 Aaron J. Seigo <[EMAIL PROTECTED]> > On Monday 03 November 2008, Richard Dale wrote: >
> > One little thing that would be nice, is to be able to specify a different > > name for the main file in a plasmoid so that we can have main.rb, main.py > > etc without needing to have a new package structure plugin just to be > able > > to do that. > > i thought that was why we added the virtual mainScript method to > ScriptEngine, > but evidently that's not good enough. No the problem is that in Plasma::Package::isValid() there is this test: foreach (const char *file, d->structure->requiredFiles()) { if (!QFile::exists(d->basePath + d->structure->contentsPrefix() + d->structure->path(file))) { kWarning() << "Could not find required file" << file << ", look in" << d->basePath + d->structure->contentsPrefix() + d->structure->path(file) << endl; d->valid = false; return false; } } And it doesn't use the mainScript() method to get the name of the file to check, so you get this error: plasmoidviewer(12281)/libplasma Plasma::Applet::load: we have a script using the "ruby-script" API plasmoidviewer(12281)/libplasma Plasma::Package::isValid: Could not find required file mainscript , look in "/home/rdale/.kde/share/apps/plasma/plasmoids/test_ruby/contents/code/main" There is a space after 'mainscript' before the comma in the error text, which looks like a bug. > > > something that occured to me is that you could always use the mainscript > file > to load 'main.py', no? one more bit of indirection, but you get your syntax > highlighting that way .. > > not overly elegant of course ... i'm seriously not impressed that we're > looking at such complexity because of syntax highlighting in editors. =/ I think that's uglier than needing special package subclasses though. But the big problem with custom packages for ruby and python is that they're supposed to be translated and we will need to duplicate the i18n strings from the default plasmoid package .desktop file. -- Richard
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel