Re: [ADMIN] Looking for new list maintainer

2016-06-21 Thread Dave Howorth

On 2016-06-21 14:50, Leandro Pereira wrote:

On Tue, Jun 21, 2016 at 2:29 PM, Leandro Pereira 
wrote:


If you'd like to be the new maintainer please send me a private email, and
I'll list you as the administrator.



Emmanuele Bassi just manifested interest in maintaining the list, and I've
passed the token to him.


Thanks, Leandro. Thanks, Emmanuele.


Cheers,
Leandro

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Compiling for Windows [Was: argv revisited]

2016-05-03 Thread Dave Howorth

On 2016-05-03 16:57, Florian Pelz wrote:

I'd like to have one standard GTK+ installer for the GTK+ DLLs etc. that
can be downloaded and installed from other installers, so there is just
one GTK+ installed on Windows instead of one copy of perhaps different
versions of GTK+ for each application.


That's been a longstanding desire of many people. The other side of the 
argument of course is that all the applications have to be compatible 
with that particular version of the libraries, which has sometimes 
proven to be problematic even when the libraries ship with Windows. 
Expecting every application to be updated every time there is a library 
update is not realistic. It's not like a linux distro where the distro 
can update and recompile all the dependencies itself.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Remote gtk3 app rendering issues

2016-04-21 Thread Dave Howorth
Sorry, ignore my message. Posted before brain was engaged. The OP is 
asking about something different, where I believe I understand the X 
mechanism but not how gtk3 uses it.


On 2016-04-21 10:30, Dave Howorth wrote:

On 2016-04-21 01:35, Daniel Kasak wrote:

Greetings all. I have a bizarre issue that makes me wonder if I
understand how remote X applications work ...

I'm running Sabayon Linux on my dev laptop. My work has a bunch of
Ubuntu 14.04 LTS servers. When I ssh into a server and run a gtk3 app,
it renders widgets in a horrible 3.1 style, and many icons are
missing.

But if I tar up /usr/share/themes/Ambiance on the server, and dump it
into my ~/.themes on my laptop, the widgets render in the 'Ambiance'
theme - but *only* if I *also* tell my local window manager (
Enlightenment ) to use the Ambiance theme. I usually use the Adwaita
theme. I see that Ubuntu 14.04 LTS doesn't have the Adwaita theme -
maybe it's too old for this?

What's going on here? I thought the X client did all the rendering,
and pushed pixmaps to the ( in this case, remote ) X server. But
clearly resources on my laptop are being used here.


You're correct that X clients are in control of the rendering. But
remember there are multiple X clients - in particular there is an X
client called the window manager, which is running on your laptop. Guess
what the window manager does? It draws the windows and their decorations.


Perhaps I'm approaching things incorrectly? What's the "recommended"
way of running remote ( gtk3 in particular ) apps and having them
render nicely - ie as they would if I was actually on the server I'm
ssh'd in to?


Sorry, can't speak to how gtk3 does things.


Dan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Remote gtk3 app rendering issues

2016-04-21 Thread Dave Howorth

On 2016-04-21 01:35, Daniel Kasak wrote:

Greetings all. I have a bizarre issue that makes me wonder if I
understand how remote X applications work ...

I'm running Sabayon Linux on my dev laptop. My work has a bunch of
Ubuntu 14.04 LTS servers. When I ssh into a server and run a gtk3 app,
it renders widgets in a horrible 3.1 style, and many icons are
missing.

But if I tar up /usr/share/themes/Ambiance on the server, and dump it
into my ~/.themes on my laptop, the widgets render in the 'Ambiance'
theme - but *only* if I *also* tell my local window manager (
Enlightenment ) to use the Ambiance theme. I usually use the Adwaita
theme. I see that Ubuntu 14.04 LTS doesn't have the Adwaita theme -
maybe it's too old for this?

What's going on here? I thought the X client did all the rendering,
and pushed pixmaps to the ( in this case, remote ) X server. But
clearly resources on my laptop are being used here.


You're correct that X clients are in control of the rendering. But 
remember there are multiple X clients - in particular there is an X 
client called the window manager, which is running on your laptop. Guess 
what the window manager does? It draws the windows and their decorations.



Perhaps I'm approaching things incorrectly? What's the "recommended"
way of running remote ( gtk3 in particular ) apps and having them
render nicely - ie as they would if I was actually on the server I'm
ssh'd in to?


Sorry, can't speak to how gtk3 does things.


Dan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Gtk+3 application Internationalization

2016-04-14 Thread Dave Howorth

On 2016-04-14 16:27, Emmanuele Bassi wrote:

On 14 April 2016 at 08:30, Ondrej Tuma  wrote:


because Stock Items are deprecated from Gtk+3.10, what can I use, if I
want to use gtk locales in my Application.


Use your own (localized) string.

Better yet, use readable strings that rely on the context of the
operation, instead of just random words that the tool kit itself has
no way to adapt to your case.


I don't know, if I understand it well, that I must translate all
strings in my application (copy from Stock Items) one more time to all
languages just like Gtk if I want to use them ?


It's hardly going to be an issue.


I don't understand. With the old method, I chose stock items and 
localisation was done automatically by the system, yes? As application 
author I didn't have to consider it.


How is localisation done in the new system? I've looked at

https://docs.google.com/document/d/1KCVPoYQBqMbDP11tHPpjW6uaEHrvLUmcDPqKAppCY8o/pub

but I'm afraid I still don't understand.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: how to prevent standby during critical operations on linux

2010-04-07 Thread Dave Howorth
A. Walton wrote:
 On Tue, Apr 6, 2010 at 6:05 PM, frm francesco.monto...@gmail.com wrote:
 Just a few more questions about it:
 1) the page you linked seems to contain API docs for a generic language (not
 necessarily C/C++) nor it contains any info about which library/header files
 contain those APIs... how can I use it from a C/C++ program?
 
 It's the D-Bus api, as it says on the page.

I suspect the OP's question was more about the documentation
conventions, the language binding conventions and details and an overall
'map' of the documentation set.

At least, that's what I think, coming to that page with no prior
context. I can assume what the method signatures mean and what a 'D-Bus
API' might be for but it's hard to make use of the information on the
page without a lot of digging around and the worry I might not have
found some important details or background.

The page would be improved enormously for readers new to the subject by
a link or two to the top levels of the documentation. A quick google
suggests that links to these documents might be appropriate, but there
may be better choices:

http://dbus.freedesktop.org/doc/dbus-specification.html
http://live.gnome.org/SessionManagement/GnomeSession
http://library.gnome.org/devel/dbus-glib/unstable/index.html

HTH, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Crash processing g_object_new arguments

2009-11-09 Thread Dave Howorth
David Nečas wrote:
 The real problem is `pointers are integers' from the dark times of C.

BCPL created many positive influences but this wasn't its finest
feature. At least as seen with the benefit of hindsight!

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: Has anyone been able to force TreeView expander with no children?

2009-10-16 Thread Dave Howorth
Daniel B. Thurman wrote:
 David Nec(as yeti physics muni cz
 (1) The signal is called row-expanded.
 
 [Dan] Thank you!  But how did you find this signal?

 The problem I have is: how do I capture the signal when the
 row is expanded?  I posted a follow up on this and it seems
 that the key is row-has-child-toggled, but this does not
 seem to work:
 
 self.treeview.connect('row-has-child-toggled', self.on_row_activated)
 TypeError: gtk.TreeView object at 0xb7b9ab6c (GtkTreeView at
 0x8df5080): unknown signal name: row-has-child-toggled
 
 I have, however tried:
 self.treeview.connect('row-activated', self.on_row_activated)
 
 and this works, except that the row has to be mouse
 double-clicked, which is not what I want.
 
 I sure wish there is a Python-GTK code somewhere
 that I could peruse to resolve my many issues!

I don't use Python, I use Perl. But I sometimes use the Python docs.

You asked Dan how he found the signal. How did you find the one you were
using? That's an oblique question. What I really mean is that
'row-has-child-toggled' is a signal on the model, so why do you expect
it to work on the view?

Are you aware of these python docs:

http://www.pygtk.org/pygtk2reference/class-gtktreeview.html
http://www.pygtk.org/pygtk2reference/class-gtktreemodel.html

http://www.pygtk.org/pygtk2tutorial/
and specifically
http://www.pygtk.org/pygtk2tutorial/sec-TreeModelInterface.html#sec-TreeModelSignals
http://www.pygtk.org/pygtk2tutorial/sec-TreeViewSignals.html

There's also
http://scentric.net/tutorial/treeview-tutorial.html

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to forbid people to change GtkCheckButton's status manually?

2009-08-26 Thread Dave Howorth
Edheldil wrote:
 Hi,
 since the checkbox is not interactive, you can as well get rid of it and
 replace it with an image or even with a simple label. No need to confuse
 user with an apparently non-working control.
 
 Edheldil
 
 
 donglongchao wrote:
 I want to use some GtkCheckButton to display some status in my app.But I 
 want to forbid my customer to change these checkbuttons' status(choosed or 
 not ) by their hands,and they can only be changed by my app itself according 
 to  some values,etc..I want to know how to do this.Will some one help 
 me?Thank you.

 And I do not know if I choosed the right widget to do this task.If not, will 
 some one tell me which one should be better? Thank you again.

I'm surprised nobody has mentioned gtk_widget_set_sensitive()

Cheers, Dave


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Stop alt-spacebar window menu

2009-06-01 Thread Dave Howorth
Bill Farmer wrote:
 I don't think it can be done without changing the window manager default
 key mapping, which apply to all apps. I can't find anything in the
 window and session manager functions part of the xlib documentation that
 says anything about key mapping. I've also tested a simple as possible X
 application with no Gtk in it at all, and it behaves just the same. So
 my problem  has nothing to do with  Gtk. But I didn't know that when I
 asked the question...

I think you're right. I think it's a general X question about how X
clients (a.k.a. applications) interact with the specific class of X
clients called window managers. I should have said that :)

So you may get a better answer on some X / W window manager list, but
the people on this list tend to be fairly knowledgeable so I was just
hoping I might prod somebody into remembering something.

My point (3) does hint there may be something in some API a normal X
client can use to change the window manager's key bindings. It might be
worth reading rdesktop's source.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Stop alt-spacebar window menu

2009-05-29 Thread Dave Howorth
Brian J. Tarricone wrote:
 2.  Suggest that users disable conflicting key bindings or, if that's
 not possible, use a different WM that doesn't have a conflicting key
 binding (or is configurable).

 You can't.  The WM doesn't care what app is focused.  It'll eat the key
 regardless.
 
 And besides, even if you do find a solution for GNOME, what about people
 who run KDE?  Xfce?  LXDE?  *box?  Ratpoison?  ..

Bill's problem is interesting. It seems like a real reason to want to
use particular keys. And X11's motto is 'mechanism not policy' so I'd
persist in trying to find a solution for a while :)

I don't know the answer but I've found a few hints.

(1) a lot of window managers allow you to configure their keybindings
(e.g. kwin, xfwm, icewm) so maybe that is worth looking at.

(2) The ICCM says http://tronche.com/gui/x/icccm/sec-6.html#s-6.3
Window managers should ensure that they provide some mechanism for
their clients to receive events from *all* keys and all buttons (my
emphasis) so there's some hope that every window manager will allow
reconfiguration. The bad news is that they may all do it in different ways.

(3) there is a program called rdesktop that lists the following option
-K Do not override window manager key bindings. By default rdesktop
attempts to grab all keyboard input when it is in focus.
Which suggests there might be a way to do what you want.

(4) I found the following tantalising hint It is possible
to replace most window managers on the fly now with the −−replace
switch, which opens another possibility :)

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: setuid / setgid

2009-03-02 Thread Dave Howorth
John Emmas wrote:
 It gives a link to a web page for more information
 (http://www.gtk.org/setuid.html) but to be honest, it doesn't explain the
 situation very well.  It doesn't explain what a setuid program is, nor
 why a program that was never previously a setuid program would suddenly
 become one.

That page seems to explain the issue quite well to me, but then I know
what setuid means and presumably you don't. But did you think to look up
the meaning of the word? The first hit in google is to a wikipedia
article that explains the basics. setuid is a longstanding 'well-known'
part of the unix/linux system security architecture so IMHO it's
unreasonable to ask that the web page should explain it.

When you understand the concept a little, you'll see that it has to do
with file permissions and user ids, so if you still have trouble then
posting the relevant details of your system will help anybody trying to
help you.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Forking from Gtk

2008-07-08 Thread Dave Howorth
G Hasse wrote:
 But I realy NEED to create a longlived process (running for a week or
 month) and be able to quit the GUI whenever I like. The glib is
 just a wrapper - and i don't se the solution...
 
 I realy WANT to lose contact with the child process. And there
 is to mutch data from the GUI to pass it on the command line...

IMHO, in this circumstance, you still shouldn't have the GUI start the
long-lived process. You'll probably want some other mechanism to
[re]start the process in the event something goes wrong whilst it's
running. So set up the starting mechanism as a cron job or server
watchdog process. Then the GUI can just write the appropriate parameters
to a database or file or socket as you wish and the starting mechanism
will do the rest. No threads or forks in the GUI.

Cheers, Dave

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Locale definitions, dots and commas

2008-03-13 Thread Dave Howorth
Martin (OpenGeoMap) wrote:
 I am building an intermediate  unit system for engineeres in Gobject and 
 i hope publish this library soon.
 With this system you always work in lineal measures in meters (double), 
 and you can input others (inches, centimeters)
 
 input system - intermediate system -out system
 
 you can input in a entry for example (22m, 22 m, 220cm,...) and 
 internally you have a double always in meters.

How do you deal with precision? 22 m is not the same as 22.000 m

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Locale definitions, dots and commas

2008-03-13 Thread Dave Howorth
Martin (OpenGeoMap) wrote:

 Yes 22 m is the same as 22.000 m

No, they are not the same. The second one says that something is known
to within a mm. The first does not.

 PERL Regular expresions are great in C also, but better in perl and 
 Ruby  8-)
 To learn a little about regular expresion you need a PERL book:
 http://www.oreilly.com/catalog/regex/

Thanks but I have a few. I program in Perl (as well as C etc)

 Bad example.  22 can be expressed exactly in 2s complement.  3 cannot.

The issue is nothing to do with computer representation. Look up
'significant figures'.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


getting setting colors

2008-02-20 Thread Dave Howorth
I want to temporarily change the background or foreground color in a
widget (TextBuffer or Entry), to highlight errors.

I've found gtk_widget_modify_bg, which looks like it will let me change
the background colour, but I can't see any way to return the color to
what it was previously. I suppose I ust be missing something obvious :(
Is there a getter for the background color that I'm not seeing?

Thanks, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Treeview column width changed signal

2008-02-11 Thread Dave Howorth
Jeffrey Barish wrote:
 Gorshkov wrote:
 
 You don't have to set the widths again every time you show them. When
 the TreeView becomes hidden/not hidden or visible/not visible, it will
 have the same properties and values it had the last time it was visible.
 The ONLY time you have set those values is when you display/realize the
 TreeView for the first time - I do it in my initialization code when I
 first create the widget.
 
 I know this.  I am not sure what I wrote that gave you the impression that
 this is what I am trying to do.

I just reread the thread and what you wrote to give that impression is
quite clear to me. I suggest you do the same to review what you said and
to re-evaluate what people have suggested.

I'll offer one further suggestion:

In order to determine the column widths, first see if the treeview
exists and if it does, ask it. If it doesn't exist, read the widths from
a file.

Create and maintain the file by hooking the destroy and delete events as
Gorshkov suggested.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Displaying a (simple) list of strings

2007-12-05 Thread Dave Howorth
asdf wrote:
 Hi,
 
 I am just getting started with GTK+ programming using C. And after having 
 spent a
 few hours going through the GTK+ 2.0 tutorial, I am having a hard time 
 understanding
 and writing code to display a bunch of strings in a List (TreeView) widget.

Have you read this one?
http://scentric.net/tutorial/treeview-tutorial.html

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


detecting tree searches

2007-10-23 Thread Dave Howorth
My application takes actions when a different row is selected in a
TreeView (based on the TreeSelection changed signal). But I want to
distinguish those cases where the selection changes because the user is
typing in a search key. Is there any way to tell when a search is in
progress?

I've noticed the start-interactive-search signal but I haven't found
something to tell me when the search finishes.

Thanks, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


focus

2007-09-26 Thread Dave Howorth
Is there an explanation of gtk's focus mechanism somewhere? That is, an
overview of how focus works, what the various focus-related signals mean
etc. I've googled but haven't found anything.

Thanks, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: start-editing signal?

2007-09-25 Thread Dave Howorth
Allin Cottrell wrote:
 On Mon, 24 Sep 2007, Kristian Rietveld wrote:
 
 On Fri, Sep 21, 2007 at 06:05:15PM -0400, Allin Cottrell wrote:
 My expectation: the unfinished edit will still be in place. 

 Actual behaviour: the bottles of coke cell is as it was before I 
 started; my edit-in-progress is gone.

 This may not be a bug as such, but I would like to know if there's 
 a way of preserving the state of the cell-editing process, in face 
 of the treeview window temporarily losing focus.
 The behavior you describe is indeed the current behavior in GTK+ 
 = 2.10 (and actually has some kind of history, but I won't 
 bother you with that ;).
 
 OK, thanks.  I've now updated myself on some of the history via 
 bugzilla.
 
 At this moment there is no code in GTK+ to automatically 
 preserve the value on focus out.  However, since there are 
 multiple different cases in which a focus-out should commit the 
 new value and also a lot of cases in which a focus-out should 
 *not* commit the new value, we are thinking of adding a property 
 to GtkCellRendererText which will control whether the input the 
 user has entered should be committed on focus-out or not.
 
 I haven't studied all the reports on this, but I have looked at 
 several of them.  I'll venture this opinion:
 
 The default behavior should just be to preserve state (the edit 
 remains in progress; it is neither automatically finalized nor 
 automatically destroyed).  Isn't this what users generally expect 
 of any GUI element that temporarily loses focus?  Surely loss of 
 focus should not, of itself and in general, DO anything, either 
 positive (commit the edit) or negative (lose the edit).

Absolutely! I run my window manager with a 'focus follows mouse' policy.
So a widget losing focus might mean that my cat has moved the mouse or
it might mean I've gone to another application to look for information,
perhaps to copy some text to paste into the widget. It might mean the
system has popped up a completely unrelated alert that has grabbed the
focus.

It seems a no-brainer that loss of focus should do *nothing* to the edit
state, nor should a subsequent regaining of focus. Explicit keyboard or
mouse actions on the widget itself should be used to change state, or
method invocations by associated widgets because of user actions on
them. That's fundamental for a sane user experience, I believe.

Yes, there are programming issues associated with abandoning a widget in
an editing-in-progress state but they just need careful coding.

JMHO, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


GtkEntryCompletion popup size

2007-09-11 Thread Dave Howorth
I'm using a GtkEntryCompletion in popup-mode and controlling the list of
matches myself. I see that it displays up to 15 matches and if there are
more it adds a scroll bar to the popup window.

For my purposes it doesn't seem worthwhile to have a scroll bar. Is
there any way to control whether or when a scroll bar is added? Or is
there any way to discover the maximum number of rows that will be
visible in the popup? Or is it always guaranteed to be 15?

Thanks, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkScale GtkHScale with multiple sliders and values?

2007-09-05 Thread Dave Howorth
[EMAIL PROTECTED] wrote:
 On 9/5/07, v4r4n [EMAIL PROTECTED] wrote:
 I've been trying to figure out how to create a GtkHScale that would let the
 user determine the beginning, middle, and/or end of a single data set.

Sounds like you're looking for something like the control used by the
Gimp's Colour Levels input level tool (Tools/Color Tools/Levels). If so,
it may be worth browsing the code :)

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: tree view column sizing problem

2007-08-28 Thread Dave Howorth
Allin Cottrell wrote:
 I have a tree view with 3 columns, which sits within a scrolled 
 window.  
 
 The middle column contains what can be quite a lengthy string. 
 When the user opens the window in question, I'd like her to be 
 visually aware that the third column is there: the problem is that 
 with the columns autosized, the length of the middle string can 
 push the third column out of the visible zone (you have to scroll 
 horizontally to reach it).

I presume you can't just swap the second and third columns?

 The ideal solution, I think, would be (a) set the starting width 
 of the middle column to some reasonable maximum (when the window 
 is first opened), but then (b) allow the user to expand it to read 
 the full string if need be.

If the user can be satisfied with seeing one complete string at a time,
another option is to add a full-width label widget at the bottom of the
window showing the content of the second column of the currently
selected row. That avoids the need for the user to resize anything.

Or add tooltips to the column.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: dynamic combo entry

2007-08-10 Thread Dave Howorth
[posted back to list and trimmed]
Varun Khaneja wrote:
 On 8/7/07, Jim George [EMAIL PROTECTED] wrote:
 On 8/7/07, Dave Howorth [EMAIL PROTECTED] wrote:
 Jim George wrote:
 It may not be exactly what you want, but gtk_entry_set_completion might 
 help.
 It looks interesting. I've found the page in the reference manual and it
 says lots of things that sound intriguing but I'm having trouble
 grasping exactly what a GtkEntryCompletion can do :(  Are there any
 tutorials or examples to help me understand what it's capable of?

 Cheers, Dave

 Here's a quick example:
 ...

 Hi Jim,

 While I was reading through your reply to Dave, I said to myself, wow
 that's one really useful user interface practice. Great!

 What I thought of as an extension to this is: If the list is not huge
 to start with, maybe you could popup the names that match not just the
 beginning, but anywhere in the entire string.
 The question then rises, would it really be of any use? From my habits
 (or ability to remember and recall) it happens quite often that I
 remember the middle or end part of the name, but not the starting.

 There is a firefox extension that does something similar for typing
 URLs in the address box: myurlbar_a

 You could give it a thought, maybe.

I tried this with my half-million choice list :) It seemed it could be
useful if you can only vaguely remember what you're looking for, but
there was a practical problem for me. Because I'm truncating the
completion list, it sometimes happens that the desired choice never
appears in the list.

My list is of taxonomy entries, so for example suppose you want the
genus 'Homo'. It turns out that there are so many entries with 'homo'
somewhere in them that sort alphabetically before H that the term never
appeared. So in my case the strategy is no good.

I suppose I could have gone on to add a more clever ordering algorithm
but that seems overcomplicated. As it is, I still have to use a regex
because some of the names start with ' or ( or other bizarre characters
that people will never be able to guess. So I do allow the typed in
string to match either at the beginning or from the second character.

The bottom line is that the exact algorithm is likely to depend on the
details of the dataset and that it's fairly easy to add this type of
feature to your application.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: dynamic combo entry

2007-08-10 Thread Dave Howorth
Jim George wrote:
 On 8/7/07, Dave Howorth [EMAIL PROTECTED] wrote:
 Jim George wrote:
 It may not be exactly what you want, but gtk_entry_set_completion might 
 help.
 It looks interesting. I've found the page in the reference manual and it
 says lots of things that sound intriguing but I'm having trouble
 grasping exactly what a GtkEntryCompletion can do :(  Are there any
 tutorials or examples to help me understand what it's capable of?

 Cheers, Dave
 
 Here's a quick example:
 ...
 
 I use this when asking the user for a remote host name. I store a list
 of most-recently-used hosts, which populates the completion list. When
 the user types in a host name, if the first few characters match, a
 list pops up with all the remaining matches. Unfortunately, unlike a
 combo box, there's no way for the user to force this list to be shown
 (feature request?) In your case though (with 0.5e6 entries), this may
 actually be A Good Thing.

Thanks for the example, Jim. It does what I want and I've got a working
application now. What I'm doing is reloading the completion list as the
user types, so a short list of possibilities is visible at all times.

Thanks, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


gtk-demo

2007-08-09 Thread Dave Howorth
Emmanuele Bassi wrote:
 gtk-demo includes working code for printing.
 you should have a look at it.

I just saw this and it was the first I'd heard of gtk-demo! So this is
just to point it out to anybody else like me.

It's probably installed on your system. I just had to type 'gtk-demo'
for it to run. It's well worth trying - thanks to the authors.

Also, I tried to find any mention of it on the gtk.org site. Even
googling 'gtk-demo site:gtk.org' doesn't produce a good hit. So it might
be worth adding to the FAQ and the documentation links, IMHO. And the
API reference etc etc :)

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: dynamic combo entry

2007-08-07 Thread Dave Howorth
Jim George wrote:
 It may not be exactly what you want, but gtk_entry_set_completion might help.

It looks interesting. I've found the page in the reference manual and it
says lots of things that sound intriguing but I'm having trouble
grasping exactly what a GtkEntryCompletion can do :(  Are there any
tutorials or examples to help me understand what it's capable of?

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GTK STOCK ascending and descending

2007-08-02 Thread Dave Howorth
Alvis Koon wrote:
 Just wonder, why the GTK stock item icon of A-Z ascending and
 descending are displayed with blue and red arrows respectively?
 
 In my opinion, it will give the user a sense of activation for turning red.
 When turning blue, it looks as if deactivated.
 Actually they can both activated in both sense.

Stock prices in the London market are traditionally shown with blue for
upticks and red for downticks. Some other markets use green for the
upticks. There's a potential difficulty with using green because of
red-green colour blindness, though it doesn't seem to cause much problem
in practice.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Not show selection of a tree view column

2007-07-26 Thread Dave Howorth
Peter Clifton wrote:
 I think a brand new widget might be needed - one which has a more
 table like rendering model.

I presume a GtkTable isn't table-like enough :)

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: drag-data-received signal not being emitted

2007-06-28 Thread Dave Howorth
Chris Morrison wrote:
 On Wed, 2007-06-27 at 10:43 +0100, Dave Howorth wrote:
 I wrote:
 In particular, I believe you will also need to call
 gtk_tree_view_enable_model_drag_dest and/or
 gtk_tree_view_enable_model_drag_dest on the tree_view.
 Oops. Second one should be gtk_tree_view_enable_model_drag_source of course.

 I tried using gtk_tree_view_enable_model_drag_dest() on my tree view and
 it caused some really strange stuff to happen:

Odd, I've just had a good experience with it. I looked at the code that
implements gtk_tree_view_set_reorderable and saw that it calls the two
functions I mentioned. So it's a layered API but that's helpfully not
mentioned in the doc. Anyway, once I realized that, it was obvious that
I needed to replace my call to set_reorderable with my calls to
enable_model_drag_dest and enable_model_drag_source, rather than call
them in addition to it. It was also obvious that I needed to make sure
that I used the same arguments that it did so that the whole built-in
drag'n'drop mechanism kept working. Except I needed to change the one
argument that I wanted different behaviour for.

Now I can drag nodes from one view of the tree and drop them on another
view. Eliminates dragging/scrolling across thousands of nodes.

I'm using the Perl bindings, so my actual working code looks like this:

# The target entry must match that used by
# gtk_tree_view_set_reorderable in order for the built-in
# drag'n'drop support to keep working
# Except I use 'same-app' instead of 'same-widget'
#
my $target_entry = {
target  = 'GTK_TREE_MODEL_ROW',
flags   = ['same-app'],# Gtk2::TargetFlags
info= 0,
};

# Alternatively:
#my $target_entry = [ 'GTK_TREE_MODEL_ROW', 'same-app', 0 ];

$tree_view-enable_model_drag_dest(
['move'],
$target_entry,
);

$tree_view-enable_model_drag_source(
'button1-mask', # $start_button_mask,
['move'],
$target_entry,
);

 I got a segmentation fault when ever I tried to access the GList of
 targets in drag_context-targets in my drag_drop handler.
 
 If I returned FALSE from my drag_drop handler (i.e. to indicate the drop
 was not over a valid area of the widget) the drag-data-received signal
 was emitted but then I got a GTK critical assertion failed error.
 
 I think I might give up on the GtkTreeView and use a GtkIconView widget
 instead.

Not an option for me, since I'm playing with trees. I'd have to abandon
gtk altogether and move to another widget set, and probably language.
Swing, anybody? :)

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to determine *actual* visible region of a window?

2007-06-27 Thread Dave Howorth
Gaurav Jain wrote:
 For the purpose of my application, I need to programmatically
 determine the actual 'exposed' region of a gdk window.  The exposed
 region should not include any obscured regions of the window.  For
 example, if there's some external window in front of my application's
 window, then the exposed region should not include the area obscured
 by that external window, but should include all other area that's
 visible.
 
 I tried using the API gdk_drawable_get_visible_region() but this
 doesn't exclude the obscured regions, so it's not of my use.
 
 Does somebody know of any suitable API that I can use to achieve what
 I want?  Or is there a method that somebody could suggest that I could
 use to calculate this region?

I'm pretty much a beginner with gtk but I do know a bit about X and you
haven't had an answer, so here's what I understand:

What is currently exposed is dynamic, of course, so it's event driven. I
believe you need to get the GdkEventExpose structure from a GdkEvent of
type GDK_EXPOSE and then look at the GdkRegion structure within it,
which contains the information you're looking for.

You'll need to enable such events on your window. You can also cause
such an event any time you want by calling queue_redraw.

HTH, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: drag-data-received signal not being emitted

2007-06-27 Thread Dave Howorth
Chris Morrison wrote:
 Hi all,
 
 I am trying to write a GTK/GNOME application. It has a main window with
 GtkTreeView control on to which you can drag and drop files from
 Nautilus.
 
 The code I have used to set up the widgets is:

snip

 However, although the drag_drop signal is being received OK the
 drag_data_received signal is not being emitted at all. I have scoured
 the GTK documentation and Google but can find nothing on this.
 
 Any pointers would be appreciated.

I'm also trying to make drag-and-drop work in a tree and not finding
much in the docs. The best docs I've found so far are for the Python
bindings. Try:

http://www.pygtk.org/pygtk2tutorial/sec-TreeViewDragAndDrop.html
http://faq.pygtk.org/index.py?req=showfile=faq13.033.htp
http://faq.pygtk.org/index.py?req=showfile=faq13.034.htp

In particular, I believe you will also need to call
gtk_tree_view_enable_model_drag_dest and/or
gtk_tree_view_enable_model_drag_dest on the tree_view.

That said, I haven't managed to make it all work yet, so I'd be very
interested to see any working code - in my case for a tree rather than a
list.

Cheers, Dave

 Regards,
 
 
 Chris
 
 
 ___
 gtk-app-devel-list mailing list
 gtk-app-devel-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
 

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: drag-data-received signal not being emitted

2007-06-27 Thread Dave Howorth
I wrote:
 In particular, I believe you will also need to call
 gtk_tree_view_enable_model_drag_dest and/or
 gtk_tree_view_enable_model_drag_dest on the tree_view.

Oops. Second one should be gtk_tree_view_enable_model_drag_source of course.

Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: drag-data-received signal not being emitted

2007-06-27 Thread Dave Howorth
I wrote:
 I'm also trying to make drag-and-drop work in a tree and not finding
 much in the docs. The best docs I've found so far are for the Python
 bindings.

Murphy's alive and well. Just twenty minutes later and my words are
wrong :) I've just found this site:

http://www.codase.com/search/call?name=gtk_tree_view_enable_model_drag_sourceowner=lang=*project=search=Searchtype=parameters=nparams=-1obj=constant=

I'm hopeful it might have some interesting links.

Cheers, Dave
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list