aboutsummaryrefslogtreecommitdiff
path: root/src/displaywindow.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-12-20 20:13:00 +0100
committerThomas White <taw@bitwiz.org.uk>2009-12-20 20:13:00 +0100
commit563b05331db465e0e5ef0434de79e2cc06674d63 (patch)
tree51b38dc6958a152e9206c68a322d01316eab26de /src/displaywindow.c
parent24ce4a9e2becccb6f7e9a15ae29ba57042ce4e2e (diff)
Show values of simple fields in menu
Diffstat (limited to 'src/displaywindow.c')
-rw-r--r--src/displaywindow.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c
index 8c1d0b01..ffcce983 100644
--- a/src/displaywindow.c
+++ b/src/displaywindow.c
@@ -692,12 +692,28 @@ static GtkWidget *displaywindow_addhdfgroup(struct hdfile *hdfile,
} else {
+ char *tmp;
+
item = gtk_menu_item_new_with_label(names[i]);
+ tmp = hdfile_get_string_value(hdfile, names[i]);
+ if ( tmp != NULL ) {
+
+ GtkWidget *ss;
+ GtkWidget *mss;
+
+ mss = gtk_menu_new();
+ ss = gtk_menu_item_new_with_label(tmp);
+ gtk_menu_shell_append(GTK_MENU_SHELL(mss), ss);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(item),
+ mss);
+
+ }
+
+
}
gtk_menu_shell_append(GTK_MENU_SHELL(ms), item);
- gtk_widget_show(item);
free(names[i]);
@@ -739,6 +755,8 @@ static void displaywindow_update_menus(DisplayWindow *dw)
/* Make new menu be the submenu for File->Images */
w = gtk_ui_manager_get_widget(dw->ui, "/ui/displaywindow/file/images");
gtk_menu_item_set_submenu(GTK_MENU_ITEM(w), ms);
+
+ gtk_widget_show_all(ms);
}