How do I set the default cursor from .gtkrc?

2006-03-05 Thread Toby
I have been trying to solve this problem for a while, but Google is of
no help and I don't seem to be able to find any piece of documentation
about the .gtkrc file.

My root window has its default 'X' cursor, which (I think) is good.
Various applications set different cursors: xterm has the 'I' one, the
window manager has the '->|' resize handles, browsers have a left arrow,
'I' beam, or hand depending on context... which is all good.

The problem I have is with GTK apps: they seem to inherit the root 'X'
cursor for most of their widgets, which makes using them a bit clumsy.

Is there a way to set a different default cursor in .gtkrc (such as the
left arrow) while sill keeping the 'X' cursor on the root window?

Is this a bad idea for any reason? 
What is the behaviour of the old, original UNIXes, for reference?


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Usability of the GTK+ 2 file open dialog

2006-03-07 Thread Toby
I'd like to join the ranks of those who are frustrated by GTK2's file
dialog.  Here are a few (somewhat arbitrary) suggestions to improve it
without rewriting it from scratch.

Typing a few letters now starts a quick-search for filenames.  First
suggestion: pressing Tab should 'filter' the files displayed as to
include only those who begin with the string (case-insensitive) possibly
preceded by some symbols.  A 'filtered' icon should appear somewhere.
Pressing Tab in a filtered dialog (without a quick-search going on)
should unfilter it.

Now for one of the most annoying things ever: how in the world am I
supposed to select hidden files on GTK2's file dialog!?  Sometimes I get
so frustrated that I have to RENAME the file in a shell, edit it and
then rename it again!  How could its designers forget something like
this?  Or if they didn't, it must be the most counter-intuitive
keystroke ever.

Here's what I'd do: hitting '.' should *immediately* show the hidden
files.  Hitting Tab after '.' should follow the behaviour listed above,
that is filtering the display to only show hidden files.

Another one: who came up with the retarded idea of "Browse for other
folders"?  Just show the damn thing already!  Why add 1 useless click
(on a small widget on top of that) to 90% of file dialog usage?

One minor thing: I noticed that Alt-Up goes to the parent directory.
I'd give Backspace the same behaviour, following popular OS usage.

This is only based on my user experience.  I'm sure more people will
come up with other issues about features I'm not using (~ expansion...)


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Usability of the GTK+ 2 file open dialog

2006-03-07 Thread Toby
Michael L Torrie wrote:
> Really under Windows, GTK ought to be using the win32 file selector
> instead of it's own one.  That's what users expect.

By the way, based on my limited experience (trying to get a few people
to use The Gimp instead of buying Paint Shop Pro—and failing) the custom
file chooser is what annoys Windows users the most about GTK apps.

Detachable menus should also be turned off by default on Windows. 
To its users it just doesn't look right.


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Usability of the GTK+ 2 file open dialog

2006-03-07 Thread Toby
Sven Neumann wrote:
> Right-click and select "Show Hidden Files" from the menu.

Wow!  I wouldn't have tried that in a million years!

I thought obscure features only came in the form of obscure keystrokes:
I stand corrected.


> Yes, there should be a way to globally enable this.

That's not the point, I wouldn't enable it even if there was a way.

You only need to open a dot-file once in a while.  The point is, when
you actually need to, how do you expect people to start poking at the
file dialog and 'discover' this feature in another file's context menu?


Michael L Torrie wrote:
> I believe this option needs to be in each dialog box and should be
> easily accessible.  

Exactly as Firefox was doing in its custom file chooser, before using
GTK2's one: a simple checkbox in a corner of the dialog, reading «Show
hidden files and directories».

That and pressing '.' (see my first reply.)


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Usability of the GTK+ 2 file open dialog

2006-03-07 Thread Toby
Michael L Torrie wrote:
> The need to press Enter twice occurs when I'm typing a full path 
> (say /tmp/blah).  That is annoying.

Many times when you're typing a full path, you only want to type the
directory part and then browse the files therein.  I think that's what
the double enter is for.  

But you're right, when a user types the full path of a file (as opposed
to a directory) the double enter could be 'shortcut'.


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Usability of the GTK+ 2 file open dialog

2006-03-07 Thread Toby
Petr Tomasek wrote:
> Humm... this seems a wrong approach to me. The user should decide
> whether a particular bookmark is meant for one application only or
> globaly, not the application... :-o

And she should be able to set an application-specific bookmark, as
opposed to a global one, without the application programmer having to
explicitly enable such a feature.


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: How to report user errors

2006-03-08 Thread Toby
Jacob Kroon wrote:
> Let's say the container class had a method which would perform an
> operation on all of it's children, and that this operation could fail.
> If an error occures somewhere down in the hierarchy I wan't the caller
> to be notified, a message, and if it was a child who caused the error,
> report it too.

I would define a struct error, with a pointer (or name) of the object
that's raising the error condition, appropriate strings to hold messages
about the error, and an array of pointers to the struct errors of the
(direct) children that raised the error.  Which could have raised the
error themselves OR contain pointers to their children's struct errors.

All the methods return a pointer to their own struct error, or NULL if
no error occurred neither in their call nor in their children's.  The
top-level invocation could instead do the parsing of the struct error
tree and return something else more legible by the library's users.

Um, actually I would use Lisp instead of C, but I guess that's not the
answer you're looking for :-)


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: More on GTK usability

2006-03-09 Thread Toby
Peter Eckersley wrote:
> control-u to blank the line, anyone?

Put  gtk-key-theme-name="Emacs"  in  ~/.gtkrc-2.0

I almost broke a bottle of champagne when I discovered this gem on a
random webpage :-)

> someone should really get around to building a new command line shell
> that is GUI-fied and does things the same way.

People have been trying (and failing) to do it for ages.  
You're welcome to design your own version.  I wish you success!


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Asking for advice on embedded gtk guiand web browser.

2006-03-12 Thread Toby
Li Weichen wrote:
> 1. Is gtk a name of GUI?  If it is, can it be properly cross compiled
> for embedded use?

GTK is a GUI library.  If you are a programmer you can use GTK to "draw
buttons" and receive events.  It is NOT a complete GUI environment, such
as GNOME.  Yes, programs using GTK can be cross-compiled.


> 2. Is there any ready to use embedded gtk GUI?

I think you are looking for an "Embedded GUI" in the sense of Qtopia:
http://www.trolltech.com/products/qtopia/

Qtopia is based on QT, which is another GUI library.  I don't know of
any similar projects based on GTK, but maybe someone else here does.
Try to search Google: http://www.google.com/search?q=embedded+gui


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: How to set keybindings for gtk2?

2006-03-15 Thread Toby
Tetsuji Maverick Rai wrote:
> I'd like to set keybindings for gtk2 to Emacs-like.

Maybe you're having some detail wrong.  Just put the following line at
the end of the file  .gtkrc-2.0  in your home directory and save it as a
plain, ASCII, unix-style text file:

gtk-key-theme-name="Emacs"

If it doesn't work, try deleting all the other lines in that file
(but make a backup copy first)

If you still have problems, maybe you should tell us what distribution
and gtk+ version you're using.  Chances are your installation is missing
/usr/share/themes/Emacs/gtk-2.0-key/gtkrc  for whatever reason.


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Question about GdkColor

2006-03-17 Thread Toby
yeajchao wrote:
> My question is how to map (0--255) to (0--65535)

Multiply by 257.


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


How do I set the default cursor from .gtkrc?

2006-03-23 Thread Toby
I've been trying to solve this problem for a while, but Google is of no
help and I don't seem to be able to find any piece of documentation
about the .gtkrc file.

My root window has its default 'X' cursor, which (I think) is good.
Various applications have different cursors: xterm has the 'I' one, the
window manager has the '->|' resize handles, browsers have a left arrow,
'I' beam, or hand depending on context... which is all good.

The problem I have is with GTK apps: they seem to inherit the root 'X'
cursor for most of their widgets, which makes using them a bit kludgy.

Is there a way to set a different default cursor in .gtkrc (such as the
left arrow) while sill keeping the 'X' cursor on the root window?

Is this a bad idea for any reason? 


Toby

-- 
Signed/encrypted mail welcome.  GPG/PGP Key-Id: 0x15C5C2EA
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list