[Swfdec] Branch 'vivi' - vivified/ui

Benjamin Otte company at kemper.freedesktop.org
Thu Aug 16 12:42:46 PDT 2007


 vivified/ui/main.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
diff-tree be3bc1a6cd88c0f2294b4f6059898c3989f172eb (from da8a9e9b145d5cb1aebc04764e9ed66856a31c9b)
Author: Benjamin Otte <otte at gnome.org>
Date:   Thu Aug 16 21:42:39 2007 +0200

    Set the title correctly

diff --git a/vivified/ui/main.c b/vivified/ui/main.c
index df123a9..13d03ab 100644
--- a/vivified/ui/main.c
+++ b/vivified/ui/main.c
@@ -48,6 +48,16 @@ delete_event (GtkWidget *widget, GdkEven
 }
 
 static void
+set_title (ViviApplication *app, GParamSpec *pspec, GtkWindow *window)
+{
+  const char *filename = vivi_application_get_filename (app);
+
+  if (filename == NULL)
+    filename = "Vivified";
+  gtk_window_set_title (window, filename);
+}
+
+static void
 setup (const char *filename, const char *variables)
 {
   GtkWidget *window, *box, *widget;
@@ -58,6 +68,8 @@ setup (const char *filename, const char 
   vivi_application_set_variables (app, variables);
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   g_signal_connect_swapped (app, "notify::quit", G_CALLBACK (gtk_widget_destroy), window);
+  g_signal_connect_swapped (app, "notify::filename", G_CALLBACK (set_title), window);
+  set_title (app, NULL, GTK_WINDOW (window));
   box = vivi_vdock_new ();
   gtk_container_add (GTK_CONTAINER (window), box);
   widget = vivi_player_new (app);


More information about the Swfdec mailing list