[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: uigetfile
From: |
Petr Mikulik |
Subject: |
Re: uigetfile |
Date: |
Sun, 25 Apr 2010 21:51:44 +0200 (CEST) |
> I took the liberty to slightly enhance it with a call to zenity (gnome
> dialogs) to complement kdialog.
> And here is the uigetfile using dir, or zenity or kdialogs, which should
> work on all systems.
Unfortunately zenity does not work properly:
A1. uigetfile('*.dat', 'Open data file')
=> it ignores the '*.dat' filter. Even if I try it from command line
zenity --file-selection --filename='*.dat'
then the filter is ignored.
Is that a bug in zenity? If it is, then zenity has to be the last
dialog tried.
A2. On my system, it always prints:
(zenity:19867): Gtk-CRITICAL **:
gtk_file_chooser_default_set_current_name:
assertion `impl->action == GTK_FILE_CHOOSER_ACTION_SAVE || impl->action
==
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER' failed
which is very annoying.
B. Further, you have removed the case of "xdialog". I think it is available
on (older) systems without KDE and Gnome ... cygwin/X11, for example.
Please revert it.
C. Further, you have removed lines such as
[a,b]=system('which XXXXdialog 2>/dev/null');
and thus yet another annoying messages appear such as:
sh: zenity: command not found
I think it should be reverted.
BTW -- is this "which" available in cygwin-Octave?
D1. Your plain text "dir" is cool, but produces wrong output for files:
... a.dat/
... b.dat/
... c.dat/
D2. uigetfile('*.dat', 'Open data file')
produces error message:
error: ui: A(I): index out of bounds; value 3 out of bound 2
Could you please update the patch?
> Should it be contributed to the octave sourceforge?
I would very welcome this patch available there.
Greetings,
Petr Mikulik