Re: Alternative layout for Gkrellm?
Bill Wilson <[email protected]>
| Newsgroups | gmane.comp.gnome.apps.gkrellm |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 24 Jul 2009 12:43:22 -0400 (EDT) "Benjamin R. Haskell" <[email protected]> wrote: > When trying to use gkrellm, I continually find myself mistakenly > associating the charts with the panel above them. Is there a way to > invert the standard chart+panel ordering? > > I.e. currently Gkrellm shows up as the ASCII art at left; I'd like the > right: > > +-- thing1 ---+ +-- thing1 ---+ > +-- thing2 ---+ +-- thing2 ---+ > | thing3 data | +-- thing3 ---+ > | thing3 data | | thing3 data | > +-- thing3 ---+ | thing3 data | > | thing4 data | +-- thing4 ---+ > | thing4 data | | thing4 data | > +-- thing4 ---+ | thing4 data | > | thing5 data | +-- thing5 ---+ > | thing5 data | | thing5 data | > +-- thing5 ---+ | thing5 data | > +-- thing6 ---+ +-- thing6 ---+ > +-- thing7 ---+ +-- thing7 ---+ It should work for most cases if you change the packing order of the chart and panel boxes in the create routines. Try this patch: diff -urN gkrellm.orig/src/chart.c gkrellm/src/chart.c --- gkrellm.orig/src/chart.c 2008-10-03 19:33:37.000000000 -0500 +++ gkrellm/src/chart.c 2009-07-24 16:04:03.762111124 -0500 @@ -1836,7 +1836,7 @@ if (!cp->box) { cp->box = gtk_vbox_new(FALSE, 0); /* not a hbox anymore !! */ - gtk_box_pack_start(GTK_BOX(vbox), cp->box, FALSE, FALSE, 0); + gtk_box_pack_end(GTK_BOX(vbox), cp->box, FALSE, FALSE, 0); cp->top_spacer.vbox = gtk_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(cp->box), cp->top_spacer.vbox, diff -urN gkrellm.orig/src/panel.c gkrellm/src/panel.c --- gkrellm.orig/src/panel.c 2008-10-03 19:33:37.000000000 -0500 +++ gkrellm/src/panel.c 2009-07-24 16:04:03.762111124 -0500 @@ -382,7 +382,7 @@ if (p->hbox == NULL) { hbox = gtk_hbox_new(FALSE, 0); - gtk_container_add (GTK_CONTAINER(vbox), hbox); + gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); p->hbox = hbox; p->drawing_area = gtk_drawing_area_new(); p->layout = gtk_widget_create_pango_layout(top_win, NULL); If this doesn't work for a monitor (because it creates its panels/charts in some unusual way) you'll have to change the specific monitor code. Offhand, the only monitor I know of that would have this problem is the memory monitor with its swap chart (if you have the swap chart enabled). Bill ______________________________________________ Gkrellm mailing list [email protected] Read archives-join-leave-set RSS feed: http://archive.lists.netservicesgroup.com This service is provided by The Network Services Group: http://www.netservicesgroup.com