+/* This file is part of the Linux Trace Toolkit viewer
+ * Copyright (C) 2003-2004 Mathieu Desnoyers
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License Version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ * MA 02111-1307, USA.
+ */
#include <glib.h>
#include <gtk/gtk.h>
#include "processlist.h"
#include "eventhooks.h"
#include "cfv-private.h"
+#include <lttv/lttv.h>
+extern GSList *g_control_flow_data_list;
-#define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format)
-#define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format)
+static void control_flow_grab_focus(GtkWidget *widget, gpointer data){
+ ControlFlowData * control_flow_data = (ControlFlowData *)data;
+ MainWindow * mw = control_flow_data->mw;
+ set_focused_pane(mw, gtk_widget_get_parent(control_flow_data->scrolled_window));
+}
-extern GSList *g_control_flow_data_list;
/*****************************************************************************
* Control Flow Viewer class implementation *
ControlFlowData *
guicontrolflow(void)
{
- GtkWidget *process_list_widget, *drawing_widget;
+ GtkWidget *process_list_widget, *drawing_widget, *drawing_area;
ControlFlowData* control_flow_data = g_new(ControlFlowData,1) ;
drawing_widget =
drawing_get_widget(control_flow_data->drawing);
+ drawing_area =
+ drawing_get_drawing_area(control_flow_data->drawing);
+
control_flow_data->number_of_process = 0;
/* Create the Process list */
(GDestroyNotify)guicontrolflow_destructor);
g_object_set_data(
- G_OBJECT(drawing_widget),
+ G_OBJECT(drawing_area),
"control_flow_data",
control_flow_data);
//can be configured (and this must happend bedore sending
//data)
+ g_signal_connect (G_OBJECT (process_list_widget), "grab-focus",
+ G_CALLBACK (control_flow_grab_focus),
+ control_flow_data);
+
+
return control_flow_data;
}