Discussion:
Shorter filenames in open dialog?
Isaac Raway
2011-03-21 03:19:16 UTC
Permalink
I realize that the Motif file section dialog for File > Open is meant to be
replaced at some point... but is there a way to get it to behave more in a
more sane fashion in the meantime? I've really been enjoying using nedit so
far and this is the only thing that has been a pain, all this constant
horizontal scrolling is driving me a bit batty. ;)

It would be ideal if the dialog could be made to simply show the name of
Directories and Files in each list instead of the full path to these
objects. Anyone know more about Motif and have a method to hack the dialog
to do this?

I nedit built from source (I am running X11, dwm, nedit, and a bunch of
other "lightweight" stuff under Mac OS X), so a source patch to fix this
would be fine if there is no such configuration option anywhere.

IJR
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Thomas Orgis
2011-03-21 09:39:55 UTC
Permalink
Am Sun, 20 Mar 2011 22:19:16 -0500
Post by Isaac Raway
I realize that the Motif file section dialog for File > Open is meant to be
replaced at some point... but is there a way to get it to behave more in a
more sane fashion in the meantime?
I agree with you that the dialog is horrible. But then, I never use it, as I always open files (also create new ones) from the shell, using the nedit client. In the shell you have all the glory of directory navigation and tab completion as $DEITY intended. That might be why luced (http://luced.de/), an editor inspired by NEdit, does not feature a file open dialog at all (last time I checked ... and I must admit, given more time, I'd hack word wrap and perhaps elastic tabs into that one and switch from NEdit for good).


Alrighty then,

Thomas.
Dušan Peterc
2011-03-21 10:33:10 UTC
Permalink
Post by Isaac Raway
It would be ideal if the dialog could be made to simply show the name of
Directories and Files in each list instead of the full path to these
objects. Anyone know more about Motif and have a method to hack the dialog
to do this?
I think file selection box resource
*XmNpathMode XmPATH_MODE_RELATIVE
*already does this.
Loading Image...
Isnt't that the default behavior in nedit?

Dušan Peterc
http://www.arahne.si
--
NEdit Discuss mailing list - ***@nedit.org
http://www.nedit.org/mailman/listinfo/di
Ravenhall, Stewart
2011-03-21 10:49:46 UTC
Permalink
Within your X resource file:

# Relative path in file/open dialogue box
*XmFileSelectionBox.pathMode: XmPATH_MODE_RELATIVE

Cheers,
Stew
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Aaron W. Hsu
2011-03-21 18:56:04 UTC
Permalink
Post by Isaac Raway
I realize that the Motif file section dialog for File > Open is meant to be
replaced at some point... but is there a way to get it to behave more in a
more sane fashion in the meantime? I've really been enjoying using nedit so
far and this is the only thing that has been a pain, all this constant
horizontal scrolling is driving me a bit batty. ;)
I am not sure what you mean by the scrolling and such. I think others have
mentioned workarounds for getting relative paths. I usually disable the
special NEdit Open Dialog and use the standard Motif one, which I can then
customize suitably for my purposes using Xresources, though at the moment,
with OpenMotif 2.X, I find there to be no need to adjust these settings.

Then again, I like Motif's dialog, so... *shrug*

Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Isaac Raway
2011-03-21 20:12:38 UTC
Permalink
Well I haven't had any luck getting this to behave how I would like, so an
illustration may be in order:

Loading Image...

This image shows what I see when I select the File > Open command.

Note that both the Directories box and the Files box contain full paths. The
first screenshot shows the open size for this particular directory.

The second and third boxes show a different set of directories.
If I double click a directory on the left in the second image, the
horizontal scroll of this box is left unchanged (as shown in the third
image) and I have to scroll to the right in a tiny box to actually see the
directory's child directories.

To be honest I am not sure if this is the default Motif dialog or if it is
"the special nedit open dialog". I had thought it was the default Motif one
but perhaps I am wrong - I don't use Motif very much and haven't for a long
time. How would I go about switching to the default dialog if this is not
it?

IJR
Post by Aaron W. Hsu
Post by Isaac Raway
I realize that the Motif file section dialog for File > Open is meant to be
replaced at some point... but is there a way to get it to behave more in a
more sane fashion in the meantime? I've really been enjoying using nedit so
far and this is the only thing that has been a pain, all this constant
horizontal scrolling is driving me a bit batty. ;)
I am not sure what you mean by the scrolling and such. I think others have
mentioned workarounds for getting relative paths. I usually disable the
special NEdit Open Dialog and use the standard Motif one, which I can then
customize suitably for my purposes using Xresources, though at the moment,
with OpenMotif 2.X, I find there to be no need to adjust these settings.
Then again, I like Motif's dialog, so... *shrug*
Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
--
http://www.nedit.org/mailman/listinfo/discuss
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Aaron W. Hsu
2011-03-21 22:05:54 UTC
Permalink
Post by Isaac Raway
Well I haven't had any luck getting this to behave how I would like, so
http://blueapples.org/files/nedit_motif_open_dialog.gif
This image shows what I see when I select the File > Open command.
I can see your frustrations now. :-) This is not how my Motif works. I am
using OpenMotif 2.3.3 right now, and I think that you can configure this.
My dialog looks like this:

Loading Image...

And that is with the following resource set:

nedit.stdOpenDialog: true

However, setting that will not fix your problem.
Post by Isaac Raway
To be honest I am not sure if this is the default Motif dialog or if it
is "the special nedit open dialog".
This is the NEdit dialog, not the standard one. Notice that it does not
have the file field in the bottom. This is done to encourage a more
efficient workflow of typing the file name directly into the file box, but
I like to have the field there.
Post by Isaac Raway
I had thought it was the default Motif one but perhaps I am wrong - I
don't use Motif very much and haven't for a long time. How would I go
about switching to the default dialog if this is not it?
Reading further along in the Motif Reference manuals, I believe that what
you are showing is the "traditional" 1.2 Motif dialog, which has to do
with the XmNPathMode resource. In this case, if you open the file open
dialog in NEdit and then use editres, you can see that there is a
"FileSelect" widget; this is an XmFileSelectionBox, which has the pathMode
resource on it. I will bet that yours is set to 'path_mode_full' which is
the old style 1.2 dialog, which removes an extra filter field and has the
full paths in the dialog box.

To change this, I used the following in my resource file:

nedit*FileSelect.pathMode: path_mode_relative

Which is what my NEdit is set to by default. If I change it to the other I
get the behavior that you experience. So, to put it simply, I have the
following:

nedit*FileSelect.pathMode: path_mode_relative
nedit.StdOpenDialog: true

and you have

nedit*FileSelect.pathMode: path_mode_full
nedit.StdOpenDialog: false

More or less. What version of Motif are you using? Maybe lesstif does
these things differently than OpenMotif?

Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Isaac Raway
2011-03-22 15:04:05 UTC
Permalink
Well it looks like Fink is configured to build nedit with lesstif. This
seems to be at least part of the issue. I am current building openmotif4
and will rebuild nedit from the tarball after this completes. Hopefully
this will fix the issue, or at least give me configuration options ot fix
it. Thanks for your help so far... so close!


IJR
Post by Aaron W. Hsu
Post by Isaac Raway
Well I haven't had any luck getting this to behave how I would like, so an
http://blueapples.org/files/nedit_motif_open_dialog.gif
This image shows what I see when I select the File > Open command.
I can see your frustrations now. :-) This is not how my Motif works. I am
using OpenMotif 2.3.3 right now, and I think that you can configure this. My
http://www.sacrideo.us/~arcfide/tmp/nedit_motif_open_dialog.png
nedit.stdOpenDialog: true
However, setting that will not fix your problem.
Post by Isaac Raway
To be honest I am not sure if this is the default Motif dialog or if it is
"the special nedit open dialog".
This is the NEdit dialog, not the standard one. Notice that it does not have
the file field in the bottom. This is done to encourage a more efficient
workflow of typing the file name directly into the file box, but I like to
have the field there.
Post by Isaac Raway
I had thought it was the default Motif one but perhaps I am wrong - I don't
use Motif very much and haven't for a long time. How would I go about
switching to the default dialog if this is not it?
Reading further along in the Motif Reference manuals, I believe that what you
are showing is the "traditional" 1.2 Motif dialog, which has to do with the
XmNPathMode resource. In this case, if you open the file open dialog in NEdit
and then use editres, you can see that there is a "FileSelect" widget; this
is an XmFileSelectionBox, which has the pathMode resource on it. I will bet
that yours is set to 'path_mode_full' which is the old style 1.2 dialog,
which removes an extra filter field and has the full paths in the dialog box.
nedit*FileSelect.pathMode: path_mode_relative
Which is what my NEdit is set to by default. If I change it to the other I
get the behavior that you experience. So, to put it simply, I have the
nedit*FileSelect.pathMode: path_mode_relative
nedit.StdOpenDialog: true
and you have
nedit*FileSelect.pathMode: path_mode_full
nedit.StdOpenDialog: false
More or less. What version of Motif are you using? Maybe lesstif does these
things differently than OpenMotif?
Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Isaac Raway
2011-03-22 15:13:22 UTC
Permalink
Well, I wish I knew more about motif... even after installing openmotif4,
I am getting an error including Xm/Xm.h... any ideas why that might not be
found?


IJR
Well it looks like Fink is configured to build nedit with lesstif. This seems
to be at least part of the issue. I am current building openmotif4 and will
rebuild nedit from the tarball after this completes. Hopefully this will fix
the issue, or at least give me configuration options ot fix it. Thanks for
your help so far... so close!
IJR
Post by Aaron W. Hsu
Post by Isaac Raway
Well I haven't had any luck getting this to behave how I would like, so an
http://blueapples.org/files/nedit_motif_open_dialog.gif
This image shows what I see when I select the File > Open command.
I can see your frustrations now. :-) This is not how my Motif works. I am
using OpenMotif 2.3.3 right now, and I think that you can configure this.
http://www.sacrideo.us/~arcfide/tmp/nedit_motif_open_dialog.png
nedit.stdOpenDialog: true
However, setting that will not fix your problem.
Post by Isaac Raway
To be honest I am not sure if this is the default Motif dialog or if it is
"the special nedit open dialog".
This is the NEdit dialog, not the standard one. Notice that it does not
have the file field in the bottom. This is done to encourage a more
efficient workflow of typing the file name directly into the file box, but
I like to have the field there.
Post by Isaac Raway
I had thought it was the default Motif one but perhaps I am wrong - I
don't use Motif very much and haven't for a long time. How would I go
about switching to the default dialog if this is not it?
Reading further along in the Motif Reference manuals, I believe that what
you are showing is the "traditional" 1.2 Motif dialog, which has to do with
the XmNPathMode resource. In this case, if you open the file open dialog in
NEdit and then use editres, you can see that there is a "FileSelect"
widget; this is an XmFileSelectionBox, which has the pathMode resource on
it. I will bet that yours is set to 'path_mode_full' which is the old style
1.2 dialog, which removes an extra filter field and has the full paths in
the dialog box.
nedit*FileSelect.pathMode: path_mode_relative
Which is what my NEdit is set to by default. If I change it to the other I
get the behavior that you experience. So, to put it simply, I have the
nedit*FileSelect.pathMode: path_mode_relative
nedit.StdOpenDialog: true
and you have
nedit*FileSelect.pathMode: path_mode_full
nedit.StdOpenDialog: false
More or less. What version of Motif are you using? Maybe lesstif does these
things differently than OpenMotif?
Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
George Ganoe
2011-03-22 18:40:58 UTC
Permalink
The Xm library is not a part of motif, but it is a dependency of nedit and motif
as well. You need to install that library on your system (it may already be
there) and the -dev files for the libraries as well since you are building nedit
from source.

George
Post by Isaac Raway
Well, I wish I knew more about motif... even after installing openmotif4,
I am getting an error including Xm/Xm.h... any ideas why that might not be
found?
IJR
Well it looks like Fink is configured to build nedit with lesstif. This seems
to be at least part of the issue. I am current building openmotif4 and will
rebuild nedit from the tarball after this completes. Hopefully this will fix
the issue, or at least give me configuration options ot fix it. Thanks for
your help so far... so close!
IJR
Post by Aaron W. Hsu
Post by Isaac Raway
Well I haven't had any luck getting this to behave how I would like, so an
http://blueapples.org/files/nedit_motif_open_dialog.gif
This image shows what I see when I select the File > Open command.
I can see your frustrations now. :-) This is not how my Motif works. I am
using OpenMotif 2.3.3 right now, and I think that you can configure this.
http://www.sacrideo.us/~arcfide/tmp/nedit_motif_open_dialog.png
nedit.stdOpenDialog: true
However, setting that will not fix your problem.
Post by Isaac Raway
To be honest I am not sure if this is the default Motif dialog or if it is
"the special nedit open dialog".
This is the NEdit dialog, not the standard one. Notice that it does not
have the file field in the bottom. This is done to encourage a more
efficient workflow of typing the file name directly into the file box, but
I like to have the field there.
Post by Isaac Raway
I had thought it was the default Motif one but perhaps I am wrong - I
don't use Motif very much and haven't for a long time. How would I go
about switching to the default dialog if this is not it?
Reading further along in the Motif Reference manuals, I believe that what
you are showing is the "traditional" 1.2 Motif dialog, which has to do with
the XmNPathMode resource. In this case, if you open the file open dialog in
NEdit and then use editres, you can see that there is a "FileSelect"
widget; this is an XmFileSelectionBox, which has the pathMode resource on
it. I will bet that yours is set to 'path_mode_full' which is the old style
1.2 dialog, which removes an extra filter field and has the full paths in
the dialog box.
nedit*FileSelect.pathMode: path_mode_relative
Which is what my NEdit is set to by default. If I change it to the other I
get the behavior that you experience. So, to put it simply, I have the
nedit*FileSelect.pathMode: path_mode_relative
nedit.StdOpenDialog: true
and you have
nedit*FileSelect.pathMode: path_mode_full
nedit.StdOpenDialog: false
More or less. What version of Motif are you using? Maybe lesstif does these
things differently than OpenMotif?
Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
--
+--------------------------------------------------------------+
| George Ganoe | NASA Langley Research Center |
| AST - Computer Engineer | Electromagnetics & Sensors Branch |
| phone: 757.864.1940 | 8 North Dryden Street |
| fax: 757.864.7891 | Mail Stop 473 |
| B-1299 Rm-113 | Hampton, VA 23681-2199 |
+--------------------------------------------------------------+
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Aaron W. Hsu
2011-03-22 23:56:47 UTC
Permalink
Post by George Ganoe
The Xm library is not a part of motif, but it is a dependency of nedit and motif
as well. You need to install that library on your system (it may already be
there) and the -dev files for the libraries as well since you are building nedit
from source.
Motif provides Xm/Xm.h. That's the primary Motif public header.

Aaron W. Hsu
--
Programming is just another word for the lost art of thinking.
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
George Ganoe
2011-03-23 13:52:28 UTC
Permalink
Aaron,

Thanks for the clarification. On Ubuntu, libmotif3 lists libxmu6 as a
dependency, and calls it "X11 miscellaneous utility library", so I assumed it
was the Xm lib he was missing, but now that I look closer, I see that
libmotif3 provides the libXm library, and libxmu6 is apparently just some X11
routines that motif needed to work.

George
Post by Aaron W. Hsu
Post by George Ganoe
The Xm library is not a part of motif, but it is a dependency of nedit and motif
as well. You need to install that library on your system (it may already be
there) and the -dev files for the libraries as well since you are building nedit
from source.
Motif provides Xm/Xm.h. That's the primary Motif public header.
Aaron W. Hsu
--
+--------------------------------------------------------------+
| George Ganoe | NASA Langley Research Center |
| AST - Computer Engineer | Electromagnetics & Sensors Branch |
| phone: 757.864.1940 | 8 North Dryden Street |
| fax: 757.864.7891 | Mail Stop 473 |
| B-1299 Rm-113 | Hampton, VA 23681-2199 |
+--------------------------------------------------------------+
--
NEdit Discuss mailing list - Discuss-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/discuss
Continue reading on narkive:
Loading...