add plugin interface to objects
[lttv.git] / ltt / branches / poly / lttv / modules / gui / lttvwindow / lttvwindow / lttvwindow.c
index 323aec92d0177d746d1fbd21f396091c0acfcf9e..7dd2e0c7eb8f0b06099b37499cd85f62004f61e8 100644 (file)
@@ -344,6 +344,7 @@ void lttvwindow_unregister_constructor
   LttvToolbars * toolbar;
   LttvMenus * menu;
   LttvAttributeValue value;
+       gboolean is_named;
 
   g_assert(lttv_iattribute_find_by_path(attributes_global,
      "viewers/toolbar", LTTV_POINTER, &value));
@@ -381,7 +382,8 @@ void lttvwindow_unregister_constructor
     LttvAttributeType type;
     
     for(i=0;i<num;i++) {
-      type = lttv_iattribute_get(LTTV_IATTRIBUTE(attribute), i, &name, &value);
+      type = lttv_iattribute_get(LTTV_IATTRIBUTE(attribute), i, &name, &value,
+                                       &is_named);
       g_assert(type == LTTV_POINTER);
       if(*(value.v_pointer) == view_constructor) {
         lttv_iattribute_remove(LTTV_IATTRIBUTE(attribute), i);
@@ -995,6 +997,29 @@ void lttvwindow_events_request_remove_all(Tab       *tab,
 
 }
 
+
+/**
+ * Function to see if there are events request pending.
+ *
+ * It tells if events requests are pending. Useful for checks in some events,
+ * i.e. detailed event list scrolling.
+ * 
+ * @param tab the tab the viewer belongs to.
+ * @param viewer a pointer to the viewer data structure
+ * @return : TRUE is events requests are pending, else FALSE.
+ */
+
+gboolean lttvwindow_events_request_pending(Tab            *tab)
+{
+  GSList *element = tab->events_requests;
+
+  if(element == NULL) return FALSE;
+  else return TRUE;
+}
+
+
+
+
 /**
  * Function to get the current time interval shown on the current tab.
  * It will be called by a viewer's hook function to update the 
@@ -1032,7 +1057,7 @@ LttTime lttvwindow_get_current_time(Tab *tab)
  */
 LttvFilter *lttvwindow_get_filter(Tab *tab)
 {
-  return tab->filter;
+  return g_object_get_data(G_OBJECT(tab->vbox), "filter");
 }
 
 /**
@@ -1047,14 +1072,13 @@ LttvFilter *lttvwindow_get_filter(Tab *tab)
  * @param main_win, the main window the viewer belongs to.
  * @param filter, a pointer to a filter.
  */
-
 void lttvwindow_report_filter(Tab *tab, LttvFilter *filter)
 {
   LttvAttributeValue value;
   LttvHooks * tmp;
 
-  lttv_filter_destroy(tab->filter);
-  tab->filter = filter;
+  //lttv_filter_destroy(tab->filter);
+  //tab->filter = filter;
   
   g_assert(lttv_iattribute_find_by_path(tab->attributes,
            "hooks/updatefilter", LTTV_POINTER, &value));
This page took 0.02367 seconds and 4 git commands to generate.