[Glade-devel] Better support for adding external catalogs in Glade3



Mikael Hallendal wrote:

Hi again,

Found Tristan on IRC so we discussed it here and came to the conclusion 
that it would be nice to get rid of all the xml files per widget. 
Another thing was to merge all gtk catalogs into one file. So here is a 
first draft on a format that we could use:

The idea is that GladeCatalog becomes a container of everything that has 
to do with a certain library, using Gtk+ as example here:

<GladeCatalog name="gtk+" library="gladegtk">
   <GladeWidgets>
     <GladeWidgetClass name="GtkWindow"
                       generic_name="window" title="Window">
       <Properties>
         <Property id="modal">
           <SetFunction>ignore</SetFunction>
           <GetFunction>ignore</GetFunction>
         </Property>
           ...
       </Properties>
     </GladeWidgetClass>

     <GladeWidgetClass name="GtkEntry"
                       generic_name="entry" title="Text Entry"/>

     <GladeWidgetClass name="GtkHSeparator" generic_name="hseparator"
                       title="Horizontal Separator"/>
   </GladeWidgets>

   <GladeWidgetGroup name="gtk-base" title="Gtk+ Base">
     <GladeWidgetClass name="GtkWindow"/>
     <GladeWidgetClass name="GtkEntry"/>
   </GladeWidgetGroup>

   <GladeWidgetGroup name="gtk-additional" title="Gtk+ Additional">
     <GladeWidgetClass name="GtkHSeparator"/>
     ...
   </GladeWidgetGroup>
</GladeCatalog>

As you can see I have also splitted the definition of a class from the 
grouping of them. The idea here is to in the future be able to have user 
defined groups, like "My favorites" that can use the same format but 
reside in the users home directory. It won't define any widgets but 
would be something like:

<GladeCatalog name="user-catalog">
   <GladeWidgetGroup name="user1" title"My Favorites">
     <GladeWidgetClass name="GtkWindow"/>
     <GladeWidgetClass name="GtkHSeparator"/>
   </GladeWidgetGroup>
</GladeCatalog>

We also need to define the format in a DTD for validation of catalog files.

Any comments?

Best Regards,
   Mikael Hallendal

-- 
Imendio AB, http://www.imendio.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]