MozillaZine

Custom folder icons in Firefox Bookmark Manager

Discuss application theming and theme development.
Scipio
 
Posts: 188
Joined: August 21st, 2006, 6:17 pm
Location: New York

Post Posted July 9th, 2007, 5:16 pm

I've given a few of my Bookmark folders custom icons to locate them better, but they don't show in either Bookmark Manager or the sidebar. I've tried adding code to UserChrome and just can't seem to get them to show. This attempt added the custom icon to every line in the Location and Description columns (colorful, but not what I wanted) but I can't seem to get it to target the folder.
Code: Select all
#bookmarks-view treechildren, #bookmark-item[container="true"][label="Motels"] {
  list-style-image: url('file://C:/Icons/Folder[P].ico') !important;
  -moz-image-region: rect(0px 16px 16px 0px) !important;
}

I would appreciate any help.

CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted July 11th, 2007, 2:01 pm

I, too, am interested in knowing if this is possible to do. In testing, the only folders I am able to affect are inside the bookmarks toolbar with this:
Code: Select all
.bookmark-item[container="true"][label="Motels"] {
  list-style-image: url("some-image.png") !important;
}

Treechildren, however, are proving to be more difficult. This code along with similar variations won't work:
Code: Select all
treechildren::-moz-tree-image(name-Motels, container) {
  list-style-image: url("someimage.png") !important;
}
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.

Scipio
 
Posts: 188
Joined: August 21st, 2006, 6:17 pm
Location: New York

Post Posted July 15th, 2007, 8:43 am

CatThief wrote:Treechildren, however, are proving to be more difficult. This code along with similar variations won't work:
Code: Select all
treechildren::-moz-tree-image(name-Motels, container) {
  list-style-image: url("someimage.png") !important;
}


More difficult is an understatement. I've gone through the Bookmarks Manager xul and css files trying to get some insight into how the default icon is assigned, but have had no luck. I know it's possible to affect the sidebar and manager as custom icons assigned to bookmarks will show up, but the container folders have me stumped for the moment.
After several hundred tries, any ideas or suggestions will be very welcome.

Raila

User avatar
 
Posts: 524
Joined: January 21st, 2005, 2:02 pm
Location: huh? Where? WHEN?!? OH! Indiana

Post Posted July 17th, 2007, 10:38 pm

Im not sure if Im reading you right, but I have mine changed with a personal choice of icon for each of about 10 different ones in the Folder, the Sidebar and they work fine.

Code: Select all

* Change Bookmark Toolbar Folder Icons */
#personal-bookmarks toolbarbutton[label="Icons"] {padding: 0px 0px 0px 0px !important;}
#personal-bookmarks toolbarbutton[label="Icons"] .toolbarbutton-icon {display: block !important; list-style-image: url('file:///F:/pics/FavIcons/Yingyang1.ico') !important; -moz-image-region: auto !important; margin: 0px 2px 0px 2px !important;}
#personal-bookmarks toolbarbutton[label="Icons"] .toolbarbutton-text {display: none !important;}



of course Im tired so I could be totally seeing something utterly different than what you want...
i5 2500 running Win 7
Vanilla Fx (for now)
Extensions-TabMixPlus, IETab2, FireGestures, Stylish, AdblockPlus 2, ColorfulTabs

Scipio
 
Posts: 188
Joined: August 21st, 2006, 6:17 pm
Location: New York

Post Posted July 18th, 2007, 4:23 pm

Thank you for the input Raila, but that code only changes the icon on the toolbar and not the sidebar.
What I'm trying to do is get the custom icon I've assigned to Bookmark Folders to also show up in the Bookmark Manager and Sidebar.
For example, the code I posted assigns, in the Bookmarks drop down menu, a bright purple folder icon to the Folder "Motels" where I keep bookmarks for various lodging. However, in the Bookmarks Manager, it's only the generic folder icon rather than my custom icon.
If you use Favicon Picker to give a Bookmark a custom icon, it shows in the BM and Sidebar so it seems that it should be possible with Folders but so far it's eluding me.

CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted July 18th, 2007, 4:31 pm

@Scipio, I think I may have a "treechildren" solution. Take a look at this thread where I posted a solution to a similar issue:
http://forums.mozillazine.org/viewtopic.php?t=566896
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.

Raila

User avatar
 
Posts: 524
Joined: January 21st, 2005, 2:02 pm
Location: huh? Where? WHEN?!? OH! Indiana

Post Posted July 18th, 2007, 8:20 pm

hm, as I have never used the Sidebar, lol I never paid attention to that!! Sorry guys!
i5 2500 running Win 7
Vanilla Fx (for now)
Extensions-TabMixPlus, IETab2, FireGestures, Stylish, AdblockPlus 2, ColorfulTabs

SkyPilot
 
Posts: 2175
Joined: August 9th, 2004, 1:18 am

Post Posted July 18th, 2007, 8:52 pm

I use this code to hide the folder icons in the sidebar and BM:
Code: Select all
#bookmarks-view treechildren::-moz-tree-image(Name, container) {
  list-style-image: none !important;
}

So it should work to change the folder icon. Maybe something like this:
Code: Select all
#bookmarks-view treechildren::-moz-tree-image(Name-Motels, container) {
  list-style-image: url("someimage.png") !important;
}

CatThief

User avatar
 
Posts: 1854
Joined: January 19th, 2004, 12:19 am
Location: Northeast USA

Post Posted July 18th, 2007, 10:44 pm

SkyPilot wrote:So it should work to change the folder icon. Maybe something like this:
Code: Select all
#bookmarks-view treechildren::-moz-tree-image(Name-Motels, container) {
  list-style-image: url("someimage.png") !important;
}

In Tb, in order to make the names of user accounts inside the folder pane tree available, this code needs to be applied:
Code: Select all
with (document.getElementById("folderNameCell"))
   setAttribute("properties", getAttribute("properties") + " name-?folderTreeName")

It seems that a similar thing is needed in Fx in order for the userChrome code to work.
Still passionate for Mozilla themes and extensions, just not actively developing them for public release anymore.

Scipio
 
Posts: 188
Joined: August 21st, 2006, 6:17 pm
Location: New York

Post Posted July 25th, 2007, 5:09 pm

Well, I'm getting nowhere with this. So far the JS script doesn't make a difference. ](*,)
When I have time I'm going to tear Favicon Picker apart to see if I can figure out how it sets the Bookmark Icons that show in the Bookmark Manager.
I tried this and liked the effect, so I guess it's not a total loss.
Code: Select all
.bookmark-item[container='true'][label='your folder name'], #treechildren::-moz-tree-image(folderNameCol, name-your folder name)
  {list-style-image: url("file://Path to icon") !important;}

It sets the icon for the folder and makes it dissappear when hovered on.

Return to Theme Development


Who is online

Users browsing this forum: No registered users and 1 guest