Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

  1. #1
    Join Date
    Feb 2008
    Location
    Sydney, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 8.10 Intrepid Ibex

    HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    Derived from:
    http://brainstorm.ubuntu.com/idea/14381/
    http://ubuntuforums.org/showthread.php?t=733808

    1) Open Terminal

    2a) Install apt-build
    Code:
    sudo apt-get update
    sudo apt-get install apt-build
    2b) Configure apt-build:
    • Optimization level: Medium
    • Add apt-build repository to sources.list: Yes
    • Architecture: <SELECT YOUR ARCHITECTURE>


    3) Install files required to build gnome-panel from source and download the source
    Code:
    sudo apt-get build-dep gnome-panel
    sudo apt-build source gnome-panel
    4) Navigate to the downloaded gnome-panel source folder and open the menu items file
    Code:
    cd /var/cache/apt-build/build/gnome-panel-*
    sudo gedit gnome-panel/panel-menu-items.c
    5) Set the the maximum number of bookmarks to display before placing them in the Bookmarks submenu

    Find the line:
    PHP Code:
    if (g_slist_length (add_bookmarks) <= MAX_ITEMS_OR_SUBMENU) { 
    and replace it with:
    PHP Code:
    if (g_slist_length (add_bookmarks) <= 20) { 
    Save the file.

    6) Install the modified gnome-panel and restart it
    Code:
    sudo ./configure
    sudo make
    sudo make install
    killall gnome-panel
    Before and after pics:
    Last edited by w0ng; March 16th, 2009 at 12:35 PM.
    UBUNTU 8.10 INTREPID IBEX x86_64 | 3.16GHz INTEL C2D E8500 | 4GB DDR2 1066 MHz | 512MB ATI HD4850 | 22" ASUS VW222U 1680x1050 | 640GB WD SATAII 7200RPM

  2. #2
    Join Date
    Jun 2007
    Beans
    87

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    Instead of changing
    Code:
     if (g_slist_length (add_bookmarks) <= MAX_ITEMS_OR_SUBMENU) {
    you could change
    Code:
    #define MAX_ITEMS_OR_SUBMENU 5
    to whatever you want. That way, it would work with volumes, too. Personally, I think this should reside in a configuration file, so one doesn't have to edit the source and recompile to fix such a trivial issue. But that's just me.
    Last edited by schnauzer93; March 10th, 2009 at 11:31 PM.

  3. #3
    Join Date
    Sep 2006
    Beans
    3,165
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    Both works fine but i prefer changing MAX_ITEMS_OR_SUBMENU

  4. #4
    Join Date
    Feb 2008
    Location
    Sydney, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    If Network Places and Removeable Media aren't a concern, changing MAX_ITEMS_OR_SUBMENU is the way to go.
    UBUNTU 8.10 INTREPID IBEX x86_64 | 3.16GHz INTEL C2D E8500 | 4GB DDR2 1066 MHz | 512MB ATI HD4850 | 22" ASUS VW222U 1680x1050 | 640GB WD SATAII 7200RPM

  5. #5
    Join Date
    Nov 2007
    Beans
    2

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    Thank you so much for this.
    The five item limit is so annoying. And the last time i tried to compile from source the whole system went wrong.
    It seemed like I installed the originale gnome-panel instead of Ubuntu's edit.
    Guess it had something to do with the .dsc anf .diff.gz files, but i never figured it out then.
    So I was surprised your guide not included these files in any way, but it seemed thorough, so I followed the guide, and it works just fine!

    Thanks

  6. #6
    Join Date
    Dec 2007
    Beans
    197
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    Thanks. I wasn't sure on the archetecture. I know the Q6600 is AMD64 and that didn't appear as an option, so I chose the amd10 (or whatever is was) and it worked.

  7. #7
    Join Date
    Oct 2007
    Location
    Gent, Belgium
    Beans
    65
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    If I'd do this, would I lose all customizations made to my panels, like applets (and their settings), custom icons, etc? Or would everything just stay the way it is now, with the larger number of bookmarks and volumes the only change noticable?

  8. #8
    Join Date
    Jun 2007
    Beans
    17,337

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    If I'd do this, would I lose all customizations made to my panels, like applets (and their settings), custom icons, etc?
    I think you should be ok there, posted a bit more in the nautilus thread

  9. #9
    Join Date
    Oct 2007
    Location
    Gent, Belgium
    Beans
    65
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    I followed the instructions from the startpost with the difference that I changed the line in the third step from this:
    Code:
    sudo apt-get build-dep gnome-panel
    to this:
    Code:
    sudo aptitude build-dep gnome-panel
    ... because I would get an error, dependency problems, if I didn't.

    That was all I had to change from the instructions, which worked nicely.

    I also noticed my launchers and applets and everything is just the way it was, with the exception of more bookmarks and devices visible underneath eachother. Yay!

    Conclusion:
    1) it works
    2) the configuration of the gnome-panel is completely kept and reused

  10. #10
    Join Date
    Aug 2008
    Location
    germany
    Beans
    857

    Re: HOW TO: Display more than 5 bookmarks in gnome-panel "Places" menu

    sudo ./configure
    sudo make
    moooep!

    OUCH!
    You shouldn't, you really shound NOT build packages as root. Most probably you'll run into segmentation faults, wondering why, cause a Seg Fault only tells you it just seg faulted.

    Regressions based upon these commands are very likely.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •