[snappy] ui: manage window title when emtpy and when drop



commit 840c9c45f4c5df45b927560148a7469485929316
Author: Luis de Bethencourt <luis debethencourt com>
Date:   Tue Mar 12 10:00:10 2013 -0400

    ui: manage window title when emtpy and when drop
    
    Set the window title to snappy when it is loaded with no media file.
    When a new media file is dropped on snappy, change the window title to the name
    of the file.

 src/user_interface.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index 75740df..785f57c 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -1138,7 +1138,7 @@ interface_load_uri (UserInterface * ui, gchar * uri)
   ui->filename = g_path_get_basename (ui->fileuri);
 
   if (ui->stage != NULL) {
-    gtk_window_set_title (GTK_WINDOW (ui->window), "Clutter Embedding");
+    gtk_window_set_title (GTK_WINDOW (ui->window), ui->filename);
     clutter_text_set_text (CLUTTER_TEXT (ui->control_title), ui->filename);
   }
 
@@ -1235,7 +1235,10 @@ interface_start (UserInterface * ui, gchar * uri)
 
   /* Create the window and some child widgets: */
   ui->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_window_set_title (GTK_WINDOW (ui->window), ui->filename);
+  if (ui->filename != "")
+    gtk_window_set_title (GTK_WINDOW (ui->window), ui->filename);
+  else
+    gtk_window_set_title (GTK_WINDOW (ui->window), "snappy");
   g_signal_connect (ui->window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
   gtk_settings = gtk_settings_get_default ();
   g_object_set (G_OBJECT (gtk_settings), "gtk-application-prefer-dark-theme",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]