following GTK convention
[lttv.git] / ltt / branches / poly / lttv / modules / gui / API / gtkTraceSet.c
index 3c681a97561b27f9e70a7bff433877fc902aaa5b..ac5d2406451b94ac307cdd3f275948f95604f30d 100644 (file)
  * Internal function parts
  */
 
-/**
- * Function to remove toolbar from the GUI
- * @param view_constructor constructor of the viewer.
- */
-
-void RemoveToolbar(lttv_constructor view_constructor)
-{
-  g_printf("Toolbar for the viewer will be removed\n");
-}
-
-/**
- * Function to remove menu entry from the GUI
- * @param view_constructor constructor of the viewer.
- */
-
-void RemoveMenu(lttv_constructor view_constructor)
-{
-  g_printf("Menu entry for the viewer will be removed\n");
-}
-
-
 /**
  * Function to set/update traceset for the viewers
  * @param main_win main window 
@@ -136,8 +115,9 @@ void ToolbarItemUnreg(lttv_constructor view_constructor)
           "viewers/toolbar", LTTV_POINTER, &value));
   toolbar = (LttvToolbars*)*(value.v_pointer);
   
-  if(lttv_toolbars_remove(toolbar, view_constructor))
-    RemoveToolbar(view_constructor);
+  main_window_remove_toolbar_item(view_constructor);
+
+  lttv_toolbars_remove(toolbar, view_constructor);
 }
 
 
@@ -185,8 +165,9 @@ void MenuItemUnreg(lttv_constructor view_constructor)
                               "viewers/menu", LTTV_POINTER, &value));
   menu = (LttvMenus*)*(value.v_pointer);
 
-  if(lttv_menus_remove(menu, view_constructor))  
-    RemoveMenu(view_constructor);
+  main_window_remove_menu_item(view_constructor);
+
+  lttv_menus_remove(menu, view_constructor);
 }
 
 
@@ -210,11 +191,11 @@ void UpdateStatus(mainWindow *main_win, char *info)
  * @param time_interval a pointer where time interval will be stored.
  */
 
-void GetTimeWindow(mainWindow *main_win, TimeWindow *Time_Window)
+void GetTimeWindow(mainWindow *main_win, TimeWindow *time_window)
 {
-  //Time_Window->startTime = main_win->CurrentTab->Time_Window.startTime;
-  //Time_Window->Time_Width = main_win->CurrentTab->Time_Window.Time_Width;
-  *Time_Window = main_win->CurrentTab->Time_Window;
+  //time_window->startTime = main_win->CurrentTab->Time_Window.startTime;
+  //time_window->Time_Width = main_win->CurrentTab->Time_Window.Time_Width;
+  *time_window = main_win->CurrentTab->Time_Window;
 }
 
 /**
@@ -226,11 +207,11 @@ void GetTimeWindow(mainWindow *main_win, TimeWindow *Time_Window)
  * @param time_interval a pointer where time interval will be stored.
  */
 
-void getTracesetTimeSpan(mainWindow *main_win, TimeInterval *Time_Interval)
+void getTracesetTimeSpan(mainWindow *main_win, TimeInterval *time_interval)
 {
-  //Time_Window->startTime = main_win->CurrentTab->Time_Window.startTime;
-  //Time_Window->Time_Width = main_win->CurrentTab->Time_Window.Time_Width;
-  *Time_Interval = *(LTTV_TRACESET_CONTEXT(main_win->Traceset_Info->TracesetContext)->Time_Span);
+  //time_window->startTime = main_win->CurrentTab->Time_Window.startTime;
+  //time_window->Time_Width = main_win->CurrentTab->Time_Window.Time_Width;
+  *time_interval = *(LTTV_TRACESET_CONTEXT(main_win->Traceset_Info->TracesetContext)->Time_Span);
 }
 
 
@@ -243,16 +224,16 @@ void getTracesetTimeSpan(mainWindow *main_win, TimeInterval *Time_Interval)
  * @param time_interval a pointer where time interval is stored.
  */
 
-void SetTimeWindow(mainWindow *main_win, TimeWindow *Time_Window)
+void SetTimeWindow(mainWindow *main_win, TimeWindow *time_window)
 {
   LttvAttributeValue value;
   LttvHooks * tmp;
-  main_win->CurrentTab->Time_Window = *Time_Window;
+  main_win->CurrentTab->Time_Window = *time_window;
   g_assert(lttv_iattribute_find_by_path(main_win->CurrentTab->Attributes,
                       "hooks/updatetimewindow", LTTV_POINTER, &value));
   tmp = (LttvHooks*)*(value.v_pointer);
   if(tmp == NULL) return;
-  lttv_hooks_call(tmp, Time_Window);
+  lttv_hooks_call(tmp, time_window);
 }
 
 
@@ -598,9 +579,8 @@ void SetHPaneDividor(mainWindow *main_win, gint position)
 void processTraceset(mainWindow *main_win, LttTime start, 
                     LttTime end, unsigned maxNumEvents)
 {
-  lttv_process_trace(start, end, main_win->Traceset_Info->traceset, 
-      LTTV_TRACESET_CONTEXT(main_win->Traceset_Info->TracesetContext),
-      maxNumEvents);
+  lttv_process_traceset_seek_time(main_win->Traceset_Info->TracesetContext, start);
+  lttv_process_traceset(main_win->Traceset_Info->TracesetContext, end, maxNumEvents);
 }
 
 /**
This page took 0.02417 seconds and 4 git commands to generate.