Re: setting the wait mouse cursor during a longer load operation



Hi all,

Stefan Kost wrote:
hi,

when loading a long file I would like to disabled events for the main-window and
set a wait mouse-coursor for it. That they way I've tried it.

GdkWindow *window;
GdkCursor *cursor=gdk_cursor_new(GDK_WATCH);

gtk_widget_set_sensitive(GTK_WIDGET(self->private->main_window),FALSE);
// does not work -> (gdk_window_set_cursor): assertion `window != NULL' failed
window=gtk_window_get_transient_for(GTK_WINDOW(self->private->main_window));
I've now also tries
window=gtk_window_get_parent_window(GTK_WIDGET(self->private->main_window))
window=gtk_window_get_root_window(GTK_WIDGET(self->private->main_window))
window=GTK_WIDGET(self->private->main_window)->window;

I don't like to directly access the widget field. I've just tried whatever I
found in other sources. Still no method works.
The result is either
a) setting the cursor for all windows but mine (e.g. all other window titles, or
the gnome pannel then have the wait-mouse cursor)
b) getting a core dump

gdk_window_set_cursor(window,cursor);
... invoke the loading
gdk_window_set_cursor(window,NULL);
gtk_widget_set_sensitive(GTK_WIDGET(self->private->main_window),TRUE);

I manage to change the cursor for other windows (that are not mine!).
Hwen I got diffenrent mouse-cursors, then they neverr looked like the requested
ones.

Any ideas?

Stefan

Ciao
  Stefan

------------------------------------------------------------------------

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

-- 
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 301166
|      ///           04277 Leipzig      04251 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]