]> git.sesse.net Git - vlc/blob - modules/gui/kde/info.cpp
Fixed a small bug which prevented the translation of a string.
[vlc] / modules / gui / kde / info.cpp
1 /*****************************************************************************
2  * info.cpp: the KInfoWindow class
3  *****************************************************************************
4  * Copyright (C) 2001-2003 VideoLAN
5  * $Id: info.cpp,v 1.2 2003/12/22 14:23:14 sam Exp $
6  *
7  * Author: Sigmund Augdal <sigmunau@idi.ntnu.no>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
22  *****************************************************************************/
23
24 #include "info.h"
25 #include "common.h"
26 #include <qtextview.h>
27 #include <qlayout.h>
28 #include <qlabel.h>
29 #include <qvbox.h>
30
31 KInfoWindow::KInfoWindow( intf_thread_t * p_intf,  input_thread_t *p_input ) :
32     KDialogBase( Tabbed, _( "Messages" ), Ok, Ok, 0, 0, false)
33 {
34 //    clearWFlags(~0);
35 //    setWFlags(WType_TopLevel);
36     setSizeGripEnabled(true);
37     vlc_mutex_lock( &p_input->stream.stream_lock );
38     input_info_category_t *p_category = p_input->stream.p_info;
39     while ( p_category )
40     {
41         QFrame *page = addPage( QString(p_category->psz_name) );
42         QVBoxLayout *toplayout = new QVBoxLayout( page);
43         QVBox *category_table = new QVBox(page);
44         toplayout->addWidget(category_table);
45         toplayout->setResizeMode(QLayout::FreeResize);
46         toplayout->addStretch(10);
47         category_table->setSpacing(spacingHint());
48         input_info_t *p_info = p_category->p_info;
49         while ( p_info )
50         {
51             QHBox *hb = new QHBox( category_table );
52             new QLabel( QString(p_info->psz_name) + ":", hb );
53             new QLabel( p_info->psz_value, hb );
54             p_info = p_info->p_next;
55         }
56         p_category = p_category->p_next;
57     }
58     vlc_mutex_unlock( &p_input->stream.stream_lock );
59     resize(300,400);
60     show();
61 }
62
63 KInfoWindow::~KInfoWindow()
64 {
65     ;
66 }