change the shape of the cursor when cpu is busy
authoryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 31 Oct 2003 21:23:59 +0000 (21:23 +0000)
committeryangxx <yangxx@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 31 Oct 2003 21:23:59 +0000 (21:23 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@330 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/mainWin/src/callbacks.c
ltt/branches/poly/lttv/modules/guiEvents.c

index ca532d25d57bb7f96570b6b21162b02b69d4ffbb..c9b152c52acb32b3d89fcd1d5a5b0d7e4752c247 100644 (file)
@@ -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);  
 }
 
 
index ca7cd1355b21f69f85b10e8c99ee948b4aafc945..66f10d9b32165482871b4599a33f444b96ee0a02 100644 (file)
@@ -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);  
 
 }
        
This page took 0.035069 seconds and 4 git commands to generate.