aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-02-16 20:57:22 -0500
committerSteven Rostedt <rostedt@goodmis.org>2011-02-21 20:42:07 -0500
commitb5eb0d3e7d7f6a12db9c8c756a2d4faff6ebc172 (patch)
treee4d1c229cdda7ec3059932a44e0cc770be6ae09c
parent2f6c27bb3bd10f49bc37c8a7c8775920a401c7be (diff)
kernelshark: Provide a way to freeze the main window
There may be cases that we need to freeze the main window in order to provide updates to other widgets or the cursor while working to update something. Add trace_freeze_all() and trace_unfreeze_all() Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-dialog.c10
-rw-r--r--trace-gui.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/trace-dialog.c b/trace-dialog.c
index 53e75d5..1bbbac6 100644
--- a/trace-dialog.c
+++ b/trace-dialog.c
@@ -120,6 +120,16 @@ void trace_put_cursor(void)
120 gdk_window_set_cursor(window, parent_cursor); 120 gdk_window_set_cursor(window, parent_cursor);
121} 121}
122 122
123void trace_freeze_all(void)
124{
125 gtk_widget_set_sensitive(GTK_WIDGET(parent_window), FALSE);
126}
127
128void trace_unfreeze_all(void)
129{
130 gtk_widget_set_sensitive(GTK_WIDGET(parent_window), TRUE);
131}
132
123/** 133/**
124 * trace_dialog_register_alt_warning - register an alternate function for warning() 134 * trace_dialog_register_alt_warning - register an alternate function for warning()
125 * @alt: the function to be called instead of warning. 135 * @alt: the function to be called instead of warning.
diff --git a/trace-gui.h b/trace-gui.h
index c55940e..286e1a3 100644
--- a/trace-gui.h
+++ b/trace-gui.h
@@ -54,6 +54,8 @@ gchar *trace_get_file_dialog(const gchar *title, const char *open,
54 54
55void trace_set_cursor(GdkCursorType type); 55void trace_set_cursor(GdkCursorType type);
56void trace_put_cursor(void); 56void trace_put_cursor(void);
57void trace_freeze_all(void);
58void trace_unfreeze_all(void);
57 59
58GtkWidget * 60GtkWidget *
59trace_create_combo_box(GtkWidget *hbox, const gchar *text, 61trace_create_combo_box(GtkWidget *hbox, const gchar *text,