[Top][All Lists]

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

Re: Suggestion - Windows GUI Open File Dialog

From: Ben Pfaff
Subject: Re: Suggestion - Windows GUI Open File Dialog
Date: Tue, 08 May 2012 21:45:40 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

"ajk-eis" <address@hidden> writes:

> 1. The default installation folder should be upper case "PSPP" for the
> windows installation to match the normal naming conventions in windows.
> (Regardless of 2.)

I'm CCing Harry, who makes the Windows builds.  He'd have to make
that change.

> 2. The file dialog should be case insensitive as far as the ordering of
> files and folders is concerned since this is the behaviour expected by the
> normal user.

John (CCed), the following solves this particular issue but it
make me nervous because who knows what might depend on LC_COLLATE
while the file chooser dialog runs?  We might have to carefully
audit the source to avoid unwanted LC_COLLATE dependencies, and
then set LC_COLLATE based on the locale globally.  What do you think?

diff --git a/src/ui/gui/psppire-window.c b/src/ui/gui/psppire-window.c
index 4c7fcf5..379e007 100644
--- a/src/ui/gui/psppire-window.c
+++ b/src/ui/gui/psppire-window.c
@@ -791,9 +791,15 @@ psppire_window_file_chooser_dialog (PsppireWindow 
 psppire_window_open (PsppireWindow *de)
-  GtkWidget *dialog = psppire_window_file_chooser_dialog (de);
+  GtkWidget *dialog;
+  gint retval;
+  setlocale (LC_COLLATE, "");
+  dialog = psppire_window_file_chooser_dialog (de);
+  retval = gtk_dialog_run (GTK_DIALOG (dialog));
+  setlocale (LC_COLLATE, "C");
-  switch (gtk_dialog_run (GTK_DIALOG (dialog)))
+  switch (retval)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]