dia r4366 - in trunk: . app



Author: hans
Date: Sun Apr  5 15:43:48 2009
New Revision: 4366
URL: http://svn.gnome.org/viewvc/dia?rev=4366&view=rev

Log:
2009-04-04  Hans Breuer  <hans breuer org>

	* app/display.c : make the tab use the short name again and adjust the
	(integrated UI) application title HIC compliant, fixing bug #527288




Modified:
   trunk/ChangeLog
   trunk/app/display.c

Modified: trunk/app/display.c
==============================================================================
--- trunk/app/display.c	(original)
+++ trunk/app/display.c	Sun Apr  5 15:43:48 2009
@@ -1346,10 +1346,20 @@
       if (g_object_get_data (G_OBJECT (page), "DDisplay") == ddisp)
       {
         GtkLabel *label = g_object_get_data (G_OBJECT (page), "tab-label");
-        gtk_label_set_text(label,title);
+        /* not using the passed in title here, because it may be too long */
+        gchar *name = diagram_get_name(ddisp->diagram);
+        gtk_label_set_text(label,name);
+        g_free(name);
         break;
       }
     }
+    /* now modify the application window title */
+    {
+      const gchar *pname = g_get_prgname();
+      gchar *fulltitle = g_strdup_printf ("%s - %s", title, pname ? pname : "Dia");
+      gtk_window_set_title (GTK_WINDOW (ddisp->shell), fulltitle);
+      g_free(fulltitle);
+    }
   }
 }
 
@@ -1489,6 +1499,9 @@
           }
         }
         /* synchronize_ui_to_active_display (ddisp); */
+        /* updates display title, etc */
+        diagram_modified(ddisp->diagram);
+
         /* ZOOM */
         update_zoom_status (ddisp);
 



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