[sysprof/newui: 20/24] Delete some unused code
- From: SÃren Sandmann Pedersen <ssp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/newui: 20/24] Delete some unused code
- Date: Wed, 29 Jun 2011 06:39:33 +0000 (UTC)
commit 7976bd1e1b5fea2cc3efbf75b53446c3f884a71c
Author: SÃren Sandmann Pedersen <sandmann daimi au dk>
Date: Thu Nov 11 02:01:57 2010 -0500
Delete some unused code
TODO | 2 +
sysprof.c | 104 +------------------------------------------------------------
2 files changed, 3 insertions(+), 103 deletions(-)
---
diff --git a/TODO b/TODO
index f1a45c7..359a15c 100644
--- a/TODO
+++ b/TODO
@@ -8,6 +8,8 @@ New UI todo:
* Consider adding entries for binary files
+* Cut and paste instead of screenshot window
+
Before 1.1:
* Move perfcounter.h into sysprof namespace
diff --git a/sysprof.c b/sysprof.c
index 13f9801..c9b23c4 100644
--- a/sysprof.c
+++ b/sysprof.c
@@ -80,15 +80,11 @@ struct Application
GtkWidget * screenshot_close_button;
GtkWidget * screenshot_window;
- Profile * profile;
- ProfileCaller * callers;
-
int timeout_id;
int update_screenshot_id;
char * loaded_profile;
-
- gboolean inhibit_forced_redraw;
+ Profile * profile;
};
static void update_screenshot_window (Application *app);
@@ -540,13 +536,9 @@ enter_display_mode (Application *app)
update_sensitivity (app);
- app->inhibit_forced_redraw = TRUE;
-
fill_descendants_tree (app);
gtk_widget_grab_focus (GTK_WIDGET (app->descendants_view));
-
- app->inhibit_forced_redraw = FALSE;
}
static void
@@ -1068,30 +1060,6 @@ update_screenshot_window_idle (gpointer data)
gtk_text_buffer_set_text (text_buffer, "", -1);
-#if 0
- if (app->descendants)
- {
- AddTextInfo info;
-
- info.max_width = 0;
- info.text = g_string_new ("");
-
- tree_view_foreach_visible (app->descendants_view,
- compute_text_width,
- &info.max_width);
-
- tree_view_foreach_visible (app->descendants_view,
- add_text,
- &info);
-
- gtk_text_buffer_set_text (text_buffer, info.text->str, -1);
-
- set_monospace (app->screenshot_textview);
-
- g_string_free (info.text, TRUE);
- }
-#endif
-
app->update_screenshot_id = 0;
if (app->screenshot_window_visible)
@@ -1145,74 +1113,8 @@ on_object_selection_changed (GtkTreeSelection *selection,
Application *app = data;
update_screenshot_window (app);
-
- if (!app->inhibit_forced_redraw)
- gdk_window_process_all_updates (); /* Display updated selection */
}
-#if 0
-static void
-really_goto_object (Application *app,
- char *object)
-{
- GtkTreeModel *profile_objects;
- GtkTreeIter iter;
- gboolean found = FALSE;
-
- profile_objects = gtk_tree_view_get_model (app->object_view);
-
- if (gtk_tree_model_get_iter_first (profile_objects, &iter))
- {
- do
- {
- char *list_object;
-
- gtk_tree_model_get (profile_objects, &iter,
- OBJECT_OBJECT, &list_object,
- -1);
-
- if (list_object == object)
- {
- found = TRUE;
- break;
- }
- }
- while (gtk_tree_model_iter_next (profile_objects, &iter));
- }
-
- if (found)
- {
- GtkTreePath *path =
- gtk_tree_model_get_path (profile_objects, &iter);
-
- gtk_tree_view_set_cursor (app->object_view, path, 0, FALSE);
- }
-}
-#endif
-
-#if 0
-static void
-goto_object (Application *app,
- GtkTreeView *tree_view,
- GtkTreePath *path,
- gint column)
-{
- GtkTreeIter iter;
- GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
- char *object;
-
- if (!gtk_tree_model_get_iter (model, &iter, path))
- return;
-
- gtk_tree_model_get (model, &iter, column, &object, -1);
-
- if (!object)
- return;
-
- really_goto_object (app, object);
-}
-#endif
-
static void
on_descendants_row_activated (GtkTreeView *tree_view,
GtkTreePath *path,
@@ -1222,10 +1124,6 @@ on_descendants_row_activated (GtkTreeView *tree_view,
Application *app = data;
gpointer object;
-#if 0
- goto_object (app, tree_view, path, DESCENDANTS_OBJECT);
-#endif
-
gtk_widget_grab_focus (GTK_WIDGET (app->descendants_view));
if ((object = get_current_object (app)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]