aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/shell.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2006-05-20 14:41:28 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2006-05-20 14:41:28 +0000
commit7b3c726991f0f060ca18c576fc7816b930435240 (patch)
tree1b6e5c7396fd89cd81baa018af6080c5349e1c6b /hardinfo2/shell.c
parentcbd8b0d401add58a06d82c7a5d7fb22b53d80714 (diff)
- Add binreloc support.
- Add users information. - Add ppc64 and mips64 support. - Fix loadgraph autoscaling (should be usable now! :) - Misc cosmetic changes. - Misc wording changes.
Diffstat (limited to 'hardinfo2/shell.c')
-rw-r--r--hardinfo2/shell.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c
index e8ac1f5e..ed73cfa7 100644
--- a/hardinfo2/shell.c
+++ b/hardinfo2/shell.c
@@ -28,6 +28,8 @@
#include <menu.h>
#include <stock.h>
+#include <binreloc.h>
+
/*
* Internal Prototypes ********************************************************
*/
@@ -103,7 +105,7 @@ void shell_action_set_enabled(const gchar *action_name, gboolean setting)
}
}
-void shell_set_left_pane_visible(gboolean setting)
+void shell_set_side_pane_visible(gboolean setting)
{
if (setting)
gtk_widget_show(shell->tree->scroll);
@@ -159,6 +161,12 @@ void shell_action_set_active(const gchar *action_name, gboolean setting)
void
shell_status_pulse(void)
{
+ if (shell->_pulses++ == 20) {
+ /* we're pulsing for some time, disable the interface and change the cursor
+ to a hourglass */
+ shell_view_set_enabled(FALSE);
+ }
+
gtk_progress_bar_pulse(GTK_PROGRESS_BAR(shell->progress));
while (gtk_events_pending())
gtk_main_iteration();
@@ -177,9 +185,10 @@ void
shell_view_set_enabled(gboolean setting)
{
if (setting) {
- widget_set_cursor(shell->window, GDK_LEFT_PTR);
+ shell->_pulses = 0;
+ widget_set_cursor(shell->window, GDK_LEFT_PTR);
} else {
- widget_set_cursor(shell->window, GDK_WATCH);
+ widget_set_cursor(shell->window, GDK_WATCH);
}
gtk_widget_set_sensitive(shell->hpaned, setting);
@@ -238,7 +247,7 @@ destroy_me(void)
static void
create_window(void)
{
- GtkWidget *vbox, *hbox;
+ GtkWidget *vbox, *hbox;
shell = g_new0(Shell, 1);
@@ -312,7 +321,9 @@ shell_tree_modules_load(ShellTree * shelltree)
module->icon = icon_cache_get_pixbuf(tmp);
g_free(tmp);
- tmp = g_strdup_printf(PREFIX "modules/%s.so", iname);
+ tmp = g_strdup_printf("%s/hardinfo/modules/%s.so",
+ gbr_find_lib_dir(PREFIX),
+ iname);
module->dll = g_module_open(tmp, G_MODULE_BIND_LAZY);
g_free(tmp);
@@ -519,7 +530,7 @@ shell_init(void)
gtk_widget_hide(shell->notebook);
shell_action_set_enabled("RefreshAction", FALSE);
- shell_action_set_active("LeftPaneAction", TRUE);
+ shell_action_set_active("SidePaneAction", TRUE);
shell_action_set_active("ToolbarAction", TRUE);
shell_action_set_property("RefreshAction", "is-important", TRUE);
shell_action_set_property("ReportAction", "is-important", TRUE);
@@ -539,10 +550,10 @@ update_field(gpointer data)
SHELL_VIEW_LOAD_GRAPH */
if (fu->loadgraph && shell->view_type == SHELL_VIEW_LOAD_GRAPH) {
GtkTreeSelection *ts;
-
+
ts = gtk_tree_view_get_selection(GTK_TREE_VIEW
(shell->info->view));
-
+
if (iter && gtk_tree_selection_iter_is_selected(ts, iter)) {
load_graph_update(shell->loadgraph, atoi(value));
}
@@ -667,7 +678,7 @@ group_handle_special(GKeyFile * key_file, ShellModuleEntry * entry,
fu->field_name = g_strdup(strchr(key, '$') + 1);
fu->entry = entry;
fu->loadgraph = TRUE;
-
+
g_timeout_add(ms, update_field, fu);
} else if (g_str_equal(key, "ReloadInterval")) {
gint ms;