[Vm-dev] Add shortcut button on FileChooser dialog of Scratch 1.4
tim Rowledge
tim at rowledge.org
Mon Mar 24 16:55:24 UTC 2014
vm-dev probably isn’t the best possible place to discuss Scratch code changes, but since we’re here -
you’ve got the basic idea ok. You just need to actually implement the #usb method (using your example below). Take a look at implementors of #myComp, #myHome, #scratchBackgrounds etc. for inspiration.
On 24-03-2014, at 8:39 AM, Gustavo Duarte <gus.duarte at gmail.com> wrote:
> Hi folks,
>
> I would like add a USB shortcut button on "Project Save As" File Chooser Dialog of Scratch 1.4 on Gnome.
>
> I'm looking for a similar behavior that Scratch has on Sugar.
>
> Currently File Chooser dialogue has myComputer, Home, Project directory short cuts, I want add another one shortcut for USB.
>
> I guess that I should modify
>
> ScratchFileChooserDialog.addShortcutButtons method, but i'm not sure how.
>
> I think the change needed could be like something that:
>
> shortcutColumn addMorphBack: ( self shortcutButtonLabel:
> self labelForUsbFolder
> action: #usb
> icon #folderUsb),
>
> So, beside that, I have to add a kind of handler to the action, right ? How can I do that ?
>
>
> Sorry if this kind of question isn't fit to this foro.
>
> Thanks in advance.
>
> Gustavo.
>
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: RBR: Remove Bits Randomly
More information about the Vm-dev
mailing list