From 0fa6067111faa2ce69ed8275b06ef8d5ab669a56 Mon Sep 17 00:00:00 2001
From: 05356787 <05356787@localhost.localdomain>
Date: Thu, 30 Oct 2008 09:54:35 -0200
Subject: Cleanups
---
hardinfo2/benchmark.c | 33 ++++++++++++++++++---------------
hardinfo2/shell.c | 3 ++-
2 files changed, 20 insertions(+), 16 deletions(-)
(limited to 'hardinfo2')
diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c
index b1438fce..79d3d2d4 100644
--- a/hardinfo2/benchmark.c
+++ b/hardinfo2/benchmark.c
@@ -150,7 +150,7 @@ static gchar *__benchmark_include_results(gdouble result,
{
GKeyFile *conf;
gchar **machines;
- gchar *path, *results = g_strdup("");
+ gchar *path, *results = g_strdup(""), *return_value, *processor_frequency;
int i;
conf = g_key_file_new();
@@ -178,22 +178,25 @@ static gchar *__benchmark_include_results(gdouble result,
g_free(path);
g_key_file_free(conf);
- DEBUG("results = %s", results);
-
- return g_strdup_printf("[$ShellParam$]\n"
- "Zebra=1\n"
- "OrderType=%d\n"
- "ViewType=3\n"
- "ColumnTitle$Extra1=CPU Clock\n"
- "ColumnTitle$Extra2=Memory\n"
- "ColumnTitle$Progress=Results\n"
- "ColumnTitle$TextValue=CPU\n"
- "ShowColumnHeaders=true\n"
- "[%s]\n"
- "This Machine=%.3f|extra1|extra2\n"
- "%s", order_type, benchmark, result, results);
+ processor_frequency = module_call_method("devices::getProcessorFrequency");
+ return_value = g_strdup_printf("[$ShellParam$]\n"
+ "Zebra=1\n"
+ "OrderType=%d\n"
+ "ViewType=3\n"
+ "ColumnTitle$Extra1=CPU Clock\n"
+ "ColumnTitle$Extra2=Memory\n"
+ "ColumnTitle$Progress=Results\n"
+ "ColumnTitle$TextValue=CPU\n"
+ "ShowColumnHeaders=true\n"
+ "[%s]\n"
+ "This Machine=%.3f|%s MHz|extra2\n"
+ "%s", order_type, benchmark, result, processor_frequency, results);
+ g_free(processor_frequency);
+ return return_value;
}
+
+
static gchar *benchmark_include_results_reverse(gdouble result,
const gchar * benchmark)
{
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c
index 2a61246b..6d0508c7 100644
--- a/hardinfo2/shell.c
+++ b/hardinfo2/shell.c
@@ -1107,9 +1107,10 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload)
store = GTK_TREE_STORE(shell->info->model);
+ gdk_window_freeze_updates(shell->window->window);
+
g_object_ref(shell->info->model);
gtk_tree_view_set_model(GTK_TREE_VIEW(shell->info->view), NULL);
- gdk_window_freeze_updates(shell->window->window);
gtk_tree_store_clear(store);
--
cgit v1.2.3