[sysprof/ftrace: 13/16] Minor formatting



commit c5eaf77ac9e7852a96a1d86e51c611aa66ecb82c
Author: Søren Sandmann Pedersen <sandmann daimi au dk>
Date:   Fri Aug 14 02:26:32 2009 -0400

    Minor formatting

 sysprof-text.c |    5 +++--
 sysprof.c      |   45 ++++++++++++++++++++++++---------------------
 2 files changed, 27 insertions(+), 23 deletions(-)
---
diff --git a/sysprof-text.c b/sysprof-text.c
index a295107..1ca9c5e 100644
--- a/sysprof-text.c
+++ b/sysprof-text.c
@@ -135,8 +135,9 @@ main (int argc,
 
     if (file_exists_and_is_dir (app->outfile))
     {
-	char *msg = g_strdup_printf ("Can't write to %s: is a directory\n",
-				     app->outfile);
+	char *msg = g_strdup_printf (
+	    "Can't write to %s: is a directory\n", app->outfile);
+
 	die (msg);
     }
     
diff --git a/sysprof.c b/sysprof.c
index 4bb944d..38e4c3c 100644
--- a/sysprof.c
+++ b/sysprof.c
@@ -117,9 +117,9 @@ show_samples (Application *app)
 {
     char *label;
     int n_samples;
+#if 0
     gboolean profiling = app->state == PROFILING;
 
-#if 0
     if (profiling)
 	collector_set_tracing (app->collector, FALSE);
 #endif
@@ -292,9 +292,14 @@ set_busy (GtkWidget *widget,
 	cursor = NULL;
 
     if (GTK_IS_TEXT_VIEW (widget))
-	window = gtk_text_view_get_window (GTK_TEXT_VIEW (widget), GTK_TEXT_WINDOW_TEXT);
+    {
+	window = gtk_text_view_get_window (GTK_TEXT_VIEW (widget),
+					   GTK_TEXT_WINDOW_TEXT);
+    }
     else
+    {
 	window = widget->window;
+    }
     
     gdk_window_set_cursor (window, cursor);
     
@@ -362,11 +367,13 @@ sorry (GtkWidget *parent_window,
     va_start (args, format);
     g_vasprintf (&message, format, args);
     va_end (args);
+
+    dialog = gtk_message_dialog_new (
+	parent_window ? GTK_WINDOW (parent_window) : NULL,
+	GTK_DIALOG_DESTROY_WITH_PARENT,
+	GTK_MESSAGE_WARNING,
+	GTK_BUTTONS_OK, message);
     
-    dialog = gtk_message_dialog_new (parent_window ? GTK_WINDOW (parent_window) : NULL,
-				     GTK_DIALOG_DESTROY_WITH_PARENT,
-				     GTK_MESSAGE_WARNING,
-				     GTK_BUTTONS_OK, message);
     g_free (message);
     
     gtk_window_set_title (GTK_WINDOW (dialog), APPLICATION_NAME " Warning");
@@ -444,7 +451,8 @@ get_current_object (Application *app)
     GtkTreeIter selected;
     char *object;
     
-    if (gtk_tree_selection_get_selected (app->object_selection, &model, &selected))
+    if (gtk_tree_selection_get_selected (
+	    app->object_selection, &model, &selected))
     {
 	gtk_tree_model_get (model, &selected,
 			    OBJECT_OBJECT, &object,
@@ -496,8 +504,9 @@ fill_main_list (Application *app)
 	g_list_foreach (objects, (GFunc)g_free, NULL);
 	g_list_free (objects);
 
-	tree_view_set_model_with_default_sort (app->object_view, GTK_TREE_MODEL (list_store),
-					       OBJECT_TOTAL, GTK_SORT_DESCENDING);
+	tree_view_set_model_with_default_sort (
+	    app->object_view, GTK_TREE_MODEL (list_store),
+	    OBJECT_TOTAL, GTK_SORT_DESCENDING);
 	
 	g_object_unref (G_OBJECT (list_store));
     }
@@ -563,8 +572,9 @@ fill_descendants_tree (Application *app)
 	}
     }
     
-    tree_view_set_model_with_default_sort (app->descendants_view, GTK_TREE_MODEL (tree_store),
-					   DESCENDANTS_CUMULATIVE, GTK_SORT_DESCENDING);
+    tree_view_set_model_with_default_sort (
+	app->descendants_view, GTK_TREE_MODEL (tree_store),
+	DESCENDANTS_CUMULATIVE, GTK_SORT_DESCENDING);
 
     g_object_unref (G_OBJECT (tree_store));
     
@@ -632,8 +642,9 @@ fill_callers_list (Application *app)
 	}
     }
     
-    tree_view_set_model_with_default_sort (app->callers_view, GTK_TREE_MODEL (list_store),
-					   CALLERS_TOTAL, GTK_SORT_DESCENDING);
+    tree_view_set_model_with_default_sort (
+	app->callers_view, GTK_TREE_MODEL (list_store),
+	CALLERS_TOTAL, GTK_SORT_DESCENDING);
     
     g_object_unref (G_OBJECT (list_store));
     
@@ -641,14 +652,6 @@ fill_callers_list (Application *app)
 }
 
 static void
-fill_lists (Application *app)
-{
-    fill_main_list (app);
-    fill_callers_list (app);
-    fill_descendants_tree (app);
-}
-
-static void
 enter_display_mode (Application *app)
 {
     app->state = DISPLAYING;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]