summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2019-06-28 08:03:20 -0700
committerLeandro Pereira <leandro@hardinfo.org>2019-06-28 08:03:20 -0700
commitb9b712f048ea2b37a7df9b0811d6d9769308e214 (patch)
tree1f974de8ccefed0f481461481bfaa1658540e326 /shell
parent83de522ed44c719ba887935893b8c97b005d47fd (diff)
Always reset view type to normal
Let $ShellParam$ groups change it again -- this fixes an issue where some modules were displaying with the wrong ViewType.
Diffstat (limited to 'shell')
-rw-r--r--shell/shell.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/shell/shell.c b/shell/shell.c
index 61ab5719..83514485 100644
--- a/shell/shell.c
+++ b/shell/shell.c
@@ -1439,7 +1439,6 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload)
GKeyFile *key_file = g_key_file_new();
GtkTreeStore *store;
gchar *key_data, **groups;
- gboolean has_shell_param = FALSE;
gint i;
gsize ngroups;
#if GTK_CHECK_VERSION(2, 14, 0)
@@ -1478,13 +1477,15 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload)
if (groups[i][0] == '$')
ngroups--;
+ set_view_type(SHELL_VIEW_NORMAL, reload);
+ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(shell->info->view), FALSE);
+
for (i = 0; groups[i]; i++) {
gchar *group = groups[i];
gchar **keys = g_key_file_get_keys(key_file, group, NULL, NULL);
if (*group == '$') {
group_handle_special(key_file, entry, group, keys, reload);
- has_shell_param = TRUE;
} else {
group_handle_normal(key_file, entry, group, keys, ngroups);
}
@@ -1493,13 +1494,6 @@ module_selected_show_info(ShellModuleEntry * entry, gboolean reload)
}
/* */
- if (!has_shell_param) {
- /* reset the view type to normal */
- set_view_type(SHELL_VIEW_NORMAL, reload);
- gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(shell->info->view), FALSE);
- }
-
- /* */
g_object_unref(shell->info->model);
gtk_tree_view_set_model(GTK_TREE_VIEW(shell->info->view), shell->info->model);
gtk_tree_view_expand_all(GTK_TREE_VIEW(shell->info->view));