[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[datasets 07/18] psppire-window: Use g_string_append_unichar() instead o
From: |
Ben Pfaff |
Subject: |
[datasets 07/18] psppire-window: Use g_string_append_unichar() instead of global var. |
Date: |
Sat, 30 Apr 2011 22:36:35 -0700 |
Seems slightly cleaner.
---
src/ui/gui/psppire-window.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/src/ui/gui/psppire-window.c b/src/ui/gui/psppire-window.c
index cf610f6..b67f95a 100644
--- a/src/ui/gui/psppire-window.c
+++ b/src/ui/gui/psppire-window.c
@@ -1,5 +1,5 @@
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2009, 2010 Free Software Foundation
+ Copyright (C) 2009, 2010, 2011 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -87,16 +87,14 @@ uniquify (const gchar *str, int *x)
return g_strdup_printf ("%s%d", str, (*x)++);
}
-static gchar mdash[6] = {0,0,0,0,0,0};
-
static void
psppire_window_set_title (PsppireWindow *window)
{
GString *title = g_string_sized_new (80);
- g_string_printf (title, _("%s %s PSPPIRE %s"),
- window->basename ? window->basename : "",
- mdash, window->description);
+ g_string_printf (title, "%s ", window->basename ? window->basename : "");
+ g_string_append_unichar (title, 0x2014); /* em dash */
+ g_string_printf (title, " PSPPIRE %s", window->description);
if (window->dirty)
g_string_prepend_c (title, '*');
@@ -247,8 +245,6 @@ psppire_window_class_init (PsppireWindowClass *class)
_("Untitled"),
G_PARAM_CONSTRUCT | G_PARAM_READWRITE);
- g_unichar_to_utf8 (0x2014, mdash);
-
object_class->set_property = psppire_window_set_property;
object_class->get_property = psppire_window_get_property;
--
1.7.2.5
- [datasets 00/18] Implement multiple datasets support, Ben Pfaff, 2011/05/01
- [datasets 02/18] gui: Put a separator line before list of windows in Windows menus., Ben Pfaff, 2011/05/01
- [datasets 09/18] gui: Remove obviously unnecessary #include directives., Ben Pfaff, 2011/05/01
- [datasets 06/18] gui: Use dispose instead of finalize method in PsppireDataWindow., Ben Pfaff, 2011/05/01
- [datasets 13/18] gui: Fix File|Open in syntax editor., Ben Pfaff, 2011/05/01
- [datasets 17/18] gui: Add ellipsis to menu items that require further input., Ben Pfaff, 2011/05/01
- [datasets 07/18] psppire-window: Use g_string_append_unichar() instead of global var.,
Ben Pfaff <=
- [datasets 08/18] gui: Include only <gtk/gtk.h> to use GTK+., Ben Pfaff, 2011/05/01
- [datasets 01/18] gui: Always convert file names to UTF-8 for use in syntax., Ben Pfaff, 2011/05/01
- [datasets 14/18] gui: Fix g_object_get() memory leaks for PsppireWindow's filename., Ben Pfaff, 2011/05/01
- [datasets 03/18] gui: Fix const-ness warning for measure_to_string() return type., Ben Pfaff, 2011/05/01
- [datasets 16/18] Implement DATASET commands., Ben Pfaff, 2011/05/01
- [datasets 10/18] gui: Prefer NULL to 0 for initializing pointers., Ben Pfaff, 2011/05/01
- [datasets 18/18] gui: Change View|Data and View|Variables to radio button menu items., Ben Pfaff, 2011/05/01