Results 1 to 8 of 8
  1.    #1  
    In the browser you have the ability to bookmark a web page or add the page to the launcher. When you choose to add the page to the launcher, you can select any part of the web page and make it the icon. Has anyone found where these icons are kept? I've already looked through the browsers images folder, but it's not kept there. Any help would be appreciated, thanks.
  2. #2  
    Try checking the sqlite database(s) associated with the browser; it's probably stored as a binary data column in the table which contains bookmarks.
  3. dbgod's Avatar
    Posts
    16 Posts
    Global Posts
    20 Global Posts
    #3  
    The images are in /var/luna/data/browser/icons . For the "built-in" bookmarks, there are 3 files each:

    • bookmark-icon-{name}.png - 32x32 px icon you see in the bookmark list

    • {name}-bookmark-icon.png - 64x64 px icon that doesn't seem to appear anywhere

    • {name}-bookmark-thumbnail.png - 90x120 px thumbnail that appears when you start the browser


    I'm not happy with the way the Pre tries to make images for you, so I created some of my own. (I also use a better naming convention for the files).

    To add your own images:

    1. Copy the default bookmark images from /var/luna/data/browser/images to you PC (use WinSCP or copy them to /media/internal and then use the USB cable). They make good templates for creating new images.

    2. Create some new images. Here are mine for m.cnn.com:


    (cnn-icon32.png)


    (cnn-icon64.png)


    (cnn-thumbnail.png)

    3. Copy the images to your Pre under /var/luna/data/browser/images .

    4. Become root and make your filesystem read-write:

    Code:
    $ sudo -i
    
    # rootfs_open -w
    5. Open the bookmark database with the sqlite utility:

    Code:
    # /usr/bin/sqlite3 /var/palm/data/file_.usr.palm.applications.com.palm.app.browser_0/0000000000000004.db
    6. Add a bookmark, save, and exit sqlite:

    Code:
    sqlite> begin transaction;
    
    sqlite> insert into bookmarks (url,title,defaultEntry,iconFile32,iconFile64,thumbnailFile)
     values ('http://m.cnn.com','CNN',1,'/var/luna/data/browser/icons/cnn-icon32.png','/var/luna/data/browser/icons/cnn-icon64.png','/var/luna/data/browser/icons/cnn-thumbnail.png');
    
    sqlite> commit;
    
    sqlite> .exit
    Note: the bookmarks are keyed on title, so if you already have a bookmark titled "CNN", the above code will simply update the existing bookmark.


    To view all you bookmarks in the database:

    Code:
    sqlite> .header on
    
    sqlite> select * from bookmarks;
    Columns:

    • id - numeric ID

    • url - URL

    • title - Title

    • date - numeric representing the date-time the bookmark was added

    • parent - ?

    • idx - numeric controlling sort order of the bookmarks (when two or more bookmarks have the same idx value, the browser sorts on title)

    • defaultEntry - numeric: 0 for bookmarks you add through the browser, 1 for "built-in" bookmarks (Pre won't mess with the images)

    • iconFile32 - path to the 32x32 px icon

    • iconFile64 - path to the 64x64 px icon

    • visitCount - number of times you selected the bookmark

    • thumbnameFile - path to the thumnail

    • lastVisited - numeric representing the date-time last time you selected the bookmark

    • startIdx - ?
  4.    #4  
    Quote Originally Posted by dbgod View Post
    The images are in /var/luna/data/browser/icons . For the "built-in" bookmarks, there are 3 files each:

    • bookmark-icon-{name}.png - 32x32 px icon you see in the bookmark list

    • {name}-bookmark-icon.png - 64x64 px icon that doesn't seem to appear anywhere

    • {name}-bookmark-thumbnail.png - 90x120 px thumbnail that appears when you start the browser


    I'm not happy with the way the Pre tries to make images for you, so I created some of my own. (I also use a better naming convention for the files).

    To add your own images:

    1. Copy the default bookmark images from /var/luna/data/browser/images to you PC (use WinSCP or copy them to /media/internal and then use the USB cable). They make good templates for creating new images.

    2. Create some new images. Here are mine for m.cnn.com:


    (cnn-icon32.png)


    (cnn-icon64.png)


    (cnn-thumbnail.png)

    3. Copy the images to your Pre under /var/luna/data/browser/images .

    4. Become root and make your filesystem read-write:

    Code:
    $ sudo -i
    
    # rootfs_open -w
    5. Open the bookmark database with the sqlite utility:

    Code:
    # /usr/bin/sqlite3 /var/palm/data/file_.usr.palm.applications.com.palm.app.browser_0/0000000000000004.db
    6. Add a bookmark, save, and exit sqlite:

    Code:
    sqlite> begin transaction;
    
    sqlite> insert into bookmarks (url,title,defaultEntry,iconFile32,iconFile64,thumbnailFile)
     values ('http://m.cnn.com','CNN',1,'/var/luna/data/browser/icons/cnn-icon32.png','/var/luna/data/browser/icons/cnn-icon64.png','/var/luna/data/browser/icons/cnn-thumbnail.png');
    
    sqlite> commit;
    
    sqlite> .exit
    Note: the bookmarks are keyed on title, so if you already have a bookmark titled "CNN", the above code will simply update the existing bookmark.


    To view all you bookmarks in the database:

    Code:
    sqlite> .header on
    
    sqlite> select * from bookmarks;
    Columns:

    • id - numeric ID

    • url - URL

    • title - Title

    • date - numeric representing the date-time the bookmark was added

    • parent - ?

    • idx - numeric controlling sort order of the bookmarks (when two or more bookmarks have the same idx value, the browser sorts on title)

    • defaultEntry - numeric: 0 for bookmarks you add through the browser, 1 for "built-in" bookmarks (Pre won't mess with the images)

    • iconFile32 - path to the 32x32 px icon

    • iconFile64 - path to the 64x64 px icon

    • visitCount - number of times you selected the bookmark

    • thumbnameFile - path to the thumnail

    • lastVisited - numeric representing the date-time last time you selected the bookmark

    • startIdx - ?
    Wow, fantastic. Thank you!
  5. #5  
    {name}-bookmark-icon.png - 64x64 px icon that doesn't seem to appear anywhere
    Isn't this used as the icon if it's placed on the launcher?
  6.    #6  
    Quote Originally Posted by RickNeff View Post
    Isn't this used as the icon if it's placed on the launcher?

    Yeah, that's the icon used.
    aka lunareclipse
    You can find me here:
    Twitter
    Pre Themes
  7. #7  
    /var/luna/data/browser/images
    It would appear on mine, after the 1.1 update, that it's now: /var/luna/data/browser/icons

    I was hoping that simply replacing the files using the same names would update the icons, but you do apparently have to insert into the database. Also, since there are old icons from deleted bookmarks, I'm thinking it might be safe to delete the icons once they're added to the database. (In case one starts to run out of space.) Something I'll be trying actually.

    Again, thanks so much for doing this research!
  8. #8  
    This posting seems to address what I'm looking for, but I might be a bit over my head. You indicate that the current graphic files are stored in /var/luna/data/browser/images. I cannot find that folder, nor do I see the internal/media folder where you are suggesting that they be copied to.

    Also, I not familiar with the "sqlite utility". And I'm guessing that making myself "the root" has nothing to do with potting soil. ;-)

    After that, I think I understand what you are recommending: 1) Move the existing images to the PC, 2) develop the better replacement images I want, and then move the new images back to the PRE to in place or the original ones.

Posting Permissions