summaryrefslogtreecommitdiffstats
path: root/info.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2011-11-03 22:44:04 +0200
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-11-13 15:10:14 -0200
commitf826470d32c48b398a00fb6f7690877e46217927 (patch)
tree53f5b3337979b306096f6780ca19718611d9f303 /info.c
parent5c2fca262043992783551eceebc81c1f589b185b (diff)
downloadsubsurface-f826470d32c48b398a00fb6f7690877e46217927.tar.gz
gtk_combo_box_entries and empty text
Passing -1 to gtk_combo_box_set_active, seems not to work as the gtk documentation explains; there might be a bug in the library or some special case that is not explained. could be related to: http://mail.gnome.org/archives/gtk-devel-list/2004-March/msg00170.html passing \n seems to "trick" the cell renderer to clear the entry completely. This is a temporary solution. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'info.c')
-rw-r--r--info.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/info.c b/info.c
index 75b34bb78..8436a1336 100644
--- a/info.c
+++ b/info.c
@@ -98,9 +98,9 @@ void flush_dive_info_changes(struct dive *dive)
static void set_combo_box_entry_text(GtkComboBoxEntry *combo_box, const char *text)
{
GtkEntry *entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo_box)));
- gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), -1);
if (!*text)
- text = " ";
+ text = "\n";
gtk_entry_set_text(entry, text);
}