Attach objects to text in GtkTextview

2005-08-25 Thread Mathias Andre
Hi,
I'm using a GtkTextView to display some text. 
Now what'd I'd like to do is to attach some extra informations to words.
For example attach a file's uri to a particular word (like a link in web
browser). I could attach a GtkTextTag to a word, but then I would need
to create one different TextTag for every word (as most words would have
different links).

Anyone got any idea how I could do this?

Thanks,
Mathias


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


Re: gobjects, glists and arrays beginners question

2005-05-26 Thread Mathias Andre
Hi Kim,

You can find a really complete GObjects tutorial at
http://www.le-hacker.org/papers/gobject/

If you don't really know where to start have a look at the boilerplate
gobject code in this tutorial.

Good luck,

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

Re: Window size and position

2005-04-24 Thread Mathias Andre
Thanks for all the answers.

I found the reason why the window was moving slightly eveytime I
stored/restored its position.
From developer.gnome.org:
http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-get-position

---
gtk_window_get_position() is not 100% reliable because the X Window
System does not specify a way to obtain the geometry of the decorations
placed on a window by the window manager. Thus GTK+ is using a best
guess that works with most window managers.

Moreover, nearly all window managers are historically broken with
respect to their handling of window gravity. So moving a window to its
current position as returned by gtk_window_get_position() tends to
result in moving the window slightly. Window managers are slowly getting
better over time.

If a window has gravity GDK_GRAVITY_STATIC the window manager frame is
not relevant, and thus gtk_window_get_position() will always produce
accurate results. However you can't use static gravity to do things like
place a window in a corner of the screen, because static gravity ignores
the window manager decorations.

If you are saving and restoring your application's window positions, you
should know that it's impossible for applications to do this without
getting it somewhat wrong because applications do not have sufficient
knowledge of window manager state. The Correct Mechanism is to support
the session management protocol (see the GnomeClient object in the
GNOME libraries for example) and allow the window manager to save your
window sizes and positions.
---

Mathias

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