Shawn - wouldn't the best place to put personal style sheets be into
%appdata%? It seems to me that if we bite the bullet and use appdata, we
make sure that we're not going to run into UAC issues in Vista, while also
ensuring that one user's change doesn't walk over the top of another user
when you have shared computers. 


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:dqsd-devel-
> [EMAIL PROTECTED] On Behalf Of Shawn K. Hall
> Sent: August-07-08 5:27 PM
> To: 'DQSD development discussions'
> Subject: Re: [DQSD-Devel] Theme improvements(?)
> 
> I like the change, too.
> 
> We'll need to include the users' personal stylesheet as well, though,
> as
> it's important to be able to style it for when the default doesn't work
> for you.
> 
> The default classic theme is now a lot better (if I do say so myself),
> but because I use a multiline toolbar, I've had to add a couple styles
> to it to ensure that the clock and date are multiple lines and
> centered.
> My personal changes had to go into "localsearch.css", in order to get
> the effect I wanted.
> 
> Of course, if we used a standard naming convention, we might be able to
> avoid that as well. :)
> 
> Something like ("/themes/%themename%/")
>    ./style.css  -  default stylesheet applied 100% of the time
>    ./single.css  -  stylesheet imported when DQSD is on a single-row
> taskbar
>    ./multiple.css  -  stylesheet imported when DQSD is on a multi-row
> taskbar
> 
> Easier JS code would be something like:
> 
> <script type='text/jscript'>
> document.write("<style type='text/css'>");
> document.write("@import url(./themes/" + sanitize(themename) + "/" +
> (multiline ? 'multiple' : 'single') + ".css);");
> document.write("</style>");
> </script>
> 
> This would require that the "themename" be stored somewhere within the
> user preferences script (which would default to something useful within
> the global prefs). Instead of duplicating the stylesheet when a new one
> is selected, the themename can be drawn from a new script file which
> consists of only:
>   themename="whatever";
> This script file (theme.js?) would be called after the global prefs but
> before localprefs (just in case they wanted to push something else over
> it in the user prefs).
> 
> An added benefit of this method would be that different user accounts
> could have independent themes (when we finally support appdata
> correctly), and we wouldn’t have to touch the install folder.
> 
> Also, the "sanitize" function doesn’t exist yet, but it would strip out
> all characters that didn’t match "[a-z0-9\s\.\-]", in order to prevent
> something from using DQSD as an infection or escalation vector in the
> future.
> 
> 
> If we can agree on a structure, I'll happily rewrite and reorg the
> themes.
> 
> -Shawn
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf
> > Of Charlie Russel
> > Sent: Thursday, August 07, 2008 12:45 PM
> > To: DQSD development discussions
> > Subject: Re: [DQSD-Devel] Theme improvements(?)
> >
> > I like this change, Kim. It solves the vista issues nicely, and will
> > continue to give us an easy way to add themes as versions
> > change without
> > messing up the base install folder which is, as you point
> > out, getting a bit
> > messy.
> >
> > I also think doing something similar for calendars would be a
> > good thing.
> > Again, they would thus be "per user" and not require admin
> > rights to change.
> >
> > Obviously, we'd have to be reading a localprefs file in the
> > %appdata%\DQSD
> > folder.
> >
> > Charlie.
> > http://msmvps.com/blogs/xperts64
> > http://mvp.support.microsoft.com/profile/charlie.russel
> >
> >
> > ----- Original Message -----
> > From: "Kim Gräsman" <[EMAIL PROTECTED]>
> > To: "DQSD development discussions" <[email protected]>
> > Sent: Thursday, August 07, 2008 12:34 PM
> > Subject: [DQSD-Devel] Theme improvements(?)
> >
> >
> > > Hello devs,
> > >
> > > I think the current theming is a little noisy--all the
> > files are just
> > > dumped in the install directory, and it's hard to tell which
> bitmaps
> > > go with which theme, etc.
> > >
> > > I started a new "convention" with the Vista theme, and
> > added it under
> > > %INSTDIR%\themes\vista -- if every theme is a folder, it can
> contain
> > > all necessary resources. Does that make sense to you all, or am I
> > > stepping on something?
> > >
> > > Also, I'm considering a new method for theme selection, whereby the
> > > current theme files are always located in the user's appdata
> folder,
> > > so that a user can switch themes without needing write access to
> the
> > > install dir.
> > >
> > > I haven't looked into this closely, but I'm thinking something
> like:
> > >
> > > // file structure
> > > instdir\themes
> > >     Blue
> > >          // theme css and bitmaps go here...
> > >     Classic
> > >     Royale
> > >     Vista
> > >     Vista Widescreen
> > >
> > > // search.htm
> > > <script type='text/jscript'>
> > > document.write("<link rel='stylesheet' type='text/css' href='" +
> > > buildCurrentThemeUrl(); + "'>");
> > > </script>
> > >
> > > // tools.js or simiilar
> > > function buildCurrentThemeUrl()
> > > {
> > >    // maybe some trickery here to detect whether a theme css is in
> > > place, or something...
> > >    return Launcher.AppDataDirectory + "\\" + theme.css
> > > }
> > >
> > > I don't know, it's not exactly clear in my head, but this general
> > > structure would give a couple of nice benefits:
> > >
> > > - Themes can be implicitly named by the folder name under /themes/
> > > - We can enumerate the available themes by listing the
> > folders under
> > > /themes/
> > > - Themes are per-user at this point, so Admin and Kim can both use
> > > DQSD on the same machine with different themes.
> > > - Non-privileged users can change themes, because we're only
> > > overwriting per-user data
> > >
> > > So... What am I missing? :)
> > >
> > > Thanks,
> > > - Kim
> > >
> > >
> > --------------------------------------------------------------
> > -----------
> > > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > > challenge
> > > Build the coolest Linux based applications with Moblin SDK
> > & win great
> > > prizes
> > > Grand prize is a trip for two to an Open Source event
> > anywhere in the
> > > world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > > _______________________________________________
> > > Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel
> > >
> >
> >
> > --------------------------------------------------------------
> > -----------
> > This SF.Net email is sponsored by the Moblin Your Move
> > Developer's challenge
> > Build the coolest Linux based applications with Moblin SDK &
> > win great prizes
> > Grand prize is a trip for two to an Open Source event
> > anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel
> >
> 
> 
> 
> -----------------------------------------------------------------------
> --
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Archive: https://lists.sourceforge.net/lists/listinfo/dqsd-devel

Reply via email to