changeset 1317:78861d8b86f2

updated info boxes to make them translatable
author Giacomo Lozito <james@develia.org>
date Sat, 21 Jul 2007 04:05:35 +0200
parents 25f5cd05a52f
children a9a97179a1f9
files src/amidi-plug/i_utils.c src/aosd/aosd_ui.c src/evdev-plug/ed_ui.c
diffstat 3 files changed, 35 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/src/amidi-plug/i_utils.c	Fri Jul 20 20:33:46 2007 -0500
+++ b/src/amidi-plug/i_utils.c	Sat Jul 21 04:05:35 2007 +0200
@@ -33,6 +33,7 @@
   GtkWidget *hseparator , *hbuttonbox , *button_ok;
   GtkTextBuffer *info_textbuffer;
   GdkPixbuf *logo_pixbuf;
+  gchar *info_textbuffer_content = NULL;
 
   if ( aboutwin != NULL )
     return;
@@ -64,22 +65,22 @@
   gtk_text_view_set_justification( GTK_TEXT_VIEW(info_textview) , GTK_JUSTIFY_LEFT );
   gtk_text_view_set_left_margin( GTK_TEXT_VIEW(info_textview) , 10 );
 
-  gtk_text_buffer_set_text( info_textbuffer ,
-                            "\nAMIDI-Plug " AMIDIPLUG_VERSION
-                            "\nmodular MIDI music player\n"
-                            "http://www.develia.org/projects.php?p=amidiplug\n\n"
-                            "written by Giacomo Lozito\n"
-                            "< james@develia.org >\n\n\n"
-                            "special thanks to...\n\n"
-                            "Clemens Ladisch and Jaroslav Kysela\n"
-                            "for their cool programs aplaymidi and amixer; those\n"
-                            "were really useful, along with alsa-lib docs, in order\n"
-                            "to learn more about the ALSA API\n\n"
-                            "Alfredo Spadafina\n"
-                            "for the nice midi keyboard logo\n\n"
-                            "Tony Vroon\n"
-                            "for the good help with alpha testing\n\n"
-                            , -1 );
+  info_textbuffer_content = g_strjoin( NULL , "\nAMIDI-Plug " , AMIDIPLUG_VERSION ,
+                                       _("\nmodular MIDI music player\n"
+                                         "http://www.develia.org/projects.php?p=amidiplug\n\n"
+                                         "written by Giacomo Lozito\n") ,
+                                       "< james@develia.org >\n\n\n" ,
+                                       _("special thanks to...\n\n"
+                                         "Clemens Ladisch and Jaroslav Kysela\n"
+                                         "for their cool programs aplaymidi and amixer; those\n"
+                                         "were really useful, along with alsa-lib docs, in order\n"
+                                         "to learn more about the ALSA API\n\n"
+                                         "Alfredo Spadafina\n"
+                                         "for the nice midi keyboard logo\n\n"
+                                         "Tony Vroon\n"
+                                         "for the good help with alpha testing\n\n") , NULL );
+  gtk_text_buffer_set_text( info_textbuffer , info_textbuffer_content , -1 );
+  g_free( info_textbuffer_content );
 
   info_scrolledwin = gtk_scrolled_window_new( NULL , NULL );
   gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(info_scrolledwin) ,
--- a/src/aosd/aosd_ui.c	Fri Jul 20 20:33:46 2007 -0500
+++ b/src/aosd/aosd_ui.c	Sat Jul 21 04:05:35 2007 +0200
@@ -1096,6 +1096,7 @@
   GtkWidget *bbar_bbox, *bbar_bt_ok;
   GtkTextBuffer *info_tb;
   GdkGeometry abount_win_hints;
+  gchar *info_tb_content = NULL;
 
   if ( about_win != NULL )
   {
@@ -1136,14 +1137,15 @@
   gtk_text_view_set_justification( GTK_TEXT_VIEW(info_tv) , GTK_JUSTIFY_LEFT );
   gtk_text_view_set_left_margin( GTK_TEXT_VIEW(info_tv) , 10 );
 
-  gtk_text_buffer_set_text( info_tb ,
-                            _("\nAudacious OSD " AOSD_VERSION_PLUGIN
-                              "\nhttp://www.develia.org/projects.php?p=aosd\n"
-                              "written by Giacomo Lozito\n"
-                              "< james@develia.org >\n\n"
-                              "On-Screen-Display is based on Ghosd library\n"
-                              "written by Evan Martin\n"
-                              "http://neugierig.org/software/ghosd/\n\n") , -1 );
+  info_tb_content = g_strjoin( NULL , "\nAudacious OSD " , AOSD_VERSION_PLUGIN ,
+                               _("\nhttp://www.develia.org/projects.php?p=audacious#aosd\n"
+                                 "written by Giacomo Lozito\n") ,
+                               "< james@develia.org >\n\n" ,
+                               _("On-Screen-Display is based on Ghosd library\n"
+                                 "written by Evan Martin\n"
+                                 "http://neugierig.org/software/ghosd/\n\n") , NULL );
+  gtk_text_buffer_set_text( info_tb , info_tb_content , -1 );
+  g_free( info_tb_content );
 
   info_tv_sw = gtk_scrolled_window_new( NULL , NULL );
   gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(info_tv_sw) ,
--- a/src/evdev-plug/ed_ui.c	Fri Jul 20 20:33:46 2007 -0500
+++ b/src/evdev-plug/ed_ui.c	Sat Jul 21 04:05:35 2007 +0200
@@ -1445,6 +1445,7 @@
   GtkWidget *bbar_bbox, *bbar_bt_ok;
   GtkTextBuffer *info_tb;
   GdkGeometry abount_win_hints;
+  gchar *info_tb_content = NULL;
 
   if ( about_win != NULL )
   {
@@ -1485,12 +1486,13 @@
   gtk_text_view_set_justification( GTK_TEXT_VIEW(info_tv) , GTK_JUSTIFY_LEFT );
   gtk_text_view_set_left_margin( GTK_TEXT_VIEW(info_tv) , 10 );
 
-  gtk_text_buffer_set_text( info_tb ,
-                            _("\nEvDev-Plug " ED_VERSION_PLUGIN
-                              "\nplayer remote control via event devices\n"
-                              "http://www.develia.org/projects.php?p=evdevplug\n\n"
-                              "written by Giacomo Lozito\n"
-                              "< james@develia.org >\n\n") , -1 );
+  info_tb_content = g_strjoin( NULL , "\nEvDev-Plug " , ED_VERSION_PLUGIN ,
+                               _("\nplayer remote control via event devices\n"
+                                 "http://www.develia.org/projects.php?p=audacious#evdevplug\n\n"
+                                 "written by Giacomo Lozito\n") ,
+                              "< james@develia.org >\n\n" , NULL );
+  gtk_text_buffer_set_text( info_tb , info_tb_content , -1 );
+  g_free( info_tb_content );
 
   info_tv_sw = gtk_scrolled_window_new( NULL , NULL );
   gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(info_tv_sw) ,