]> git.saurik.com Git - wxWidgets.git/commitdiff
Unicode compilation fix
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Oct 2006 13:44:32 +0000 (13:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Oct 2006 13:44:32 +0000 (13:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/aboutdlg.cpp

index e801284c9207fee9537e73f9e57fbeca6e90ea9b..16fb5d14fa4642816f93984487c9c20ea3c8452e 100644 (file)
 
 #include "wx/gtk/private.h"
 
 
 #include "wx/gtk/private.h"
 
+// ----------------------------------------------------------------------------
+// GtkStr: temporary GTK string
+// ----------------------------------------------------------------------------
+
+class GtkStr : public wxGtkString
+{
+public:
+    GtkStr(const wxString& s)
+        : wxGtkString(wx_const_cast(char *, wxGTK_CONV_SYS(s).data()))
+    {
+    }
+};
+
 // ----------------------------------------------------------------------------
 // GtkArray: temporary array of GTK strings
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // GtkArray: temporary array of GTK strings
 // ----------------------------------------------------------------------------
@@ -73,15 +86,15 @@ void wxAboutBox(const wxAboutDialogInfo& info)
     if ( !gtk_check_version(2,6,0) )
     {
         GtkAboutDialog * const dlg = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
     if ( !gtk_check_version(2,6,0) )
     {
         GtkAboutDialog * const dlg = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
-        gtk_about_dialog_set_name(dlg, info.GetName());
+        gtk_about_dialog_set_name(dlg, GtkStr(info.GetName()));
         if ( info.HasVersion() )
         if ( info.HasVersion() )
-            gtk_about_dialog_set_version(dlg, info.GetVersion());
+            gtk_about_dialog_set_version(dlg, GtkStr(info.GetVersion()));
         if ( info.HasCopyright() )
         if ( info.HasCopyright() )
-            gtk_about_dialog_set_copyright(dlg, info.GetCopyright());
+            gtk_about_dialog_set_copyright(dlg, GtkStr(info.GetCopyright()));
         if ( info.HasDescription() )
         if ( info.HasDescription() )
-            gtk_about_dialog_set_comments(dlg, info.GetDescription());
+            gtk_about_dialog_set_comments(dlg, GtkStr(info.GetDescription()));
         if ( info.HasLicence() )
         if ( info.HasLicence() )
-            gtk_about_dialog_set_license(dlg, info.GetLicence());
+            gtk_about_dialog_set_license(dlg, GtkStr(info.GetLicence()));
 
         wxIcon icon = info.GetIcon();
         if ( icon.Ok() )
 
         wxIcon icon = info.GetIcon();
         if ( icon.Ok() )
@@ -89,8 +102,12 @@ void wxAboutBox(const wxAboutDialogInfo& info)
 
         if ( info.HasWebSite() )
         {
 
         if ( info.HasWebSite() )
         {
-            gtk_about_dialog_set_website(dlg, info.GetWebSiteURL());
-            gtk_about_dialog_set_website_label(dlg, info.GetWebSiteDescription());
+            gtk_about_dialog_set_website(dlg, GtkStr(info.GetWebSiteURL()));
+            gtk_about_dialog_set_website_label
+            (
+                dlg,
+                GtkStr(info.GetWebSiteDescription())
+            );
         }
 
         if ( info.HasDevelopers() )
         }
 
         if ( info.HasDevelopers() )
@@ -100,7 +117,13 @@ void wxAboutBox(const wxAboutDialogInfo& info)
         if ( info.HasArtists() )
             gtk_about_dialog_set_artists(dlg, GtkArray(info.GetArtists()));
         if ( info.HasTranslators() )
         if ( info.HasArtists() )
             gtk_about_dialog_set_artists(dlg, GtkArray(info.GetArtists()));
         if ( info.HasTranslators() )
-            gtk_about_dialog_set_translator_credits(dlg, _("translator-credits"));
+        {
+            gtk_about_dialog_set_translator_credits
+            (
+                dlg,
+                GtkStr(_("translator-credits"))
+            );
+        }
 
         gtk_widget_show(GTK_WIDGET(dlg));
         return;
 
         gtk_widget_show(GTK_WIDGET(dlg));
         return;