By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release. View | Details | Raw Unified | Return to bug 1683
Collapse All | Expand All

(-)ori/tdebase/kcontrol/konqhtml/advancedTabDialog.cpp (-150 lines)
Lines 1-150 Link Here
1
/*
2
 *  advancedTabDialog.cpp
3
 *
4
 *  Copyright (c) 2002 Aaron J. Seigo <aseigo@olympusproject.org>
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
19
    --------------------------------------------------------------
20
    Additional changes:
21
    - 2013/10/16 Michele Calgaro
22
      * centralized "tabbed browsing" options in this dialog
23
 */
24
25
#include <tqbuttongroup.h>
26
#include <tqcheckbox.h>
27
#include <tqlayout.h>
28
#include <tqpushbutton.h>
29
#include <tqradiobutton.h>
30
#include <tqslider.h>
31
32
#include <tdeapplication.h>
33
#include <dcopclient.h>
34
#include <kcolorbutton.h>
35
#include <tdelocale.h>
36
#include <tdeconfig.h>
37
38
#include "advancedTabDialog.h"
39
#include "advancedTabOptions.h"
40
#include "main.h"
41
42
advancedTabDialog::advancedTabDialog(TQWidget* parent, TDEConfig* config, const char* name)
43
    : KDialogBase(KDialogBase::Plain,
44
                  i18n("Advanced Options"),
45
                  KDialogBase::Ok |
46
                  KDialogBase::Apply |
47
                  KDialogBase::Cancel,
48
                  KDialogBase::Ok,
49
                  parent,
50
                  name,
51
                  true, true),
52
                  m_pConfig(config)
53
{
54
    connect(this, TQT_SIGNAL(applyClicked()),
55
            this, TQT_SLOT(save()));
56
    connect(this, TQT_SIGNAL(okClicked()),
57
            this, TQT_SLOT(save()));
58
    actionButton(Apply)->setEnabled(false);
59
    TQFrame* page = plainPage();
60
    TQVBoxLayout* layout = new TQVBoxLayout(page);
61
    m_advancedWidget = new advancedTabOptions(page);
62
    layout->addWidget(m_advancedWidget);
63
    layout->addSpacing( 20 );
64
    layout->addStretch();
65
66
    connect(m_advancedWidget->m_pShowMMBInTabs, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
67
    connect(m_advancedWidget->m_pDynamicTabbarHide, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
68
    connect(m_advancedWidget->m_pDynamicTabbarCycle, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
69
    connect(m_advancedWidget->m_pNewTabsInBackground, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
70
    connect(m_advancedWidget->m_pOpenAfterCurrentPage, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
71
    connect(m_advancedWidget->m_pTabConfirm, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
72
    connect(m_advancedWidget->m_pTabCloseActivatePrevious, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
73
    connect(m_advancedWidget->m_pPermanentCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
74
    connect(m_advancedWidget->m_pHoverCloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
75
    connect(m_advancedWidget->m_pKonquerorTabforExternalURL, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
76
    connect(m_advancedWidget->m_pPopupsWithinTabs, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
77
78
    load();
79
}
80
81
advancedTabDialog::~advancedTabDialog()
82
{
83
}
84
85
void advancedTabDialog::load()
86
{
87
    m_pConfig->setGroup("FMSettings");
88
    m_advancedWidget->m_pShowMMBInTabs->setChecked( m_pConfig->readBoolEntry( "MMBOpensTab", false ) );
89
    m_advancedWidget->m_pDynamicTabbarHide->setChecked( !(m_pConfig->readBoolEntry( "AlwaysTabbedMode", false )) );
90
    m_advancedWidget->m_pDynamicTabbarCycle->setChecked( m_pConfig->readBoolEntry( "TabsCycleWheel", true ) );
91
    m_advancedWidget->m_pNewTabsInBackground->setChecked( ! (m_pConfig->readBoolEntry( "NewTabsInFront", false )) );
92
    m_advancedWidget->m_pOpenAfterCurrentPage->setChecked( m_pConfig->readBoolEntry( "OpenAfterCurrentPage", false ) );
93
    m_advancedWidget->m_pPermanentCloseButton->setChecked( m_pConfig->readBoolEntry( "PermanentCloseButton", false ) );
94
    m_advancedWidget->m_pHoverCloseButton->setChecked( m_pConfig->readBoolEntry( "HoverCloseButton", false ) );
95
    m_advancedWidget->m_pKonquerorTabforExternalURL->setChecked( m_pConfig->readBoolEntry( "KonquerorTabforExternalURL", false ) );
96
    m_advancedWidget->m_pPopupsWithinTabs->setChecked( m_pConfig->readBoolEntry( "PopupsWithinTabs", false ) );
97
    m_advancedWidget->m_pTabCloseActivatePrevious->setChecked( m_pConfig->readBoolEntry( "TabCloseActivatePrevious", false ) );
98
99
    m_pConfig->setGroup("Notification Messages");
100
    m_advancedWidget->m_pTabConfirm->setChecked( !m_pConfig->hasKey("MultipleTabConfirm") );
101
102
    if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() )
103
      m_advancedWidget->m_pHoverCloseButton->setEnabled(false);
104
    else
105
      m_advancedWidget->m_pHoverCloseButton->setEnabled(true);
106
    actionButton(Apply)->setEnabled(false);
107
}
108
109
void advancedTabDialog::save()
110
{
111
    m_pConfig->setGroup("FMSettings");
112
    m_pConfig->writeEntry( "MMBOpensTab", (m_advancedWidget->m_pShowMMBInTabs->isChecked()) );
113
    m_pConfig->writeEntry( "AlwaysTabbedMode", ( !(m_advancedWidget->m_pDynamicTabbarHide->isChecked())) );
114
    m_pConfig->writeEntry( "TabsCycleWheel", (m_advancedWidget->m_pDynamicTabbarCycle->isChecked()) );
115
    m_pConfig->writeEntry( "NewTabsInFront", !(m_advancedWidget->m_pNewTabsInBackground->isChecked()) );
116
    m_pConfig->writeEntry( "OpenAfterCurrentPage", m_advancedWidget->m_pOpenAfterCurrentPage->isChecked() );
117
    m_pConfig->writeEntry( "PermanentCloseButton", m_advancedWidget->m_pPermanentCloseButton->isChecked() );
118
    m_pConfig->writeEntry( "HoverCloseButton", m_advancedWidget->m_pHoverCloseButton->isChecked() );
119
    m_pConfig->writeEntry( "KonquerorTabforExternalURL", m_advancedWidget->m_pKonquerorTabforExternalURL->isChecked() );
120
    m_pConfig->writeEntry( "PopupsWithinTabs", m_advancedWidget->m_pPopupsWithinTabs->isChecked() );
121
    m_pConfig->writeEntry( "TabCloseActivatePrevious", m_advancedWidget->m_pTabCloseActivatePrevious->isChecked() );
122
    m_pConfig->sync();
123
124
    // It only matters whether the key is present, its value has no meaning
125
    m_pConfig->setGroup("Notification Messages");
126
    if ( m_advancedWidget->m_pTabConfirm->isChecked() ) m_pConfig->deleteEntry( "MultipleTabConfirm" );
127
    else m_pConfig->writeEntry( "MultipleTabConfirm", true );
128
129
    TQByteArray data;
130
    if ( !TDEApplication::kApplication()->dcopClient()->isAttached() )
131
      kapp->dcopClient()->attach();
132
    TDEApplication::kApplication()->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );
133
134
    if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() )
135
      m_advancedWidget->m_pHoverCloseButton->setEnabled(false);
136
    else
137
      m_advancedWidget->m_pHoverCloseButton->setEnabled(true);
138
    actionButton(Apply)->setEnabled(false);
139
}
140
141
void advancedTabDialog::changed()
142
{
143
    if ( m_advancedWidget->m_pPermanentCloseButton->isChecked() )
144
      m_advancedWidget->m_pHoverCloseButton->setEnabled(false);
145
    else
146
      m_advancedWidget->m_pHoverCloseButton->setEnabled(true);
147
    actionButton(Apply)->setEnabled(true);
148
}
149
150
#include "advancedTabDialog.moc"
(-)ori/tdebase/kcontrol/konqhtml/advancedTabDialog.h (-45 lines)
Lines 1-45 Link Here
1
/*
2
 *  advancedTabDialog.h
3
 *
4
 *  Copyright (c) 2002 Aaron J. Seigo <aseigo@olympusproject.org>
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 */
19
20
#ifndef __ADVANCEDTABDIALOG_H
21
#define __ADVANCEDTABDIALOG_H
22
23
#include <kdialogbase.h>
24
25
class advancedTabOptions;
26
27
class advancedTabDialog : public KDialogBase
28
{
29
    Q_OBJECT
30
31
    public:
32
        advancedTabDialog(TQWidget* parent, TDEConfig *config, const char* name);
33
        ~advancedTabDialog();
34
35
    protected slots:
36
        void load();
37
        void save();
38
        void changed();
39
40
    private:
41
        TDEConfig* m_pConfig;
42
        advancedTabOptions* m_advancedWidget;
43
};
44
45
#endif
(-)ori/tdebase/kcontrol/konqhtml/advancedTabOptions.ui (-199 lines)
Lines 1-199 Link Here
1
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
2
<class>advancedTabOptions</class>
3
<widget class="TQWidget">
4
    <property name="name">
5
        <cstring>advancedTabOptions</cstring>
6
    </property>
7
    <property name="geometry">
8
        <rect>
9
            <x>0</x>
10
            <y>0</y>
11
            <width>644</width>
12
            <height>208</height>
13
        </rect>
14
    </property>
15
    <vbox>
16
        <property name="name">
17
            <cstring>unnamed</cstring>
18
        </property>
19
        <property name="margin">
20
            <number>0</number>
21
        </property>
22
        <widget class="TQLabel">
23
            <property name="name">
24
                <cstring>TextLabel3</cstring>
25
            </property>
26
            <property name="text">
27
                <string>&lt;b&gt;Tab Options&lt;/b&gt;</string>
28
            </property>
29
        </widget>
30
        <widget class="Line">
31
            <property name="name">
32
                <cstring>Line1</cstring>
33
            </property>
34
            <property name="frameShape">
35
                <enum>HLine</enum>
36
            </property>
37
            <property name="frameShadow">
38
                <enum>Sunken</enum>
39
            </property>
40
            <property name="orientation">
41
                <enum>Horizontal</enum>
42
            </property>
43
        </widget>
44
        <widget class="TQLayoutWidget">
45
            <property name="name">
46
                <cstring>layout</cstring>
47
            </property>
48
            <vbox>
49
                <property name="name">
50
                    <cstring>unnamed</cstring>
51
                </property>
52
                <widget class="TQCheckBox">
53
                  <property name="name">
54
                    <cstring>m_pShowMMBInTabs</cstring>
55
                  </property>
56
                  <property name="text">
57
                    <string>Open &amp;links in new tab instead of in new window</string>
58
                  </property>
59
                  <property name="whatsThis" stdset="0">
60
                    <string>This will open a new tab instead of a new window in various situations, such as choosing a link or a folder with the middle mouse button.</string>
61
                  </property>
62
                </widget>
63
                <widget class="TQCheckBox">
64
                  <property name="name">
65
                    <cstring>m_pDynamicTabbarHide</cstring>
66
                  </property>
67
                  <property name="text">
68
                    <string>&amp;Hide the tab bar when only one tab is open</string>
69
                  </property>
70
                  <property name="whatsThis" stdset="0">
71
                    <string>This will display the tab bar only if there are two or more tabs. Otherwise it will always be displayed.</string>
72
                  </property>
73
                </widget>
74
                <widget class="TQCheckBox">
75
                  <property name="name">
76
                    <cstring>m_pDynamicTabbarCycle</cstring>
77
                  </property>
78
                  <property name="text">
79
                    <string>C&amp;ycle tabs with mouse wheel</string>
80
                  </property>
81
                  <property name="whatsThis" stdset="0">
82
                    <string>This will cycle through tabs when there are two or more tabs using the mouse wheel.</string>
83
                  </property>
84
                </widget>
85
                <widget class="TQCheckBox">
86
                    <property name="name">
87
                        <cstring>m_pNewTabsInBackground</cstring>
88
                    </property>
89
                    <property name="text">
90
                        <string>O&amp;pen new tabs in the background</string>
91
                    </property>
92
                    <property name="whatsThis" stdset="0">
93
                        <string>This will open a new tab in the background, instead of in the foreground.</string>
94
                    </property>
95
                </widget>
96
                <widget class="TQCheckBox">
97
                    <property name="name">
98
                        <cstring>m_pOpenAfterCurrentPage</cstring>
99
                    </property>
100
                    <property name="text">
101
                        <string>Open &amp;new tab after current tab</string>
102
                    </property>
103
                    <property name="whatsThis" stdset="0">
104
                        <string>This will open a new tab opened from a page after the current tab, instead of after the last tab.</string>
105
                    </property>
106
                </widget>
107
                <widget class="TQCheckBox">
108
                    <property name="name">
109
                        <cstring>m_pTabConfirm</cstring>
110
                    </property>
111
                    <property name="text">
112
                        <string>Confirm &amp;when closing windows with multiple tabs</string>
113
                    </property>
114
                    <property name="whatsThis" stdset="0">
115
                        <string>This will ask you whether you are sure you want to close a window when it has multiple tabs opened in it.</string>
116
                    </property>
117
                </widget>
118
                <widget class="TQCheckBox">
119
                    <property name="name">
120
                        <cstring>m_pPermanentCloseButton</cstring>
121
                    </property>
122
                    <property name="text">
123
                        <string>&amp;Show close button instead of website icon</string>
124
                    </property>
125
                    <property name="whatsThis" stdset="0">
126
                        <string>This will display close buttons inside each tab instead of websites' icons.</string>
127
                    </property>
128
                </widget>
129
                <widget class="TQCheckBox">
130
                    <property name="name">
131
                        <cstring>m_pHoverCloseButton</cstring>
132
                    </property>
133
                    <property name="text">
134
                        <string>&amp;Show close button instead of website icon with mouse hover</string>
135
                    </property>
136
                    <property name="whatsThis" stdset="0">
137
                        <string>This will display a close button inside each tab instead of websites' icons when the mouse pointer hovers the icon.</string>
138
                    </property>
139
                </widget>
140
                <widget class="TQCheckBox">
141
                    <property name="name">
142
                       <cstring>m_pPopupsWithinTabs</cstring>
143
                    </property>
144
                   <property name="text">
145
                       <string>Open pop&amp;ups in new tab instead of in new window</string>
146
                   </property>
147
                   <property name="whatsThis" stdset="0">
148
                       <string>Whether or not JavaScript popups if allowed shall open in a new tab or in a new window.</string>
149
                   </property>
150
                </widget>
151
                <widget class="TQCheckBox">
152
                    <property name="name">
153
                       <cstring>m_pTabCloseActivatePrevious</cstring>
154
                    </property>
155
                   <property name="text">
156
                       <string>Activate previous used tab when closing the current tab</string>
157
                   </property>
158
                   <property name="whatsThis" stdset="0">
159
                       <string>When checking this the previous used or opened tab will be activated when you close the current active tab instead of the one right to the current tab.</string>
160
                   </property>
161
                </widget>
162
                <widget class="TQCheckBox">
163
                    <property name="name">
164
                        <cstring>m_pKonquerorTabforExternalURL</cstring>
165
                    </property>
166
                    <property name="text">
167
                        <string>Open as tab in existing Konqueror when URL is called externally</string>
168
                    </property>
169
                    <property name="whatsThis" stdset="0">
170
                        <string>When you click a URL in another TDE program or call kfmclient to open a URL, the current desktop will be searched for a non-minimized Konqueror and, if found, the URL opened as a new tab within it. Otherwise a new Konqueror window will be opened with the required URL.</string>
171
                    </property>
172
                </widget>
173
            </vbox>
174
        </widget>
175
        <spacer>
176
            <property name="name">
177
                <cstring>spacer</cstring>
178
            </property>
179
            <property name="orientation">
180
                <enum>Vertical</enum>
181
            </property>
182
            <property name="sizeType">
183
                <enum>Expanding</enum>
184
            </property>
185
            <property name="sizeHint">
186
                <size>
187
                    <width>20</width>
188
                    <height>0</height>
189
                </size>
190
            </property>
191
        </spacer>
192
    </vbox>
193
</widget>
194
<includes>
195
    <include location="local" impldecl="in implementation">kdialog.h</include>
196
</includes>
197
<layoutdefaults spacing="3" margin="6"/>
198
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
199
</UI>
(-)ori/tdebase/kcontrol/konqhtml/CMakeLists.txt (-5 / +5 lines)
Lines 26-31 Link Here
26
install( FILES
26
install( FILES
27
    tdehtml_behavior.desktop tdehtml_java_js.desktop
27
    tdehtml_behavior.desktop tdehtml_java_js.desktop
28
    tdehtml_fonts.desktop tdehtml_filter.desktop
28
    tdehtml_fonts.desktop tdehtml_filter.desktop
29
    tdehtml_userInter.desktop
29
  DESTINATION ${XDG_APPS_INSTALL_DIR} )
30
  DESTINATION ${XDG_APPS_INSTALL_DIR} )
30
31
31
install(
32
install(
Lines 42-53 Link Here
42
43
43
tde_add_kpart( kcm_konqhtml AUTOMOC
44
tde_add_kpart( kcm_konqhtml AUTOMOC
44
  SOURCES
45
  SOURCES
45
    advancedTabDialog.cpp htmlopts.cpp jsopts.cpp
46
    userInterOpts.ui userInterOpts_impl.cpp userInterConfig.cpp
46
    javaopts.cpp pluginopts.cpp appearance.cpp
47
    htmlopts.cpp jsopts.cpp javaopts.cpp pluginopts.cpp
47
    khttpoptdlg.cpp policydlg.cpp main.cpp
48
    appearance.cpp khttpoptdlg.cpp policydlg.cpp main.cpp
48
    jspolicies.cpp nsconfigwidget.ui policies.cpp
49
    jspolicies.cpp nsconfigwidget.ui policies.cpp
49
    domainlistview.cpp advancedTabOptions.ui
50
    domainlistview.cpp filteropts.cpp
50
    filteropts.cpp
51
  LINK tdehtml-shared
51
  LINK tdehtml-shared
52
  DESTINATION ${PLUGIN_INSTALL_DIR}
52
  DESTINATION ${PLUGIN_INSTALL_DIR}
53
)
53
)
(-)ori/tdebase/kcontrol/konqhtml/htmlopts.cpp (-22 lines)
Lines 16-22 Link Here
16
#include <tqpushbutton.h>
16
#include <tqpushbutton.h>
17
17
18
#include "htmlopts.h"
18
#include "htmlopts.h"
19
#include "advancedTabDialog.h"
20
19
21
#include <konq_defaults.h> // include default values directly from konqueror
20
#include <konq_defaults.h> // include default values directly from konqueror
22
#include <tdeglobalsettings.h> // get default for DEFAULT_CHANGECURSOR
21
#include <tdeglobalsettings.h> // get default for DEFAULT_CHANGECURSOR
Lines 83-101 Link Here
83
    lay->addMultiCellWidget( bgForm, row, row, 0, 1 );
82
    lay->addMultiCellWidget( bgForm, row, row, 0, 1 );
84
    row++;
83
    row++;
85
84
86
    // Tabbed Browsing
87
88
    TQGroupBox *bgTabbedBrowsing = new TQGroupBox( 0, Qt::Vertical, i18n("Tabbed Browsing"), this );
89
    TQHBoxLayout *laytab = new TQHBoxLayout(bgTabbedBrowsing->layout(), KDialog::spacingHint());
90
91
    TQPushButton *advancedTabButton = new TQPushButton( i18n( "Show &tab options"), bgTabbedBrowsing );
92
    laytab->addWidget(advancedTabButton);
93
    laytab->addStretch();
94
    connect(advancedTabButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(launchAdvancedTabDialog()));
95
96
    lay->addMultiCellWidget( bgTabbedBrowsing, row, row, 0, 1 );
97
    row++;
98
99
    // Mouse behavior
85
    // Mouse behavior
100
86
101
    TQVGroupBox *bgMouse = new TQVGroupBox( i18n("Mouse Beha&vior"), this );
87
    TQVGroupBox *bgMouse = new TQVGroupBox( i18n("Mouse Beha&vior"), this );
Lines 386-392 Link Here
386
    emit changed(false);
372
    emit changed(false);
387
}
373
}
388
374
389
390
void KMiscHTMLOptions::slotChanged()
375
void KMiscHTMLOptions::slotChanged()
391
{
376
{
392
    m_pMaxFormCompletionItems->setEnabled( m_pFormCompletionCheckBox->isChecked() );
377
    m_pMaxFormCompletionItems->setEnabled( m_pFormCompletionCheckBox->isChecked() );
Lines 394-403 Link Here
394
}
379
}
395
380
396
381
397
void KMiscHTMLOptions::launchAdvancedTabDialog()
398
{
399
    advancedTabDialog* dialog = new advancedTabDialog(this, m_pConfig, "advancedTabDialog");
400
    dialog->exec();
401
}
402
403
(-)ori/tdebase/kcontrol/konqhtml/htmlopts.h (-1 lines)
Lines 48-54 Link Here
48
48
49
private slots:
49
private slots:
50
    void slotChanged();
50
    void slotChanged();
51
    void launchAdvancedTabDialog();
52
51
53
private:
52
private:
54
    TDEConfig* m_pConfig;
53
    TDEConfig* m_pConfig;
(-)ori/tdebase/kcontrol/konqhtml/main.cpp (-5 / +12 lines)
Lines 36-41 Link Here
36
#include "appearance.h"
36
#include "appearance.h"
37
#include "htmlopts.h"
37
#include "htmlopts.h"
38
#include "filteropts.h"
38
#include "filteropts.h"
39
#include "userInterConfig.h"
39
40
40
#include "main.h"
41
#include "main.h"
41
#include <tdeaboutdata.h>
42
#include <tdeaboutdata.h>
Lines 67-77 Link Here
67
		return new KPluginOptions(c, "Java/JavaScript Settings", parent, name);
68
		return new KPluginOptions(c, "Java/JavaScript Settings", parent, name);
68
	}
69
	}
69
70
70
        KDE_EXPORT TDECModule *create_tdehtml_filter(TQWidget *parent, const char *name )
71
  KDE_EXPORT TDECModule *create_tdehtml_filter(TQWidget *parent, const char *name )
71
        {
72
  {
72
	    TDEConfig *c = new TDEConfig( "tdehtmlrc", false, false );
73
    TDEConfig *c = new TDEConfig( "tdehtmlrc", false, false );
73
            return new KCMFilter(c, "Filter Settings", parent, name);
74
    return new KCMFilter(c, "Filter Settings", parent, name);
74
        }
75
  }
76
77
  KDE_EXPORT TDECModule *create_tdehtml_userInter(TQWidget *parent, const char *name )
78
  {
79
    TDEConfig *c = new TDEConfig( "konquerorrc", false, false );
80
    return new userInterConfig(c, "FMSettings", parent, name);
81
  }
75
}
82
}
76
83
77
84
(-)ori/tdebase/kcontrol/konqhtml/Makefile.am (-4 / +4 lines)
Lines 5-21 Link Here
5
5
6
kde_module_LTLIBRARIES = kcm_konqhtml.la
6
kde_module_LTLIBRARIES = kcm_konqhtml.la
7
7
8
kcm_konqhtml_la_SOURCES = advancedTabDialog.cpp htmlopts.cpp jsopts.cpp \
8
kcm_konqhtml_la_SOURCES = userInterOpts.ui userInterOpts_impl.cpp \
9
			     userInterConfig.cpp htmlopts.cpp jsopts.cpp \
9
			     javaopts.cpp pluginopts.cpp appearance.cpp \
10
			     javaopts.cpp pluginopts.cpp appearance.cpp \
10
			     khttpoptdlg.cpp policydlg.cpp main.cpp \
11
			     khttpoptdlg.cpp policydlg.cpp main.cpp \
11
			     jspolicies.cpp nsconfigwidget.ui policies.cpp \
12
			     jspolicies.cpp nsconfigwidget.ui policies.cpp \
12
			     domainlistview.cpp advancedTabOptions.ui \
13
			     domainlistview.cpp filteropts.cpp
13
			     filteropts.cpp
14
14
15
kcm_konqhtml_la_LDFLAGS  = $(all_libraries) -module -avoid-version -no-undefined
15
kcm_konqhtml_la_LDFLAGS  = $(all_libraries) -module -avoid-version -no-undefined
16
kcm_konqhtml_la_LIBADD = -ltdehtml -ltdeui
16
kcm_konqhtml_la_LIBADD = -ltdehtml -ltdeui
17
17
18
xdg_apps_DATA = tdehtml_behavior.desktop tdehtml_java_js.desktop tdehtml_fonts.desktop tdehtml_filter.desktop
18
xdg_apps_DATA = tdehtml_behavior.desktop tdehtml_java_js.desktop tdehtml_fonts.desktop tdehtml_filter.desktop tdehtml_userInter.desktop
19
19
20
messages: rc.cpp
20
messages: rc.cpp
21
	$(XGETTEXT) *.cpp -o $(podir)/kcmkonqhtml.pot
21
	$(XGETTEXT) *.cpp -o $(podir)/kcmkonqhtml.pot
(-)ori/tdebase/kcontrol/konqhtml/tdehtml_userInter.desktop (+18 lines)
Line 0 Link Here
1
[Desktop Entry]
2
Type=Application
3
DocPath=kcontrol/tdehtml/index.html#userInter
4
Icon=konqueror
5
Exec=tdecmshell tdehtml_userInter
6
7
8
X-TDE-Library=konqhtml
9
X-TDE-FactoryName=tdehtml_userInter
10
11
Name=User Interface
12
Name[it]=Interfaccia utente
13
Comment=Configure user interface options
14
Comment[it]=Configura opzioni dell'interfaccia utente
15
Keywords=konqueror,kfm,user,interface,tabbed,browsing
16
Keywords[it]=konqueror,kfm,utente,interfaccia,linguette,navigazione
17
18
Categories=Qt;TDE;X-TDE-settings-webbrowsing;
(-)ori/tdebase/kcontrol/konqhtml/userInterConfig.cpp (+72 lines)
Line 0 Link Here
1
/*
2
 *  Copyright (c) 2005      Stefan Nikolaus <stefan.nikolaus@kdemail.net>
3
 *
4
 *  This program is free software; you can redistribute it and/or modify
5
 *  it under the terms of the GNU General Public License as published by
6
 *  the Free Software Foundation; either version 2 of the License, or
7
 *  (at your option) any later version.
8
 *
9
 *  This program is distributed in the hope that it will be useful,
10
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 *  GNU General Public License for more details.
13
 *
14
 *  You should have received a copy of the GNU General Public License
15
 *  along with this program; if not, write to the Free Software
16
 */
17
18
#include <tqlayout.h>
19
#include <tqtimer.h>
20
21
#include <tdelocale.h>
22
#include <kdebug.h>
23
24
#include "userInterOpts_impl.h"
25
#include "main.h"
26
27
#include "userInterConfig.h"
28
#include "userInterConfig.moc"
29
30
userInterConfig::userInterConfig(TDEConfig *config, TQString groupName,
31
                                 TQWidget *parent, const char *name)
32
  : TDECModule(parent, "kcmkonqhtml")
33
{
34
    TQVBoxLayout *layout = new TQVBoxLayout(this);
35
    m_widget = new userInterOpts(config, groupName, this, name);
36
    layout->addWidget(m_widget);
37
    layout->addStretch();
38
39
    connect(m_widget, TQT_SIGNAL(changed()),
40
            this, TQT_SLOT(changed()));
41
42
    load();
43
    TQTimer::singleShot(0, this, TQT_SLOT(notChanged()));
44
}
45
46
void userInterConfig::notChanged()
47
{
48
    emit changed(false);
49
}
50
51
void userInterConfig::load()
52
{
53
    m_widget->load();
54
    TDECModule::load();
55
}
56
57
void userInterConfig::save()
58
{
59
    m_widget->save();
60
    TDECModule::save();
61
}
62
63
void userInterConfig::defaults()
64
{
65
    m_widget->defaults();
66
    TDECModule::defaults();
67
68
    // TDEConfigDialogManager may queue an changed(false) signal,
69
    // so we make sure, that the module is labeled as changed,
70
    // while we manage some of the widgets ourselves
71
    TQTimer::singleShot(0, this, TQT_SLOT(changed()));
72
}
(-)ori/tdebase/kcontrol/konqhtml/userInterConfig.h (+44 lines)
Line 0 Link Here
1
/*
2
 *  Copyright (c) 2005      Stefan Nikolaus <stefan.nikolaus@kdemail.net>
3
 *
4
 *  This program is free software; you can redistribute it and/or modify
5
 *  it under the terms of the GNU General Public License as published by
6
 *  the Free Software Foundation; either version 2 of the License, or
7
 *  (at your option) any later version.
8
 *
9
 *  This program is distributed in the hope that it will be useful,
10
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 *  GNU General Public License for more details.
13
 *
14
 *  You should have received a copy of the GNU General Public License
15
 *  along with this program; if not, write to the Free Software
16
 */
17
18
#ifndef __USER_INTER_CONFIG_H__
19
#define __USER_INTER_CONFIG_H__
20
21
#include <tdecmodule.h>
22
23
class userInterOpts;
24
25
class userInterConfig : public TDECModule
26
{
27
    Q_OBJECT
28
29
public:
30
    userInterConfig(TDEConfig *config, TQString group,
31
                    TQWidget *parent = 0, const char *name = 0);
32
33
    void load();
34
    void save();
35
    void defaults();
36
37
public slots:
38
    void notChanged();
39
40
private:
41
    userInterOpts *m_widget;
42
};
43
44
#endif // __USER_INTER_CONFIG_H__
(-)ori/tdebase/kcontrol/konqhtml/userInterOpts_impl.cpp (+127 lines)
Line 0 Link Here
1
/*
2
 *  userInterOpts.cpp
3
 *
4
 *  Copyright (c) 2002 Aaron J. Seigo <aseigo@olympusproject.org>
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 */
19
20
#include <tqbuttongroup.h>
21
#include <tqcheckbox.h>
22
#include <tqlayout.h>
23
#include <tqpushbutton.h>
24
#include <tqradiobutton.h>
25
#include <tqslider.h>
26
27
#include <tdeapplication.h>
28
#include <dcopclient.h>
29
#include <kcolorbutton.h>
30
#include <tdelocale.h>
31
#include <tdeconfig.h>
32
33
#include "main.h"
34
#include "userInterOpts_impl.h"
35
#include "userInterOpts_impl.moc"
36
37
userInterOpts::userInterOpts(TDEConfig *config, TQString groupName,
38
                             TQWidget* parent, const char* name)
39
    : userInterOptsBase(parent, name), m_pConfig(config), m_groupName(groupName)
40
{
41
    // connections
42
    connect(m_pShowMMBInTabs, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
43
    connect(m_pDynamicTabbarHide, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
44
    connect(m_pDynamicTabbarCycle, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
45
    connect(m_pNewTabsInBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
46
    connect(m_pOpenAfterCurrentPage, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
47
    connect(m_pTabConfirm, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
48
    connect(m_pPermanentCloseButton, TQT_SIGNAL(toggled(bool)),  TQT_SLOT(slotChanged()));
49
    connect(m_pHoverCloseButton, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
50
    connect(m_pKonquerorTabforExternalURL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
51
    connect(m_pPopupsWithinTabs, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
52
    connect(m_pTabCloseActivatePrevious, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()));
53
}
54
55
void userInterOpts::load()
56
{
57
  load(false);
58
}
59
60
void userInterOpts::load(bool useDefaults)
61
{
62
    m_pConfig->setReadDefaults(useDefaults);
63
    m_pConfig->setGroup(m_groupName);
64
    
65
    m_pShowMMBInTabs->setChecked( m_pConfig->readBoolEntry( "MMBOpensTab", false ) );
66
    m_pDynamicTabbarHide->setChecked( !(m_pConfig->readBoolEntry( "AlwaysTabbedMode", false )) );
67
    m_pDynamicTabbarCycle->setChecked( m_pConfig->readBoolEntry( "TabsCycleWheel", true ) );
68
    m_pNewTabsInBackground->setChecked( ! (m_pConfig->readBoolEntry( "NewTabsInFront", false )) );
69
    m_pOpenAfterCurrentPage->setChecked( m_pConfig->readBoolEntry( "OpenAfterCurrentPage", false ) );
70
    m_pPermanentCloseButton->setChecked( m_pConfig->readBoolEntry( "PermanentCloseButton", false ) );
71
    m_pHoverCloseButton->setChecked( m_pConfig->readBoolEntry( "HoverCloseButton", false ) );
72
    m_pKonquerorTabforExternalURL->setChecked( m_pConfig->readBoolEntry( "KonquerorTabforExternalURL", false ) );
73
    m_pPopupsWithinTabs->setChecked( m_pConfig->readBoolEntry( "PopupsWithinTabs", false ) );
74
    m_pTabCloseActivatePrevious->setChecked( m_pConfig->readBoolEntry( "TabCloseActivatePrevious", false ) );
75
76
    m_pConfig->setGroup("Notification Messages");
77
    m_pTabConfirm->setChecked( !m_pConfig->hasKey("MultipleTabConfirm") );
78
79
    if ( m_pPermanentCloseButton->isChecked() )
80
      m_pHoverCloseButton->setEnabled(false);
81
    else
82
      m_pHoverCloseButton->setEnabled(true);
83
}
84
85
void userInterOpts::save()
86
{
87
    m_pConfig->setGroup(m_groupName);
88
    
89
    m_pConfig->writeEntry( "MMBOpensTab", (m_pShowMMBInTabs->isChecked()) );
90
    m_pConfig->writeEntry( "AlwaysTabbedMode", ( !(m_pDynamicTabbarHide->isChecked())) );
91
    m_pConfig->writeEntry( "TabsCycleWheel", (m_pDynamicTabbarCycle->isChecked()) );
92
    m_pConfig->writeEntry( "NewTabsInFront", !(m_pNewTabsInBackground->isChecked()) );
93
    m_pConfig->writeEntry( "OpenAfterCurrentPage", m_pOpenAfterCurrentPage->isChecked() );
94
    m_pConfig->writeEntry( "PermanentCloseButton", m_pPermanentCloseButton->isChecked() );
95
    m_pConfig->writeEntry( "HoverCloseButton", m_pHoverCloseButton->isChecked() );
96
    m_pConfig->writeEntry( "KonquerorTabforExternalURL", m_pKonquerorTabforExternalURL->isChecked() );
97
    m_pConfig->writeEntry( "PopupsWithinTabs", m_pPopupsWithinTabs->isChecked() );
98
    m_pConfig->writeEntry( "TabCloseActivatePrevious", m_pTabCloseActivatePrevious->isChecked() );
99
    m_pConfig->sync();
100
101
    // It only matters whether the key is present, its value has no meaning
102
    m_pConfig->setGroup("Notification Messages");
103
    if ( m_pTabConfirm->isChecked() ) m_pConfig->deleteEntry( "MultipleTabConfirm" );
104
    else m_pConfig->writeEntry( "MultipleTabConfirm", true );
105
106
    TQByteArray data;
107
    if ( !TDEApplication::kApplication()->dcopClient()->isAttached() )
108
      kapp->dcopClient()->attach();
109
    TDEApplication::kApplication()->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );
110
111
    if ( m_pPermanentCloseButton->isChecked() )
112
      m_pHoverCloseButton->setEnabled(false);
113
    else
114
      m_pHoverCloseButton->setEnabled(true);
115
}
116
117
void userInterOpts::defaults()
118
{
119
   load(true);
120
}
121
122
void userInterOpts::slotChanged()
123
{
124
    emit changed();
125
}
126
127
(-)ori/tdebase/kcontrol/konqhtml/userInterOpts_impl.h (+49 lines)
Line 0 Link Here
1
/*
2
 *  userInterOpts_impl.h
3
 *
4
 *  Copyright (c) 2002 Aaron J. Seigo <aseigo@olympusproject.org>
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 */
19
20
#ifndef __USERINTERFACE_OPTIONS_IMPL_H
21
#define __USERINTERFACE_OPTIONS_IMPL_H
22
23
#include "userInterOpts.h"
24
      
25
class userInterOpts : public userInterOptsBase
26
{
27
  Q_OBJECT
28
29
  public:
30
    userInterOpts(TDEConfig *config, TQString groupName,
31
                  TQWidget* parent =0, const char* name =0);
32
33
    void load();
34
    void load(bool useDefaults);
35
    void save();
36
    void defaults();
37
        
38
  signals:
39
    void changed();
40
41
  protected:
42
    TDEConfig *m_pConfig;
43
    TQString   m_groupName;
44
45
  private slots:
46
    void slotChanged();
47
};
48
49
#endif
(-)ori/tdebase/kcontrol/konqhtml/userInterOpts.ui (+195 lines)
Line 0 Link Here
1
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
2
<class>userInterOptsBase</class>
3
<widget class="TQWidget">
4
    <property name="name">
5
        <cstring>userInterOptsBase</cstring>
6
    </property>
7
    <property name="geometry">
8
        <rect>
9
            <x>0</x>
10
            <y>0</y>
11
            <width>644</width>
12
            <height>208</height>
13
        </rect>
14
    </property>
15
    <vbox>
16
        <property name="name">
17
            <cstring>unnamed</cstring>
18
        </property>
19
        <property name="margin">
20
            <number>0</number>
21
        </property>
22
        <widget class="TQGroupBox">
23
            <property name="name">
24
                <cstring>m_group_1</cstring>
25
            </property>
26
            <property name="sizePolicy">
27
                <sizepolicy>
28
                    <hsizetype>1</hsizetype>
29
                    <vsizetype>4</vsizetype>
30
                    <horstretch>0</horstretch>
31
                    <verstretch>0</verstretch>
32
                </sizepolicy>
33
            </property>
34
            <property name="title">
35
                <string>Tabbed Browsing</string>
36
            </property>
37
            <grid>
38
                <property name="name">
39
                    <cstring>unnamed</cstring>
40
                </property>
41
                <widget class="TQLayoutWidget">
42
                    <property name="name">
43
                        <cstring>layout</cstring>
44
                    </property>
45
                    <vbox>
46
                        <property name="name">
47
                            <cstring>unnamed</cstring>
48
                        </property>
49
                        <widget class="TQCheckBox">
50
                          <property name="name">
51
                            <cstring>m_pShowMMBInTabs</cstring>
52
                          </property>
53
                          <property name="text">
54
                            <string>Open &amp;links in new tab instead of in new window</string>
55
                          </property>
56
                          <property name="whatsThis" stdset="0">
57
                            <string>This will open a new tab instead of a new window in various situations, such as choosing a link or a folder with the middle mouse button.</string>
58
                          </property>
59
                        </widget>
60
                        <widget class="TQCheckBox">
61
                          <property name="name">
62
                            <cstring>m_pDynamicTabbarHide</cstring>
63
                          </property>
64
                          <property name="text">
65
                            <string>&amp;Hide the tab bar when only one tab is open</string>
66
                          </property>
67
                          <property name="whatsThis" stdset="0">
68
                            <string>This will display the tab bar only if there are two or more tabs. Otherwise it will always be displayed.</string>
69
                          </property>
70
                        </widget>
71
                        <widget class="TQCheckBox">
72
                          <property name="name">
73
                            <cstring>m_pDynamicTabbarCycle</cstring>
74
                          </property>
75
                          <property name="text">
76
                            <string>C&amp;ycle tabs with mouse wheel</string>
77
                          </property>
78
                          <property name="whatsThis" stdset="0">
79
                            <string>This will cycle through tabs when there are two or more tabs using the mouse wheel.</string>
80
                          </property>
81
                        </widget>
82
                        <widget class="TQCheckBox">
83
                            <property name="name">
84
                                <cstring>m_pNewTabsInBackground</cstring>
85
                            </property>
86
                            <property name="text">
87
                                <string>O&amp;pen new tabs in the background</string>
88
                            </property>
89
                            <property name="whatsThis" stdset="0">
90
                                <string>This will open a new tab in the background, instead of in the foreground.</string>
91
                            </property>
92
                        </widget>
93
                        <widget class="TQCheckBox">
94
                            <property name="name">
95
                                <cstring>m_pOpenAfterCurrentPage</cstring>
96
                            </property>
97
                            <property name="text">
98
                                <string>Open &amp;new tab after current tab</string>
99
                            </property>
100
                            <property name="whatsThis" stdset="0">
101
                                <string>This will open a new tab opened from a page after the current tab, instead of after the last tab.</string>
102
                            </property>
103
                        </widget>
104
                        <widget class="TQCheckBox">
105
                            <property name="name">
106
                                <cstring>m_pTabConfirm</cstring>
107
                            </property>
108
                            <property name="text">
109
                                <string>Confirm &amp;when closing windows with multiple tabs</string>
110
                            </property>
111
                            <property name="whatsThis" stdset="0">
112
                                <string>This will ask you whether you are sure you want to close a window when it has multiple tabs opened in it.</string>
113
                            </property>
114
                        </widget>
115
                        <widget class="TQCheckBox">
116
                            <property name="name">
117
                                <cstring>m_pPermanentCloseButton</cstring>
118
                            </property>
119
                            <property name="text">
120
                                <string>&amp;Show close button instead of website icon</string>
121
                            </property>
122
                            <property name="whatsThis" stdset="0">
123
                                <string>This will display close buttons inside each tab instead of websites' icons.</string>
124
                            </property>
125
                        </widget>
126
                        <widget class="TQCheckBox">
127
                            <property name="name">
128
                                <cstring>m_pHoverCloseButton</cstring>
129
                            </property>
130
                            <property name="text">
131
                                <string>&amp;Show close button instead of website icon with mouse hover</string>
132
                            </property>
133
                            <property name="whatsThis" stdset="0">
134
                                <string>This will display a close button inside each tab instead of websites' icons when the mouse pointer hovers the icon.</string>
135
                            </property>
136
                        </widget>
137
                        <widget class="TQCheckBox">
138
                            <property name="name">
139
                              <cstring>m_pPopupsWithinTabs</cstring>
140
                            </property>
141
                          <property name="text">
142
                              <string>Open pop&amp;ups in new tab instead of in new window</string>
143
                          </property>
144
                          <property name="whatsThis" stdset="0">
145
                              <string>Whether or not JavaScript popups if allowed shall open in a new tab or in a new window.</string>
146
                          </property>
147
                        </widget>
148
                        <widget class="TQCheckBox">
149
                            <property name="name">
150
                                <cstring>m_pKonquerorTabforExternalURL</cstring>
151
                            </property>
152
                            <property name="text">
153
                                <string>Open as tab in existing Konqueror when URL is called externally</string>
154
                            </property>
155
                            <property name="whatsThis" stdset="0">
156
                                <string>When you click a URL in another TDE program or call kfmclient to open a URL, the current desktop will be searched for a non-minimized Konqueror and, if found, the URL opened as a new tab within it. Otherwise a new Konqueror window will be opened with the required URL.</string>
157
                            </property>                    
158
                        </widget>
159
                        <widget class="TQCheckBox">
160
                            <property name="name">
161
                              <cstring>m_pTabCloseActivatePrevious</cstring>
162
                            </property>
163
                          <property name="text">
164
                              <string>Activate previous used tab when closing the current tab</string>
165
                          </property>
166
                          <property name="whatsThis" stdset="0">
167
                              <string>When checking this the previous used or opened tab will be activated when you close the current active tab instead of the one right to the current tab.</string>
168
                          </property>
169
                        </widget>
170
                    </vbox>
171
                </widget>
172
          </grid>
173
        </widget>
174
        <spacer>
175
            <property name="name">
176
                <cstring>spacer</cstring>
177
            </property>
178
            <property name="orientation">
179
                <enum>Vertical</enum>
180
            </property>
181
            <property name="sizeType">
182
                <enum>Expanding</enum>
183
            </property>
184
            <property name="sizeHint">
185
                <size>
186
                    <width>20</width>
187
                    <height>16</height>
188
                </size>
189
            </property>
190
        </spacer>
191
    </vbox>
192
</widget>
193
<layoutdefaults spacing="3" margin="6"/>
194
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
195
</UI>

Return to bug 1683