some compilation fixes
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 28 May 2004 14:11:46 +0000 (14:11 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 28 May 2004 14:11:46 +0000 (14:11 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@570 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/gtkmultivpaned.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/mainwindow.h
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.h
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/viewer.h

index ac52a1c99e095161f949298aae74454544e48866..1762798c499581e54ae2a77a79e56efe3172a7d8 100644 (file)
@@ -156,7 +156,7 @@ void gtk_multi_vpaned_set_focus (GtkWidget * widget, GtkPaned* paned)
 
   pane = multi_vpaned->first_pane;
   while(1){
-    if((GtkWidget*)pane == (GtkWidget*)user_data){
+    if((GtkWidget*)pane == GTK_WIDGET(paned)){
       multi_vpaned->focused_pane = pane;
       break;
     }
@@ -176,13 +176,13 @@ void gtk_multi_vpaned_set_adjust(GtkMultiVPaned * multi_vpaned, const TimeWindow
 
   
   if(first_time){
-    time_span = LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info->
-                                     traceset_context)->Time_Span ;
+    time_span = &LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->
+                          traceset_info->traceset_context)->time_span ;
   
-    multi_vpaned->hadjust->lower = ltt_time_to_double(time_span->startTime) * 
+    multi_vpaned->hadjust->lower = ltt_time_to_double(time_span->start_time) * 
                              NANOSECONDS_PER_SECOND;
     multi_vpaned->hadjust->value = multi_vpaned->hadjust->lower;
-    multi_vpaned->hadjust->upper = ltt_time_to_double(time_span->endTime) *
+    multi_vpaned->hadjust->upper = ltt_time_to_double(time_span->end_time) *
                              NANOSECONDS_PER_SECOND;
   }
 
@@ -419,19 +419,19 @@ void gtk_multi_vpaned_scroll_value_changed(GtkAdjustment *adjust, gpointer multi
 
   time_window = multi_vpaned->mw->current_tab->time_window;
 
-  time_span = LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info->
-                                   traceset_context)->Time_Span ;
+  time_span = &LTTV_TRACESET_CONTEXT(multi_vpaned->mw->current_tab->traceset_info->
+                                   traceset_context)->time_span ;
   lower = multi_vpaned->hadjust->lower;
   upper = multi_vpaned->hadjust->upper;
   ratio = (value - lower) / (upper - lower);
   
-  time = ltt_time_sub(time_span->endTime, time_span->startTime);
+  time = ltt_time_sub(time_span->end_time, time_span->start_time);
   time = ltt_time_mul(time, (float)ratio);
-  time = ltt_time_add(time_span->startTime, time);
+  time = ltt_time_add(time_span->start_time, time);
 
   time_window.start_time = time;
 
-  time = ltt_time_sub(time_span->endTime, time);
+  time = ltt_time_sub(time_span->end_time, time);
   if(ltt_time_compare(time,time_window.time_width) < 0){
     time_window.time_width = time;
   }
index a6d63cb348aeaec6ef9570ee54327c30a4336932..7faf99edfa0bc1b68912f4ca2f87946c92a13703 100644 (file)
@@ -119,37 +119,13 @@ static void init() {
 
 }
 
-void
-main_window_free(MainWindow * mw)
-{ 
-  if(mw){
-    while(mw->tab){
-      lttv_state_remove_event_hooks(
-           (LttvTracesetState*)mw->tab->traceset_info->traceset_context);
-      mw->tab = mw->tab->next;
-    }
-    g_object_unref(mw->attributes);
-    g_main_window_list = g_slist_remove(g_main_window_list, mw);
-
-    g_hash_table_destroy(mw->hash_menu_item);
-    g_hash_table_destroy(mw->hash_toolbar_item);
-    
-    g_free(mw);
-    mw = NULL;
-  }
-}
-
 void
 main_window_destructor(MainWindow * mw)
 {
   if(GTK_IS_WIDGET(mw->mwindow)){
     gtk_widget_destroy(mw->mwindow);
-    //    gtk_widget_destroy(mw->HelpContents);
-    //    gtk_widget_destroy(mw->AboutBox);    
     mw = NULL;
   }
-  //main_window_free called when the object mw in the widget is unref.
-  //main_window_free(mw);
 }
 
 
index afda2ff58ff78a915c016da0cf7c8d11d97a6d7d..74857c794737547859631003dc842105df2fb892 100644 (file)
@@ -63,8 +63,6 @@ struct _MainWindow{
   Tab * tab;
   Tab * current_tab;
 
-  GHashTable * hash_menu_item;
-  GHashTable * hash_toolbar_item;
 };
 
 
@@ -93,12 +91,6 @@ struct _Tab{
   gboolean time_request_pending;
 };
 
-/**
- * Remove menu and toolbar item when a module unloaded
- */
-void main_window_remove_menu_item(lttvwindow_viewer_constructor view_constructor);
-void main_window_remove_toolbar_item(lttvwindow_viewer_constructor view_constructor);
-
 #endif /* _MAIN_WINDOW_ */
 
 
index fe94847d961b5afc63c9fae56990bd52c963d43f..a2f10ffae95b83870c0cbd495b3b6510e0feea3c 100644 (file)
@@ -19,8 +19,9 @@
 #ifndef MENU_H
 #define MENU_H
 
-#include <lttvwindow/common.h>
 #include <gtk/gtk.h>
+#include <lttvwindow/common.h>
+#include <lttvwindow/viewer.h>
 
 
 typedef GArray LttvMenus;
index 7cff56807c3f0bdacd0a35a53b65e0a573cdd33d..618cc412a1f5a48ed41beae0392c5e94c048cb9f 100644 (file)
@@ -32,7 +32,7 @@ inline void lttv_toolbars_destroy(LttvToolbars *h) {
   g_array_free(h, TRUE);
 }
 
-inline LttvToolbarClosure void lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget)
+inline LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget)
 {
   LttvToolbarClosure c;
 
index 8b48ebe79cced7875c5e339bd287ee6fb0133436..c193fbedd29e91db3cf3a4aad78bd65debed5466 100644 (file)
@@ -559,25 +559,23 @@ void lttvwindow_report_dividor(MainWindow *main_win, gint position);
 void lttvwindow_report_focus(MainWindow *main_win, 
                              GtkWidget  *top_widget);
 
-
-
 /* Structure sent to the time request hook */
                                                 /* Value considered as empty */
 typedef struct _EventsRequest {
-  LttTime                     start_time,       /* Unset : { 0, 0 }         */
-  LttvTracesetContextPosition start_position,   /* Unset : num_traces = 0   */
-  gboolean                    stop_flag,        /* Continue:TRUE Stop:FALSE */
-  LttTime                     end_time,         /* Unset : { 0, 0 }         */
-  guint                       num_events,       /* Unset : G_MAXUINT        */
-  LttvTracesetContextPosition end_position,     /* Unset : num_traces = 0   */
-  LttvHooks                  *before_traceset,  /* Unset : NULL             */
-  LttvHooks                  *before_trace,     /* Unset : NULL             */
-  LttvHooks                  *before_tracefile, /* Unset : NULL             */
-  LttvHooks                  *event,            /* Unset : NULL             */
-  LttvHooksById              *event_by_id,      /* Unset : NULL             */
-  LttvHooks                  *after_tracefile,  /* Unset : NULL             */
-  LttvHooks                  *after_trace,      /* Unset : NULL             */
-  LttvHooks                  *after_traceset    /* Unset : NULL             */
+  LttTime                      start_time;       /* Unset : { 0, 0 }         */
+  LttvTracesetContextPosition *start_position;   /* Unset : num_traces = 0   */
+  gboolean                     stop_flag;        /* Continue:TRUE Stop:FALSE */
+  LttTime                      end_time;         /* Unset : { 0, 0 }         */
+  guint                        num_events;       /* Unset : G_MAXUINT        */
+  LttvTracesetContextPosition *end_position;     /* Unset : num_traces = 0   */
+  LttvHooks                   *before_traceset;  /* Unset : NULL             */
+  LttvHooks                   *before_trace;     /* Unset : NULL             */
+  LttvHooks                   *before_tracefile; /* Unset : NULL             */
+  LttvHooks                   *event;            /* Unset : NULL             */
+  LttvHooksById               *event_by_id;      /* Unset : NULL             */
+  LttvHooks                   *after_tracefile;  /* Unset : NULL             */
+  LttvHooks                   *after_trace;      /* Unset : NULL             */
+  LttvHooks                   *after_traceset;   /* Unset : NULL             */
 } EventsRequest;
 
 
This page took 0.027979 seconds and 4 git commands to generate.