blob: 37eee7aa68d1ca8e88b913ff3cb4c48250f41b82 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*
*
* $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
* Copyright (C) 2006 Sebastian Trueg <trueg@k3b.org>
*
* This file is part of the K3b project.
* Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* See the file "COPYING" for the exact licensing terms.
*/
#include "k3bfirstrun.h"
#include "k3b.h"
#include "k3bservicemenuinstaller.h"
#include <k3bcore.h>
#include <klocale.h>
#include <kiconloader.h>
#include <kconfig.h>
#include <tqlayout.h>
#include <tqlabel.h>
void K3bFirstRun::run( TQWidget* tqparent )
{
if( !k3bcore->config()->readBoolEntry( "First run", true ) )
return;
k3bcore->config()->writeEntry( "First run", false );
// for now the first run dialog only asks for
// the konqui integration. So in case it is
// already installed there is no need to show the
// dialog.
K3bServiceInstaller si;
if( si.allInstalled() )
return;
K3bFirstRun dlg( tqparent );
if( dlg.exec() == TQDialog::Accepted )
si.install( tqparent );
}
K3bFirstRun::K3bFirstRun( TQWidget* tqparent )
: KDialogBase( Plain,
i18n("First Run"),
Ok|Cancel,
Ok,
tqparent,
0,
true,
true )
{
setButtonOK( i18n("Enable Konqueror integration") );
setButtonCancel( i18n("No Konqueror integration") );
TQFrame* plain = plainPage();
TQLabel* label = new TQLabel( i18n("<p>K3b can integrate itself into Konqueror. This integration "
"allows to start K3b from the context menu in the file manager."
"<p><em>The Konqueror integration can always be disabled and "
"enabled again from the K3b settings.</em>"), plain );
TQLabel* pixLabel = new TQLabel( plain );
pixLabel->setPixmap( DesktopIcon( "konqueror" ) );
TQHBoxLayout* lay = new TQHBoxLayout( plain );
lay->setMargin( 0 );
lay->setSpacing( spacingHint() );
lay->addWidget( pixLabel );
lay->addWidget( label );
lay->setStretchFactor( label, 1 );
}
K3bFirstRun::~K3bFirstRun()
{
}
#include "k3bfirstrun.moc"
|