[gtkada] Gtkada.Intl on Windows

Dmitry A. Kazakov mailbox at dmitry-kazakov.de
Mon Aug 21 15:05:42 CEST 2006


On Mon, 21 Aug 2006 14:35:00 +0200, you wrote:

> Michael Bode schrieb:
> 
>> Probably I have to either build my own version of libglade using the
>> same libintl-1 that GtkAda uses. Or build GtkAda using the intl.dll
>> from Gtk 2.8.9. Otherwise glade's libintl doesn't know about calls to
>> Bind_Text_Domain from the Ada side.
> 
> Ok, now this also works but I've found another problem. dgettext returns 
> strings in what it thinks to be the system's character set. 

A slightly different bend of the story, what about using style properties
(resource files) vs gettext? I mean:

Class_Install_Style_Property
Style_Get_Property

I don't see much difference in functionality of both. At first glance style
descriptions could be structured into language sections.
-------------
P.S. It seems that style properties aren't currently supported by the
public version GtkAda, but it is relatively easy to fix:

   procedure Class_Install_Style_Property
             (  Class : GObject_Class;
                Pspec : Param_Spec
             );
   pragma Import
          (  C,
             Class_Install_Style_Property,
             "gtk_widget_class_install_style_property"
          );
   procedure Style_Get_Property
             (  Widget        : access Gtk_Widget_Record'Class;
                Property_Name : String;
                Value         : out GValue
             )  is
      procedure Internal
                (  Widget        : Address;
                   Property_Name : Property;
                   Value         : out GValue
                );
      pragma Import (C, Internal, "gtk_widget_style_get_property");
   begin
      Internal (Get_Object (Widget), Build (Property_Name), Value);
   end Style_Get_Property;

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



More information about the gtkada mailing list