dasher r3597 - in trunk: . Src/Common/Types Src/Gtk2



Author: pwelche
Date: Fri Oct 10 14:58:49 2008
New Revision: 3597
URL: http://svn.gnome.org/viewvc/dasher?rev=3597&view=rev

Log:
After Brian Cameron in #536926: avoid C99 extension
int len; gchar array[len];
and we don't use INT64_{MIN,MAX} anywhere, so avoid the risk of redefinition
completely by removing it.



Modified:
   trunk/ChangeLog
   trunk/Src/Common/Types/int64.h
   trunk/Src/Gtk2/dasher_main.cpp

Modified: trunk/Src/Common/Types/int64.h
==============================================================================
--- trunk/Src/Common/Types/int64.h	(original)
+++ trunk/Src/Common/Types/int64.h	Fri Oct 10 14:58:49 2008
@@ -22,9 +22,6 @@
 
 #include "../myassert.h"
 
-#define INT64_MAX std::numeric_limits<int64>::max()
-#define INT64_MIN std::numeric_limits<int64>::min()
-
 #ifdef _DEBUG
 
 class Cint32;

Modified: trunk/Src/Gtk2/dasher_main.cpp
==============================================================================
--- trunk/Src/Gtk2/dasher_main.cpp	(original)
+++ trunk/Src/Gtk2/dasher_main.cpp	Fri Oct 10 14:58:49 2008
@@ -988,19 +988,15 @@
   const gchar *szFilename = dasher_editor_get_filename(pPrivate->pEditor);
 
   // Note to translators: This is the name of the dasher program as it appears
-  // in a window title without a file.
+  // in a window title.
   gchar * dasher = _("Dasher");
   if(szFilename == 0) {
     gtk_window_set_title(GTK_WINDOW(pPrivate->pMainWindow), dasher);
   }
   else {
-    // Note to translators: This is a format string for the name of the dasher
-    // program as it appears in a window, %s will be the filename.
-    gchar * titleFormat = _("Dasher - %s");
-    int len = strlen(szFilename);
-    gchar title[len+strlen(titleFormat)];
-    snprintf(title, sizeof(title), titleFormat, szFilename);
+    gchar *title = g_strdup_printf("%s - %s", dasher, szFilename);
     gtk_window_set_title(GTK_WINDOW(pPrivate->pMainWindow), title);
+    g_free (title);
   }
 }
 



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