[gtk+] gtk-demo: don't try to add tabs for empty filenames
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk-demo: don't try to add tabs for empty filenames
- Date: Wed, 30 May 2012 17:19:17 +0000 (UTC)
commit 46f967dd7afa6c1c2b1174a562213d64d6b56c5d
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed May 30 12:55:51 2012 -0400
gtk-demo: don't try to add tabs for empty filenames
demos/gtk-demo/main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index 95e841e..2ac7217 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -573,8 +573,10 @@ load_file (const gchar *filename)
names = g_strsplit (filename, " ", -1);
- for (i = 1; names[i]; i++)
- add_data_tab (names[i]);
+ for (i = 1; names[i]; i++) {
+ if (strlen (names[i]) > 0)
+ add_data_tab (names[i]);
+ }
if (current_file && !strcmp (current_file, names[0]))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]