Re: [Gtk#] TreeView.

2005-09-22 Thread Christian Neumair
Am Dienstag, den 20.09.2005, 20:05 +0200 schrieb Nicolas Cormier:
 I have a Treeview and I want to active the EnterNotifyEvent when a the
 user's cursor is on a row.
 
 I active the EnterNotifyEvent for the treeview but it works only for
 the entire of the widget.

See [1] for a patch against Nautilus which does what you want.

The interesting thing you have to grasp is

a) you only have motion notify events inside a tree view widget
b) you'll have to check what path is active on each motion event
c) the algorithm you can use to detect changes to the hover path, inside
the motion notification handler, where the GdkEventMotion is event, is:

GtkTreePath *hover_path;
GtkTreePath *last_hover_path;

/*  last_hover_path = foo-stored_path; fetch last hover path */
  gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget),
 event-x, event-y,
 hover_path,
 NULL, NULL, NULL);
/*  foo-stored_path = hover_path; write back new hover path */

  if (!(last_hover_path == NULL  hover_path == NULL) 
  (!(last_hover_path != NULL  hover_path != NULL) ||
gtk_tree_path_compare (last_hover_path, hover_path) != NULL)) {
/* do whatever you want with the new hover path */
  }

[1] http://bugzilla.gnome.org/attachment.cgi?id=49082action=view

-- 
Christian Neumair [EMAIL PROTECTED]
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: [Gtk#] TreeView.

2005-09-22 Thread Nicolas Cormier
On 9/22/05, Christian Neumair [EMAIL PROTECTED] wrote:
 Am Dienstag, den 20.09.2005, 20:05 +0200 schrieb Nicolas Cormier:
  I have a Treeview and I want to active the EnterNotifyEvent when a the
  user's cursor is on a row.
 
  I active the EnterNotifyEvent for the treeview but it works only for
  the entire of the widget.

 See [1] for a patch against Nautilus which does what you want.

 The interesting thing you have to grasp is

 a) you only have motion notify events inside a tree view widget
 b) you'll have to check what path is active on each motion event
 c) the algorithm you can use to detect changes to the hover path, inside
 the motion notification handler, where the GdkEventMotion is event, is:

 GtkTreePath *hover_path;
 GtkTreePath *last_hover_path;

 /*  last_hover_path = foo-stored_path; fetch last hover path */
   gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget),
  event-x, event-y,
  hover_path,
  NULL, NULL, NULL);
 /*  foo-stored_path = hover_path; write back new hover path */

   if (!(last_hover_path == NULL  hover_path == NULL) 
   (!(last_hover_path != NULL  hover_path != NULL) ||
 gtk_tree_path_compare (last_hover_path, hover_path) != NULL)) {
 /* do whatever you want with the new hover path */
   }

 [1] http://bugzilla.gnome.org/attachment.cgi?id=49082action=view

 --
 Christian Neumair [EMAIL PROTECTED]


 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.1 (GNU/Linux)

 iD8DBQBDMsMFWfvsaU5lO4kRArLwAJ4ntJvOAX1iHpHpFDaE4IW3HZLhfwCfWbPq
 aEJFORbT+Kaz4QBG4fYlSNM=
 =O4na
 -END PGP SIGNATURE-





Thanks a lot for your answer.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Children and precedence.

2005-09-22 Thread oracle nine
Is it possible to make a child window stay top level? I want the main 
window to be deactivated while certain child dialogs are open. I 
achieved this by using gtk_widget_set_sensitive(). Unfortunatly, If the 
user mistakenly clicks the screen out side of the dialog window, the 
parent window comes foreward covering the dialog. All input with this 
application will come from a touchscreen device... plus, I would not 
expect the user base to think of alt-tab .. also the program will run 
full screen without a window manager.. thus there will be no task bar 
unless I design one.


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


Re: Children and precedence.

2005-09-22 Thread Gian Mario Tagliaretti
2005/9/22, oracle nine [EMAIL PROTECTED]:
 Is it possible to make a child window stay top level?

Have a look at:

http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-modal
http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-transient-for

cheers
--
Gian Mario Tagliaretti
PyGTK GUI programming
http://www.parafernalia.org/pygtk/
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list