[snappy] ui: when loading empty notify user of how to add content
- From: Luis de Bethencourt <luisbg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snappy] ui: when loading empty notify user of how to add content
- Date: Tue, 26 Mar 2013 17:21:09 +0000 (UTC)
commit 6913c62875bd0d55284880c6b0e5f1b21a075b06
Author: Luis de Bethencourt <luis debethencourt com>
Date: Tue Mar 26 13:20:38 2013 -0400
ui: when loading empty notify user of how to add content
src/gst_engine.c | 3 +++
src/user_interface.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gst_engine.c b/src/gst_engine.c
index 4665d93..80b7b08 100644
--- a/src/gst_engine.c
+++ b/src/gst_engine.c
@@ -785,6 +785,9 @@ engine_load_uri (GstEngine * engine, gchar * uri)
g_print ("Loading: %s\n", uri);
g_object_set (G_OBJECT (engine->player), "uri", uri, NULL);
+ } else {
+ g_print ("No media set. %s\n",
+ "You can drag and drop a file into snappy to play it.");
}
return;
diff --git a/src/user_interface.c b/src/user_interface.c
index 8752931..585ae9a 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -498,6 +498,10 @@ load_controls (UserInterface * ui)
// Controls title
ui->control_title = clutter_text_new_full ("Sans 32px",
cut_long_filename (ui->filename, ui->title_length), &control_color2);
+ if (strcmp (ui->filename, "") == 0) {
+ clutter_text_set_text (CLUTTER_TEXT (ui->control_title),
+ "Drag and drop a file here to play it");
+ }
clutter_text_set_max_length (CLUTTER_TEXT (ui->control_title),
ui->title_length);
clutter_box_layout_pack (CLUTTER_BOX_LAYOUT (ui->main_box_layout), ui->control_title, TRUE, /* expand */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]