projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb41d67
)
psppire-window: Use g_string_append_unichar() instead of global var.
author
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 4 Apr 2011 00:24:26 +0000
(17:24 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Tue, 3 May 2011 14:52:48 +0000
(07:52 -0700)
Seems slightly cleaner.
src/ui/gui/psppire-window.c
patch
|
blob
|
history
diff --git
a/src/ui/gui/psppire-window.c
b/src/ui/gui/psppire-window.c
index cf610f6f640a6dd4a701d55bfaedaf3372efa01c..b67f95a43986fee11fa0589a8020102902b0dcdb 100644
(file)
--- 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.
/* 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
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)++);
}
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);
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, '*');
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);
_("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;
object_class->set_property = psppire_window_set_property;
object_class->get_property = psppire_window_get_property;