Attempting to redefine a shortcut, get a button to launch FireFox Thread last updated on 2004-02-23 17:53:58

Posted by member 75348 on 2004-02-23 05:20:51

Ok, I'm trying to alter a single button on my desktop. It currently brings up my D:\ drive when I left-click it.

(I'm using Glaze, the most recent version, if it matters)

Anyway, I look in themevars.rc and find the following:


;--> Choose what folder to display for Quick Access popup

quickaccess "D:\"

and in base.rc:

;------------------------------------------------------------------------------
; shortcut2 config
;------------------------------------------------------------------------------


If QuickAccessOn = true
*shortcut "Quick Access" $priLeft+Divide05X+Divide05Width$ $priBottom-20$ shortcut.png shortcuta.png

shortcutb.png #12T !PopupDynamicfolder $quickaccess$ x=$priLeft+Divide05X+Divide05Width$ y=$priBottom-20$

left bottom
QuickLaunchWidth 20
Else
QuickLaunchWidth 0
Endif

Taken together, it's pretty clear to me what they're doing. The bit from themevars.rc seems to be defining where that !PopupDynamicfolder is going to look.

The problem is that I don't know how to tell them to do something different.

I've nosed around in a few themes that have quick launch buttons that I know work and I managed to come up with the following.
themevars.rc:


;--> Choose what folder to display for Quick Access popup

QAname "FireFox"
QA "$Browser$"

and in base.rc:
;------------------------------------------------------------------------------
; shortcut2 config
;------------------------------------------------------------------------------


If QuickAccessOn = true
*shortcut "$QAname$" $priLeft+Divide05X+Divide05Width$ $priBottom-20$ shortcut.png shortcuta.png shortcutb.png #12o "$QA$" x=$priLeft+Divide05X+Divide05Width$ y=$priBottom-20$ left bottom
QuickLaunchWidth 20
Else
QuickLaunchWidth 0
Endif

So I've defined the browser and it's name, and I ditched the !PopupDynamicfolder bang. I know I'm doing something right because the button is correctly displaying "FireFox" when I roll over it with my mouse. The problem is that there's big difference in the syntax used by this particular theme and I'm not sure what the latter part of it does. I based the changes I made off of the base.rc file in Simplicity:
*shortcut "$SCBAR4Name$" 155 -20 scbar1.bmp scbar1a.bmp .none #12o "$SCBAR4$"


Nothing follows the final reference to SCBAR4 there, which is defined as $Browser$ in the themevars.rc file for that theme... but I can't just chuck those final lines (I've tried) so that's clearly not the problem.

I'm banging my head against the wall here, it seems. None of the faqs I've found gave me a clear indication of what to do. I would greatly appreciate any help any of you might offer.

Posted by member 75348 on 2004-02-23 07:20:32 link

I would just like to point out that I am an idiot who doesn't pay close enough attention to brackets.

Carry on.

Posted by member 2111 on 2004-02-23 17:53:58 link

If you just need to point the quick access to another program, just change what quickaccess points to -

quickaccess "c:\path to program"

If the path has spaces in it, you will need to enclose the $quickaccess$ variable in " " like "$quickaccess$" in the base.rc file

If you are trying to add extra quick access buttons, try this

themevars.rc

;--> Choose what folder to display for Quick Access popup

quickaccess1 "c:\path"
quickaccess2 "d:\path"
quickaccess3 "e:\path"


and in base.rc it should look like -

;------------------------------------------------------------------------------
; shortcut2 config
;------------------------------------------------------------------------------


If QuickAccessOn = true
*shortcut "Some Name" $priLeft+Divide05X+Divide05Width$ $priBottom-20$ shortcut.png shortcuta.png shortcutb.png #12T !PopupDynamicfolder "$quickaccess1$" x=$priLeft+Divide05X+Divide05Width$ y=$priBottom-20$ left bottom
*shortcut "Something" $priLeft+Divide05X+Divide05Width+20$ $priBottom-20$ shortcut.png shortcuta.png shortcutb.png #12T !PopupDynamicfolder "$quickaccess2$" x=$priLeft+Divide05X+Divide05Width+20$ y=$priBottom-20$ left bottom
*shortcut "Some More" $priLeft+Divide05X+Divide05Width+40$ $priBottom-20$ shortcut.png shortcuta.png shortcutb.png #12T !PopupDynamicfolder "$quickaccess3$" x=$priLeft+Divide05X+Divide05Width+40$ y=$priBottom-20$ left bottom
QuickLaunchWidth 20
Else
QuickLaunchWidth 0
Endif


;------------------------------------------------------------------------------
; Label config
;------------------------------------------------------------------------------

labels Divide04

Divide04X $Divide05X+Divide05Width+QuickLaunchWidth+40$


The important part in base.rc is to change the width by an extra 20 for each extra button that is needed

I'm not sure if that answers your question though.