Fixing ö's. Alex
authorterminatorX <>
Wed, 2 Jan 2002 15:47:52 +0000 (15:47 +0000)
committerterminatorX <>
Wed, 2 Jan 2002 15:47:52 +0000 (15:47 +0000)
terminatorX/ChangeLog
terminatorX/src/tX_dialog.cc

index f0a43f6701e80a38aa22d972e2efb503a81dbe24..7532b4d434799ab3a2ce33b6fc2ce10fb4ac1934 100644 (file)
@@ -25,6 +25,9 @@ changed.
   Nevertheless newer gcc releases seem to have a bug in handling movq and
   the current 3DNow! stereo implementation does not seem to be very efficient.
   So use --enable-3dnow only if you want to help me improve perfomance.
+- workaround for a gtk+ bug that causes empty labels when strings contain
+  umlauts - unluckily my name features one of these so I had to write this
+  workaround.
 
 [v3.71]
 - applied a big patch from Adrian Reber (adrian@lisas.de). This patch includes:
index 7c13ce420757fb24c814461686359617b74787bb..1edccdb2a4860621f4aba7e310a9350fb185417c 100644 (file)
@@ -581,10 +581,9 @@ void show_about(int nag)
                
                sep=gtk_hseparator_new();
                add_about_wid(sep);
-               
-               label=gtk_label_new(
-               "\nThis is "PACKAGE" Release "VERSION" - Copyright (C) 1999, 2000 by Alexander König" 
-               "\n\nSend comments, patches and scratches to: alex@lisas.de\n"
+               char about_prefix_umlaut[]="\nThis is "PACKAGE" Release "VERSION" - Copyright (C) 1999, 2000 by Alexander König";
+               char about_prefix_broken_umlaut[]="\nThis is "PACKAGE" Release "VERSION" - Copyright (C) 1999, 2000 by Alexander Ko\"nig";
+               char about_rest[]="\n\nSend comments, patches and scratches to: alex@lisas.de\n"
                "terminatorX-homepage: http://www.terminatorX.cx\n\nThis binary has been compiled with the following flags: "
                "Sox support: "
 #ifdef USE_SOX_INPUT
@@ -625,8 +624,27 @@ void show_about(int nag)
 #else
                "little"
 #endif
-               " endian machine.\n"    
-               );
+               " endian machine.\n";
+               
+               char buffer[4096];
+               char *str;
+               
+               strcpy(buffer, about_prefix_umlaut);
+               strcat(buffer, about_rest);
+               
+               label=gtk_label_new(buffer);
+               gtk_label_get(GTK_LABEL(label), &str);
+               
+               /* Fixng a strange gtk+ bug that appears at least on my system.
+               */
+               if (strlen(str)==0) 
+               {
+                       fprintf (stderr, "tX: Warning: this gtk+ has broken umlauts.\n");
+                       strcpy(buffer, about_prefix_broken_umlaut);
+                       strcat(buffer, about_rest);
+                       gtk_label_set(GTK_LABEL(label), buffer);                
+               }
+               
                gtk_misc_set_alignment (GTK_MISC(label), 0.5 ,0.5);
                add_about_wid(label);