]> git.sesse.net Git - vlc/commitdiff
Minor GUI fixes
authorEric Petit <titer@videolan.org>
Fri, 31 Jan 2003 06:45:00 +0000 (06:45 +0000)
committerEric Petit <titer@videolan.org>
Fri, 31 Jan 2003 06:45:00 +0000 (06:45 +0000)
modules/gui/beos/BeOS.cpp
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/MessagesWindow.cpp

index 2cec485864df0f52e8c94f524a49dbbf92935046..0bcc98c058faeb7e4b36115f049ff50892c79915 100644 (file)
@@ -2,7 +2,7 @@
  * beos.cpp : BeOS plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: BeOS.cpp,v 1.4 2003/01/25 20:15:41 titer Exp $
+ * $Id: BeOS.cpp,v 1.5 2003/01/31 06:45:00 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -59,6 +59,10 @@ vlc_module_begin();
         add_integer( "beos-playlist-xpos", 0, NULL, "", "" );
         add_integer( "beos-playlist-ypos", 0, NULL, "", "" );
         add_bool( "beos-playlist-show", 0, NULL, "", "" );
+        add_integer( "beos-messages-width", 0, NULL, "", "" );
+        add_integer( "beos-messages-height", 0, NULL, "", "" );
+        add_integer( "beos-messages-xpos", 0, NULL, "", "" );
+        add_integer( "beos-messages-ypos", 0, NULL, "", "" );
         add_bool( "beos-messages-show", 0, NULL, "", "" );
     add_submodule();                                     
         set_capability( "video output", 100 );
index ab992f68129e34e473089b3aae54920f3172dcd6..c6c8a19f23b66ce68ccce1aaf20203f1cb8aa782 100644 (file)
@@ -2,7 +2,7 @@
  * InterfaceWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: InterfaceWindow.cpp,v 1.24 2003/01/28 08:17:26 titer Exp $
+ * $Id: InterfaceWindow.cpp,v 1.25 2003/01/31 06:45:00 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -210,6 +210,16 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name,
         fPlaylistWindow->ResizeTo( i_width, i_height );
         fPlaylistWindow->MoveTo( i_xpos, i_ypos );
     }
+    i_width = config_GetInt( p_intf, "beos-messages-width" ),
+    i_height = config_GetInt( p_intf, "beos-messages-height" ),
+    i_xpos = config_GetInt( p_intf, "beos-messages-xpos" ),
+    i_ypos = config_GetInt( p_intf, "beos-messages-ypos" );
+    if( i_width && i_height && i_xpos && i_ypos )
+    {
+        /* messages window size and position */
+        fMessagesWindow->ResizeTo( i_width, i_height );
+        fMessagesWindow->MoveTo( i_xpos, i_ypos );
+    }
     if( config_GetInt( p_intf, "beos-playlist-show" ) )
     {
         /* playlist showing */
@@ -632,6 +642,11 @@ bool InterfaceWindow::QuitRequested()
     }
     if( fMessagesWindow->Lock() )
     {
+        frame = fMessagesWindow->Frame();
+        config_PutInt( p_intf, "beos-messages-width", (int)frame.Width() );
+        config_PutInt( p_intf, "beos-messages-height", (int)frame.Height() );
+        config_PutInt( p_intf, "beos-messages-xpos", (int)frame.left );
+        config_PutInt( p_intf, "beos-messages-ypos", (int)frame.top );
         config_PutInt( p_intf, "beos-messages-show", !fMessagesWindow->IsHidden() );
         fMessagesWindow->Unlock();
     }
index b32799bc505d648196bdea1fc751f066584bd424..716b56891083a95bb79c00ab347047011f3ac391 100644 (file)
@@ -2,7 +2,7 @@
  * MessagesWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: MessagesWindow.cpp,v 1.4 2003/01/28 10:05:15 titer Exp $
+ * $Id: MessagesWindow.cpp,v 1.5 2003/01/31 06:45:00 titer Exp $
  *
  * Authors: Eric Petit <titer@videolan.org>
  *
@@ -150,12 +150,8 @@ void MessagesWindow::UpdateMessages()
             fMessagesView->LockLooper();
             oldLength = fMessagesView->TextLength();
             BString string;
-            string.Append( p_sub->p_msg[i_start].psz_module );
-            string.Append( " " );
-            string.Append( psz_module_type );
-            string.Append( " : " );
-            string.Append( p_sub->p_msg[i_start].psz_msg );
-            string.Append( "\n" );
+            string << p_sub->p_msg[i_start].psz_module << " " << psz_module_type << " : " <<
+                p_sub->p_msg[i_start].psz_msg << "\n";
             fMessagesView->Insert( string.String() );
             fMessagesView->SetFontAndColor( oldLength,
                                             fMessagesView->TextLength(),