From: yangxx Date: Fri, 31 Oct 2003 21:23:59 +0000 (+0000) Subject: change the shape of the cursor when cpu is busy X-Git-Tag: v0.12.20~3159 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=606309a4411d7405f9d3ab0ce151cf9896f853a4;p=lttv.git change the shape of the cursor when cpu is busy git-svn-id: http://ltt.polymtl.ca/svn@330 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c index ca532d25..c9b152c5 100644 --- a/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c +++ b/ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c @@ -43,11 +43,28 @@ enum void -insert_viewer_wrap(GtkMenuItem *menuitem, gpointer user_data) +insert_viewer_wrap(GtkWidget *menuitem, gpointer user_data) { + GdkWindow * win; + GdkCursor * new; guint val = 20; + GtkWidget* widget = menuitem; + MainWindow * mw; + + new = gdk_cursor_new(GDK_X_CURSOR); + if(GTK_IS_MENU_ITEM(menuitem)){ + widget = lookup_widget(menuitem, "MToolbar2"); + } + win = gtk_widget_get_parent_window(widget); + gdk_window_set_cursor(win, new); + gdk_cursor_unref(new); + gdk_window_stick(win); + gdk_window_unstick(win); + insert_viewer((GtkWidget*)menuitem, (view_constructor)user_data); // selected_hook(&val); + + gdk_window_set_cursor(win, NULL); } diff --git a/ltt/branches/poly/lttv/modules/guiEvents.c b/ltt/branches/poly/lttv/modules/guiEvents.c index ca7cd135..66f10d9b 100644 --- a/ltt/branches/poly/lttv/modules/guiEvents.c +++ b/ltt/branches/poly/lttv/modules/guiEvents.c @@ -783,8 +783,20 @@ void get_test_data(double time_value, guint list_height, unsigned block_num, event_num; unsigned size = 1, count = 0; gboolean need_backward_again, backward; - + GdkWindow * win; + GdkCursor * new; + GtkWidget* widget = gtk_widget_get_parent(event_viewer_data->hbox_v); + if(widget){ + new = gdk_cursor_new(GDK_X_CURSOR); + win = gtk_widget_get_parent_window(widget); + gdk_window_set_cursor(win, new); + gdk_cursor_unref(new); + gdk_window_stick(win); + gdk_window_unstick(win); + } + + // if(event_number > event_viewer_data->last_event || // event_number + list_height-1 < event_viewer_data->first_event || // event_viewer_data->first_event == -1) @@ -1054,7 +1066,8 @@ void get_test_data(double time_value, guint list_height, event_viewer_data->first_event = event_viewer_data->start_event_index ; event_viewer_data->last_event = event_viewer_data->end_event_index ; - + if(widget) + gdk_window_set_cursor(win, NULL); }