aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2006-05-20 19:59:34 +0000
committerLeandro A. F. Pereira <leandro@hardinfo.org>2006-05-20 19:59:34 +0000
commitd056982a830fbebe98966876697ec724d01c14a6 (patch)
tree27cb8664cdc902dd6470999bb3ad8b3f2e48e64f /hardinfo2
parent4332965fb8e9ae659e8b6546dbaf3ea41e091d24 (diff)
Display immediately fields whose values are "...", if possible.
Diffstat (limited to 'hardinfo2')
-rw-r--r--hardinfo2/arch/linux/common/inputdevices.h7
-rw-r--r--hardinfo2/report.c1
-rw-r--r--hardinfo2/shell.c4
3 files changed, 11 insertions, 1 deletions
diff --git a/hardinfo2/arch/linux/common/inputdevices.h b/hardinfo2/arch/linux/common/inputdevices.h
index c32015a2..44a109ca 100644
--- a/hardinfo2/arch/linux/common/inputdevices.h
+++ b/hardinfo2/arch/linux/common/inputdevices.h
@@ -37,6 +37,7 @@ static struct {
{ "Keyboard", "keyboard.png" },
{ "Joystick", "joystick.png" },
{ "Mouse", "mouse.png" },
+ { "Speaker", "audio.png" },
{ "Unknown", "module.png" },
};
@@ -84,9 +85,13 @@ scan_inputdevices(void)
else if (strstr(tmp, "mouse"))
d = 2; //INPUT_MOUSE;
else
- d = 3; //INPUT_UNKNOWN;
+ d = 4; //INPUT_UNKNOWN;
break;
case '\n':
+ if (strstr(name, "PC Speaker")) {
+ d = 3; // INPUT_PCSPKR
+ }
+
tmp = g_strdup_printf("INP%d", ++n);
input_list = g_strdup_printf("%s$%s$%s=\n",
input_list,
diff --git a/hardinfo2/report.c b/hardinfo2/report.c
index c3f49dbc..db2a02e3 100644
--- a/hardinfo2/report.c
+++ b/hardinfo2/report.c
@@ -439,6 +439,7 @@ static ReportDialog
gtk_button_box_set_layout(GTK_BUTTON_BOX(dialog1_action_area),
GTK_BUTTONBOX_END);
+
button8 = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
gtk_widget_show(button8);
gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button8,
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c
index ed73cfa7..90e5722f 100644
--- a/hardinfo2/shell.c
+++ b/hardinfo2/shell.c
@@ -734,6 +734,10 @@ group_handle_normal(GKeyFile * key_file, ShellModuleEntry * entry,
GtkTreeIter child;
value = g_key_file_get_value(key_file, group, key, NULL);
+ if (g_str_equal(value, "...") && entry->fieldfunc) {
+ g_free(value);
+ value = entry->fieldfunc(key);
+ }
if (g_utf8_validate(key, -1, NULL) && g_utf8_validate(value, -1, NULL)) {
gtk_tree_store_append(store, &child, &parent);