[Glade-devel] Re: Glade Palette Prototype
Vincent Geddes
vgeddes at metroweb.co.za
Tue Apr 4 18:16:14 EDT 2006
On Mon, 2006-03-27 at 16:58 -0500, Tristan Van Berkom wrote:
> Vincent Geddes wrote:
> > Hi Tristan
> >
> > I have resumed work on a fancy resizable palette for glade3.
> >
> > Attached is a prototype. Most of the work has been done though. If you
> > like it, I can finish it off and integrate it into glade3.
> >
> > I think it beats the pants off any other palette in Gnome!
>
> Nice progress, it really rocks :)
>
> A few comments:
>
> o What does GladePaletteExpander do differently than GtkExpander ?
> (would it be possible to derive from GtkExpander and achieve the
> same or close with alot less code ?)
>
> o From the example I cant really tell if the item order is preserved,
> just noting here that it should be (i.e. resizes on the palette
> should preserve the order in which icons are listed when the icons
> get "shuffled").
>
> So asides from that... there are a few things I'd like to change
> about the way the palette works (which I may have already mentioned)
> after integrating the UI work:
>
> o GladePalette obviously doesnt need "catalog-changed" signal,
> so that can be trashed (I dont even know if it was ever emitted,
> and it was certainly never connected to).
>
> o Need some simple apis for:
> /* Add an icon associated with a generic pointer
> * (we will use the pointer for a GladeWidgetClass *)
> */
> void glade_palette_add_item (palette, icon, user_data)
>
> /* Return the user data associated with the selected icon
> */
> gpointer glade_palette_get_selected_data (palette)
>
> In a nutshell, we need generic palette apis to replace the ugly
> glade_app_get_add/alt_class() stuff.
>
> o The palette should catch GladeApp signals to handle when there
> is no active project, and set itself insensitive (and set sensitive
> when a new project is added).
>
> I've been trying to get the time to review/finish this mail all day,
> and with everything I have to do... that wont happen soon, so
> the bottom line is; I like the UI work and hope to not have to
> maintain a dual implementation of GtkExpander; if you feel comfortable
> re-arranging the GladePalette api as I mentioned above; please
> do so, otherwise just patch the UI stuff and I'll get to the other
> stuff myself.
>
> Cheers and thanks for the great palette ;-)
>
> -Tristan
>
Hello Tristan
I do intend to rewrite the GladePalette class, and will take into
account all the points outlined in your message.
My GladePaletteExpander was a bit of a hack, I just used the GTK
GtkExpander source, and fiddled with it's drawing code to get the look I
wanted. I did try and subclass GtkExpander, but I needed to access some
of it's private members, so that was the end of that. I could use a
normal GtkExpander until as such time that I work out a solution.
Earlier, you pointed out that it would be nice if the palette had two
layout styles, the one Glade3 currently uses, and the one seen in my
prototype. I have modified my custom layout container
(GladePaletteTable) to support this.
As such the palette will provide the user with a right-click pop-up
menu, which will offer the user various preferences such as "Show Widget
Names", "Show [Small|Large] icons", etc. So that means users will have a
choice of 2 palette item layout styles.
I will send you my next prototype in 2 or 3 weeks.
Cheerio
Vincent
More information about the Glade-devel
mailing list