Initial import of Trinity 3.5.11 to kdebase

Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes
Will need to check for commit warnings and repair as encountered
Also needs full compile test

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 4aed2c8219
commit 10e4114459

@ -487,11 +487,11 @@ unprivileged account for the server directive
<term><guilabel>Server group</guilabel></term>
<listitem>
<para>The group the server runs under. Normally this must be
<systemitem class="groupname">sys</systemitem>, however you can
<systemitem class="groupname">lpadmin</systemitem>, however you can
configure things for another group as needed.</para>
<informalexample>
<para>Enter for example <userinput>sys</userinput>.</para>
<para>Enter for example <userinput>lpadmin</userinput>.</para>
</informalexample>
</listitem>
</varlistentry>
@ -1012,7 +1012,7 @@ format="PNG"/></imageobject>
<listitem>
<para>The root folder for &HTTP; documents that are served. By
default the compiled in folder, <filename
class="directory">/usr/share/cups/doc</filename></para>
class="directory">/usr/share/cups/doc-root</filename></para>
</listitem>
</varlistentry>
@ -1756,7 +1756,7 @@ over.</para>
<para>The group name for <systemitem
class="groupname">System</systemitem> or printer administration
access. The default varies depending on the operating system, but
will be <systemitem class="groupname">sys</systemitem>, <systemitem
will be <systemitem class="groupname">lpadmin</systemitem>, <systemitem
class="groupname">system</systemitem> or <systemitem
class="groupname">root</systemitem> (checked for in that order).</para>
</listitem>

@ -124,10 +124,7 @@ Your
Bookmarks</link> section of this document.</para>
<para>The <interface>Window</interface> is the main area of &konqueror; and
can show you the contents of a directory, web page, document or image. Using
the <link linkend="menu-window"><guimenu>Window</guimenu></link> menu you can
split &konqueror;'s main window into one or more separate views, useful for
drag and drop operations, or set it to contain two or more tabbed views.
can show you the contents of a directory, web page, document or image.
</para>
<para>The <interface>Status Bar</interface> runs across the bottom of the

@ -678,108 +678,6 @@ shown in Tree, Detailed List and Text views.</para></listitem>
</sect2>
<sect2 id="menu-go">
<title>The <guimenu>Go</guimenu> Menu</title>
<variablelist>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Alt;<keysym>Up Arrow</keysym></keycombo>
</shortcut><guimenu>Go</guimenu>
<guimenuitem>Up</guimenuitem>
</menuchoice></term>
<listitem><para>Go up a level in the folder
hierarchy.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Alt;<keysym>Left Arrow</keysym></keycombo>
</shortcut><guimenu>Go</guimenu>
<guimenuitem>Back</guimenuitem>
</menuchoice></term>
<listitem><para>Go back to the previous
view.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Alt;<keysym>Right Arrow</keysym></keycombo>
</shortcut><guimenu>Go</guimenu>
<guimenuitem>Forward</guimenuitem>
</menuchoice></term>
<listitem><para>You can only go forward if you've just gone
back.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>Home</keycap></keycombo>
</shortcut><guimenu>Go</guimenu>
<guimenuitem>Home URL</guimenuitem>
</menuchoice></term>
<listitem><para>Go to your home folder.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Go</guimenu>
<guimenuitem>Applications</guimenuitem>
</menuchoice></term>
<listitem><para>Open the folder holding your
applications.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Go</guimenu>
<guimenuitem>Trash</guimenuitem>
</menuchoice></term>
<listitem><para>Open your <filename
class="directory">Trash</filename>
folder in a separate window.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Go</guimenu>
<guimenuitem>Templates</guimenuitem>
</menuchoice></term>
<listitem><para>Open the <filename
class="directory">Templates</filename> folder in a separate
window.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Go</guimenu>
<guimenuitem>Autostart</guimenuitem>
</menuchoice></term>
<listitem><para>Open your <filename
class="directory">Autostart</filename> folder in a separate
window.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Go</guimenu>
<guisubmenu>Most Often Visited</guisubmenu>
</menuchoice></term>
<listitem>
<para>Displays a submenu showing the &URL;s you visit most often. Selecting one
of these will make &konqueror; open that &URL;.</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="menu-bookmarks">
<title>The <guimenu>Bookmarks</guimenu> Menu</title>
@ -1002,129 +900,6 @@ change settings associated with spell checking in &konqueror;.</para>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="menu-window">
<title>The <guimenu>Window</guimenu> Menu</title>
<variablelist>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;&Shift;<keycap>L</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Split View Left/Right</guimenuitem>
</menuchoice></term>
<listitem><para>Split View Left/Right.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo
action="simul">&Ctrl;&Shift;<keycap>T</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Split View Top/Bottom</guimenuitem>
</menuchoice></term>
<listitem><para>Split View Top/Bottom.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo
action="simul">&Ctrl;&Shift;<keycap>R</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Remove Active View</guimenuitem>
</menuchoice></term>
<listitem><para>Remove Active View.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;&Shift;<keycap>N</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>New Tab</guimenuitem>
</menuchoice></term>
<listitem><para>Open a new, empty, tab page.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;&Shift;<keycap>D</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Duplicate Current Tab</guimenuitem>
</menuchoice></term>
<listitem><para>Open a duplicate tab page.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;&Shift;<keycap>B</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Detach Current Tab</guimenuitem>
</menuchoice></term>
<listitem><para>Show the current tab page in a new instance of
&konqueror;.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Close Current Tab</guimenuitem>
</menuchoice></term>
<listitem><para>Close the current tab page.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;&Shift;<keycap>Left</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Move Tab Left</guimenuitem>
</menuchoice></term>
<listitem><para>Move the current tab one place left in the list of tabs.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;&Shift;<keycap>Left</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Move Tab Right</guimenuitem>
</menuchoice></term>
<listitem><para>Move the current tab one place right in the list of tabs.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Window</guimenu>
<guimenuitem>Show Terminal Emulator</guimenuitem>
</menuchoice></term>
<listitem><para>Open a small text terminal view at the bottom of the
main
window.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul"><keycap>F9</keycap></keycombo></shortcut>
<guimenu>Window</guimenu>
<guimenuitem>Show Navigation Panel</guimenuitem>
</menuchoice></term>
<listitem><para>Toggles the display of the &konqueror; navigation panel. See
<xref linkend="sidebar"/>.</para></listitem>
</varlistentry>
</variablelist>
</sect2>

@ -1669,7 +1669,7 @@ new menu format:
</para>
<informalexample>
<para>Example from <filename>applications.menu</filename>:
<para>Example from <filename>kde-applications.menu</filename>:
<programlisting>
<markup>
&lt;Menu&gt;
@ -1743,7 +1743,7 @@ These are controlled by $<envar>XDG_DATA_HOME</envar>. For more
information, see <ulink url="http://www.freedesktop.org/Standards/basedir-spec">http://www.freedesktop.org/Standards/basedir-spec</ulink></para>
<informalexample>
<para>Example from <filename>applications.menu</filename>:
<para>Example from <filename>kde-applications.menu</filename>:
<programlisting>
<markup>
&lt;Menu&gt;

@ -83,7 +83,7 @@ Name[ne]=เค•เฅเคฏเฅ‡เคŸ
Name[pa]=เจ•เฉ‡เจŸ
Name[te]=เฐ•เฑ‡เฐŸเฑ
MimeType=text/plain;
Exec=kate %U
Exec=kate --use %U
X-KDE-StartupNotify=true
X-KDE-HasTempFileOption=true
Icon=kate
@ -91,5 +91,6 @@ Path=
DocPath=kate/index.html
Type=Application
Terminal=false
InitialPreference=8
X-DCOP-ServiceType=Multi
Categories=Qt;KDE;TextEditor;

@ -11,6 +11,10 @@ if include_kcontrol_smartcard
KSMCARD_SUBDIR=smartcard
endif
if include_kcontrol_iccconfig
ICCCONFIG_SUBDIR=iccconfig
endif
if include_kcontrol_usbview
USBVIEW_SUBDIR=usbview
endif
@ -36,4 +40,4 @@ SUBDIRS = bell background dnssd filetypes samba krdb input info ioslaveinfo kdm\
konsole spellchecking $(USBVIEW_SUBDIR) \
$(KSMCARD_SUBDIR) nics $(FONTINST_SUBDIR) $(RANDR_SUBDIR) \
componentchooser performance xinerama $(VIEW1394_SUBDIR) display kthememanager \
$(JOYSTICK_SUBDIR)
$(JOYSTICK_SUBDIR) $(ICCCONFIG_SUBDIR)

@ -53,6 +53,7 @@
#include <kstringhandler.h>
#include <kurlrequester.h>
#include <kwin.h>
#include <kwinmodule.h>
#include <kimagefilepreview.h>
#include <knewstuff/downloaddialog.h>
@ -73,7 +74,14 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
m_multidesktop = _multidesktop;
m_previewUpdates = true;
KWinModule *m_kwin;
m_kwin = new KWinModule(this);
m_curDesk = m_kwin->currentDesktop();
QSize s(m_kwin->numberOfViewports(m_kwin->currentDesktop()));
m_useViewports = s.width() * s.height() > 1;
m_numDesks = m_multidesktop ? KWin::numberOfDesktops() : 1;
m_numViewports = s.width() * s.height();
m_numScreens = QApplication::desktop()->numScreens();
QCString multiHead = getenv("KDE_MULTIHEAD");
@ -81,8 +89,19 @@ BGDialog::BGDialog(QWidget* parent, KConfig* _config, bool _multidesktop)
{
m_numScreens = 1;
}
QPoint vx(m_kwin->currentViewport(m_kwin->currentDesktop()));
int t_eViewport = (vx.x() * vx.y());
if (t_eViewport < 1) {
t_eViewport = 1;
}
delete m_kwin;
m_desk = m_multidesktop ? KWin::currentDesktop() : 1;
//m_desk = m_multidesktop ? (m_useViewports ? (m_desk * m_numViewports) : m_desk) : m_desk;
m_desk = m_multidesktop ? (m_useViewports ? (((m_desk - 1) * m_numViewports) + t_eViewport) : m_desk) : m_desk;
m_numDesks = m_multidesktop ? (m_useViewports ? (m_numDesks * m_numViewports) : m_numDesks) : m_numDesks;
m_screen = QApplication::desktop()->screenNumber(this);
if (m_screen >= (int)m_numScreens)
m_screen = m_numScreens-1;
@ -416,8 +435,18 @@ void BGDialog::slotIdentifyScreens()
void BGDialog::initUI()
{
// Desktop names
for (unsigned i = 0; i < m_numDesks; ++i)
m_comboDesktop->insertItem(m_pGlobals->deskName(i));
if (m_useViewports == false) {
for (unsigned i = 0; i < m_numDesks; ++i) {
m_comboDesktop->insertItem(m_pGlobals->deskName(i));
}
}
else {
for (unsigned i = 0; i < (m_numDesks/m_numViewports); ++i) {
for (unsigned j = 0; j < m_numViewports; ++j) {
m_comboDesktop->insertItem(i18n("Desktop %1 Viewport %2").arg(i+1).arg(j+1));
}
}
}
// Screens
for (unsigned i = 0; i < m_numScreens; ++i)

@ -86,8 +86,10 @@ protected:
KGlobalBackgroundSettings *m_pGlobals;
KStandardDirs *m_pDirs;
bool m_multidesktop;
bool m_useViewports;
int m_curDesk;
unsigned m_numDesks;
unsigned m_numViewports;
unsigned m_numScreens;
int m_desk;
int m_screen;

@ -54,8 +54,7 @@ KBackgroundRenderer::KBackgroundRenderer(int desk, int screen, bool drawBackgrou
m_isBusyCursor = false;
m_enableBusyCursor = false;
m_pDirs = KGlobal::dirs();
m_rSize = m_Size = drawBackgroundPerScreen ?
QApplication::desktop()->screenGeometry(screen).size() : QApplication::desktop()->size();
m_rSize = m_Size = drawBackgroundPerScreen ? KApplication::desktop()->screenGeometry(screen).size() : KApplication::desktop()->geometry().size();
m_pProc = 0L;
m_Tempfile = 0L;
m_bPreview = false;
@ -86,8 +85,7 @@ void KBackgroundRenderer::setSize(const QSize &size)
void KBackgroundRenderer::desktopResized()
{
m_State = 0;
m_rSize = drawBackgroundPerScreen() ?
QApplication::desktop()->screenGeometry(screen()).size() : QApplication::desktop()->size();
m_rSize = drawBackgroundPerScreen() ? KApplication::desktop()->screenGeometry(screen()).size() : KApplication::desktop()->geometry().size();
if( !m_bPreview )
m_Size = m_rSize;
}
@ -1048,7 +1046,7 @@ KVirtualBGRenderer::KVirtualBGRenderer( int desk, KConfig *config )
}
initRenderers();
m_size = QApplication::desktop()->size();
m_size = KApplication::desktop()->geometry().size();
}
KVirtualBGRenderer::~KVirtualBGRenderer()
@ -1155,7 +1153,7 @@ void KVirtualBGRenderer::setEnabled(bool enable)
void KVirtualBGRenderer::desktopResized()
{
m_size = QApplication::desktop()->size();
m_size = KApplication::desktop()->geometry().size();
if (m_pPixmap)
{
@ -1164,7 +1162,7 @@ void KVirtualBGRenderer::desktopResized()
m_pPixmap->fill(Qt::black);
}
initRenderers();
initRenderers();
}
@ -1196,8 +1194,7 @@ void KVirtualBGRenderer::setPreview(const QSize & size)
QSize KVirtualBGRenderer::renderSize(int screen)
{
return m_bDrawBackgroundPerScreen ?
QApplication::desktop()->screenGeometry(screen).size() : QApplication::desktop()->size();
return m_bDrawBackgroundPerScreen ? KApplication::desktop()->screenGeometry(screen).size() : KApplication::desktop()->geometry().size();
}
@ -1208,7 +1205,7 @@ void KVirtualBGRenderer::initRenderers()
m_bCommonScreen = m_pConfig->readBoolEntry("CommonScreen", _defCommonScreen);
m_numRenderers = m_bDrawBackgroundPerScreen ? QApplication::desktop()->numScreens() : 1;
m_numRenderers = m_bDrawBackgroundPerScreen ? KApplication::desktop()->numScreens() : 1;
m_bFinished.resize(m_numRenderers);
m_bFinished.fill(false);
@ -1267,10 +1264,11 @@ void KVirtualBGRenderer::screenDone(int _desk, int _screen)
// There's more than one renderer, so we are drawing each output to our own pixmap
QRect overallGeometry;
for (int i=0; i < QApplication::desktop()->numScreens(); ++i)
overallGeometry |= QApplication::desktop()->screenGeometry(i);
for (int i=0; i < KApplication::desktop()->numScreens(); ++i) {
overallGeometry |= KApplication::desktop()->screenGeometry(i);
}
QPoint drawPos = QApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft();
QPoint drawPos = KApplication::desktop()->screenGeometry(screen).topLeft() - overallGeometry.topLeft();
drawPos.setX( int(drawPos.x() * m_scaleX) );
drawPos.setY( int(drawPos.y() * m_scaleY) );

@ -44,45 +44,17 @@
<attribute name="title">
<string>&amp;General</string>
</attribute>
<vbox>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_BrowseLocal</cstring>
</property>
<property name="text">
<string>Browse local networ&amp;k</string>
</property>
<property name="whatsThis" stdset="0">
<string>Browse local network (domain .local) using multicast DNS.</string>
</property>
</widget>
<widget class="KEditListBox">
<property name="name">
<cstring>kcfg_DomainList</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Additional Domains</string>
</property>
<property name="whatsThis" stdset="0">
<string>List of Internet domains that will be browsed for services. Do not put .local here - it
is configured with 'Browse local network' option above.</string>
</property>
</widget>
<widget class="QButtonGroup">
<widget class="QButtonGroup" row="3" column="0">
<property name="name">
<cstring>kcfg_PublishType</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
@ -96,50 +68,104 @@ is configured with 'Browse local network' option above.</string>
</property>
<widget class="QRadioButton">
<property name="name">
<cstring>LANButtor</cstring>
<cstring>WANButton</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>23</y>
<y>51</y>
<width>618</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>Loc&amp;al network</string>
<string>&amp;Wide area network</string>
</property>
<property name="checked">
<bool>false</bool>
<property name="accel">
<string>Alt+W</string>
</property>
<property name="whatsThis" stdset="0">
<string>Advertise services on local network (in domain .local) using multicast DNS.</string>
<string>Advertise services on Internet domain using public IP. To have this option working you need to configure wide area operation in using administrator mode</string>
</property>
</widget>
<widget class="QRadioButton">
<property name="name">
<cstring>WANButton</cstring>
</property>
<property name="enabled">
<bool>true</bool>
<cstring>LANButtor</cstring>
</property>
<property name="geometry">
<rect>
<x>11</x>
<y>51</y>
<y>23</y>
<width>618</width>
<height>22</height>
</rect>
</property>
<property name="text">
<string>&amp;Wide area network</string>
<string>Loc&amp;al network</string>
</property>
<property name="accel">
<string>Alt+A</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
<property name="whatsThis" stdset="0">
<string>Advertise services on Internet domain using public IP. To have this option working you need to configure wide area operation in using administrator mode</string>
<string>Advertise services on local network (in domain .local) using multicast DNS.</string>
</property>
</widget>
</widget>
</vbox>
<widget class="QCheckBox" row="1" column="0">
<property name="name">
<cstring>kcfg_BrowseLocal</cstring>
</property>
<property name="text">
<string>Browse local networ&amp;k</string>
</property>
<property name="accel">
<string>Alt+K</string>
</property>
<property name="whatsThis" stdset="0">
<string>Browse local network (domain .local) using multicast DNS.</string>
</property>
</widget>
<widget class="QCheckBox" row="0" column="0">
<property name="name">
<cstring>enableZeroconf</cstring>
</property>
<property name="text">
<string>Enable &amp;Zeroconf network browsing</string>
</property>
<property name="accel">
<string>Alt+Z</string>
</property>
<property name="whatsThis" stdset="0">
<string>Browse local network (domain .local) using multicast DNS.</string>
</property>
</widget>
<widget class="KEditListBox" row="2" column="0">
<property name="name">
<cstring>kcfg_DomainList</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Additional Domains</string>
</property>
<property name="whatsThis" stdset="0">
<string>List of Internet domains that will be browsed for services. Do not put .local here - it
is configured with 'Browse local network' option above.</string>
</property>
</widget>
</grid>
</widget>
<widget class="QWidget">
<property name="name">

@ -70,9 +70,9 @@ Comment[zh_TW]=่จญๅฎšๆœๅ‹™ๅตๆธฌ
Exec=kcmshell kcm_kdnssd
GenericName=
GenericName[ko]=์ผ๋ฐ˜
Icon=blockdevice
Icon=network_local
MimeType=
Name=Service Discovery
Name=Zeroconf Service Discovery
Name[af]=Dienste ontdekker
Name[ar]=ุฅูƒุชุดุงู ุงู„ุฎุฏู…ุงุช
Name[be]=ะŸะพัˆัƒะบ ัะตั€ะฒั–ัะฐัž
@ -149,6 +149,7 @@ X-KDE-HasReadOnlyMode=false
X-KDE-Library=kdnssd
X-KDE-ModuleType=Library
X-KDE-ParentApp=kcontrol
X-KDE-SubstituteUID=false
X-KDE-RootOnly=true
#root parts unused with Avahi
#X-KDE-SubstituteUID=false
#X-KDE-RootOnly=true
Categories=Qt;KDE;X-KDE-settings-network;

@ -27,6 +27,10 @@
#include <qradiobutton.h>
#include <qtimer.h>
#include <qtabwidget.h>
#include <qcheckbox.h>
#include <qprocess.h>
#include <qcursor.h>
#include <qbuttongroup.h>
#include <klocale.h>
#include <kglobal.h>
@ -35,6 +39,8 @@
#include <klineedit.h>
#include <kpassdlg.h>
#include <ksimpleconfig.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include "kcmdnssd.h"
#include <dnssd/settings.h>
@ -65,7 +71,10 @@ KCMDnssd::KCMDnssd(QWidget *parent, const char *name, const QStringList&)
connect(hostedit,SIGNAL(textChanged(const QString&)),this,SLOT(wdchanged()));
connect(secretedit,SIGNAL(textChanged(const QString&)),this,SLOT(wdchanged()));
connect(domainedit,SIGNAL(textChanged(const QString&)),this,SLOT(wdchanged()));
connect(enableZeroconf,SIGNAL(toggled(bool)),this,SLOT(enableZeroconfChanged(bool)));
m_enableZeroconfChanged=false;
if (DNSSD::Configuration::self()->publishDomain().isEmpty()) WANButton->setEnabled(false);
kcfg_PublishType->hide(); //unused with Avahi
}
KCMDnssd::~KCMDnssd()
@ -75,18 +84,55 @@ KCMDnssd::~KCMDnssd()
void KCMDnssd::save()
{
setCursor(QCursor(Qt::BusyCursor));
KCModule::save();
if (geteuid()==0 && m_wdchanged) saveMdnsd();
domain->setFileWriteMode(0644); // this should be readable for everyone
domain->writeEntry("PublishDomain",domainedit->text());
domain->sync();
KIPC::sendMessageAll((KIPC::Message)KIPCDomainsChanged);
if (m_enableZeroconfChanged) {
QString scaryMessage = i18n("Enabling local network browsing will open a network port (5353) on your computer. If security problems are discovered in the zeroconf server, remote attackers could access your computer as the \"avahi\" user.");
KProcess *proc = new KProcess;
*proc << "kdesu";
if (enableZeroconf->isChecked()) {
if (KMessageBox::warningYesNo( this, scaryMessage, i18n("Enable Zeroconf Network Browsing"), KGuiItem(i18n("Enable Browsing")), KGuiItem(i18n("Don't Enable Browsing")) ) == KMessageBox::Yes) {
*proc << "/usr/share/avahi/enable_avahi 1";
proc->start(KProcess::Block);
} else {
enableZeroconf->setChecked(false);
}
} else {
*proc << "/usr/share/avahi/enable_avahi 0";
proc->start(KProcess::Block);
}
}
setCursor(QCursor(Qt::ArrowCursor));
}
void KCMDnssd::load()
{
KCModule::load();
if (geteuid()==0) loadMdnsd();
enableZeroconf->setChecked(false);
QProcess avahiStatus(QString("/usr/share/avahi/avahi_status"), this, "avahiStatus");
avahiStatus.start();
while (avahiStatus.isRunning()) {
kapp->processEvents();
}
int exitStatus = avahiStatus.exitStatus();
if (exitStatus == 0) { // disabled
enableZeroconf->setChecked(false);
} else if (exitStatus == 1) { // enabled
enableZeroconf->setChecked(true);
} else if (exitStatus == 2) { // custom setup
enableZeroconf->setEnabled(false);
}
KCModule::load();
}
// hack to work around not working isModified() for KPasswordEdit
@ -97,6 +143,12 @@ void KCMDnssd::wdchanged()
m_wdchanged=true;
}
void KCMDnssd::enableZeroconfChanged(bool)
{
changed();
m_enableZeroconfChanged=true;
}
void KCMDnssd::loadMdnsd()
{
QFile f(MDNSD_CONF);

@ -38,12 +38,14 @@ public:
virtual void load();
private slots:
void wdchanged();
void enableZeroconfChanged(bool);
private:
void loadMdnsd();
bool saveMdnsd();
QMap<QString,QString> mdnsdLines;
bool m_wdchanged;
KSimpleConfig* domain;
bool m_enableZeroconfChanged;
};
#endif

@ -164,6 +164,9 @@ void FilterOptions::load( bool useDefaults )
this, SLOT(checkFavoritesChanged()));
connect(m_dlg->lvSearchProviders, SIGNAL(pressed(QListViewItem *)),
this, SLOT(checkFavoritesChanged()));
connect(m_dlg->lvSearchProviders, SIGNAL(clicked(QListViewItem *)),
this, SLOT(checkFavoritesChanged()));
connect(m_dlg->cmbDefaultEngine, SIGNAL(activated(const QString &)), this,
SLOT(configChanged()));

@ -74,7 +74,6 @@ Name[vi]=Tร i liแป‡u vแป API cแปงa KDE
Name[wa]=Documintรฅcion di l'ย API di KDE
Name[zh_CN]=KDE API ๆ–‡ๆกฃ
Name[zh_TW]=KDE API ๆ–‡ไปถ
Query=http://developer.kde.org/documentation/library/classmapper.php?class=\\{@}
Query[bg]=http://developer.kde.org/documentation/library/classmapper.php?class=\
Query=http://api.kde.org/classmapper.php?class=\\{@}
ServiceTypes=SearchProvider
Type=Service

@ -331,7 +331,7 @@ bool FontAASettings::load( bool useDefaults )
kglobals.setReadDefaults( useDefaults );
kglobals.setGroup("General");
hStyle=KXftConfig::Hint::Medium;
hStyle=KXftConfig::Hint::Full;
xft.setHintStyle(hStyle);
xft.apply(); // Save this setting
kglobals.writeEntry("XftHintStyle", KXftConfig::toStr(hStyle));
@ -449,7 +449,7 @@ KXftConfig::Hint::Style FontAASettings::getHintStyle()
if(hintingStyle->currentText()==KXftConfig::description((KXftConfig::Hint::Style)s))
return (KXftConfig::Hint::Style)s;
return KXftConfig::Hint::Medium;
return KXftConfig::Hint::Full;
}
#endif
@ -527,13 +527,13 @@ KFonts::KFonts(QWidget *parent, const char *name, const QStringList &)
QFont f0("Sans Serif", 10);
QFont f1("Monospace", 10);
QFont f2("Sans Serif", 10);
QFont f3("Sans Serif", 9, QFont::Bold);
QFont f3("Sans Serif", 10, QFont::Bold);
QFont f4("Sans Serif", 10);
f0.setPointSize(10);
f1.setPointSize(10);
f2.setPointSize(10);
f3.setPointSize(9);
f3.setPointSize(10);
f4.setPointSize(10);
defaultFontList << f0 << f1 << f2 << f0 << f3 << f4 << f0;

@ -1147,7 +1147,7 @@ void KXftConfig::readContents()
if(*ptr=='\"')
{
ptr++;
if(NULL!=(eostr=strchr(ptr, '\"')) && eostr-ptr<constMaxDataLen)
if(NULL!=(eostr=(char*)strchr(ptr, '\"')) && eostr-ptr<constMaxDataLen)
{
memcpy(data, ptr, eostr-ptr);
data[eostr-ptr]='\0';
@ -1183,7 +1183,7 @@ void KXftConfig::readContents()
if(*ptr=='\"')
{
ptr++;
if(NULL!=(eostr=strchr(ptr, '\"')) && eostr-ptr<constMaxDataLen)
if(NULL!=(eostr=(char*)strchr(ptr, '\"')) && eostr-ptr<constMaxDataLen)
{
memcpy(data, ptr, eostr-ptr);
data[eostr-ptr]='\0';

@ -0,0 +1,17 @@
AM_CPPFLAGS = $(all_includes)
kde_module_LTLIBRARIES = kcm_iccconfig.la
kcm_iccconfig_la_SOURCES = iccconfig.cpp iccconfigbase.ui iccconfig.skel
kcm_iccconfig_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
kcm_iccconfig_la_LIBADD = -lkdeui $(LIB_KIO)
METASOURCES = AUTO
noinst_HEADERS = iccconfig.h
messages: rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/kcmiccconfig.pot
xdg_apps_DATA = iccconfig.desktop

@ -0,0 +1,7 @@
case "$host" in
*-*-linux*)
FOUND_LINUX=yes
;;
esac
AM_CONDITIONAL(include_kcontrol_iccconfig, test "$FOUND_LINUX" = "yes")

@ -0,0 +1,166 @@
/**
* smartcard.cpp
*
* Copyright (c) 2001 George Staikos <staikos@kde.org>
* Copyright (c) 2001 Fernando Llobregat <fernando.llobregat@free.fr>
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "iccconfig.h"
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <dcopclient.h>
#include <kaboutdata.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kdialog.h>
#include <kglobal.h>
#include <klistview.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kpopupmenu.h>
#include <kurlrequester.h>
#include <kgenericfactory.h>
#include <unistd.h>
#include <ksimpleconfig.h>
#include <string>
#include <stdio.h>
#include <qstring.h>
using namespace std;
/**** DLL Interface ****/
typedef KGenericFactory<KICCConfig, QWidget> KICCCFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_iccconfig, KICCCFactory("kcmiccconfig") )
KSimpleConfig *config;
/**** KICCConfig ****/
KICCConfig::KICCConfig(QWidget *parent, const char *name, const QStringList &)
: KCModule(KICCCFactory::instance(), parent, name)
{
QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
config = new KSimpleConfig( QString::fromLatin1( KDE_CONFDIR "/kicc/kiccconfigrc" ));
KAboutData *about =
new KAboutData(I18N_NOOP("kcmiccconfig"), I18N_NOOP("KDE ICC Profile Control Module"),
0, 0, KAboutData::License_GPL,
I18N_NOOP("(c) 2009 Timothy Pearson"));
about->addAuthor("Timothy Pearson", 0, "kb9vqf@pearsoncomputing.net");
setAboutData( about );
base = new ICCConfigBase(this);
layout->add(base);
setRootOnlyMsg(i18n("<b>The ICC color profile is a system wide setting, and requires administrator access</b><br>To alter the system's ICC profile, click on the \"Administrator Mode\" button below."));
setUseRootOnlyMsg(true);
connect(base->enableSupport, SIGNAL(clicked()), SLOT(changed()));
connect(base->enableSupport, SIGNAL(toggled(bool)), base->iccFile, SLOT(setEnabled(bool)));
connect(base->iccFile, SIGNAL(textChanged(const QString&)), SLOT(changed()));
load();
if (getuid() != 0 || !config->checkConfigFilesWritable( true )) {
base->enableSupport->setEnabled(false);
base->iccFile->setEnabled(false);
}
}
KICCConfig::~KICCConfig()
{
delete config;
}
void KICCConfig::load()
{
load( false );
}
void KICCConfig::load(bool useDefaults )
{
//Update the toggle buttons with the current configuration
config->setReadDefaults( useDefaults );
base->enableSupport->setChecked(config->readBoolEntry("EnableICC", false));
base->iccFile->setEnabled(config->readBoolEntry("EnableICC", false));
base->iccFile->setURL(config->readEntry("ICCFile"));
emit changed(useDefaults);
}
void KICCConfig::save()
{
config->writeEntry("EnableICC", base->enableSupport->isChecked());
config->writeEntry("ICCFile", base->iccFile->url());
if (base->enableSupport->isChecked()) {
// Apply ICC settings with XCalib
string icc_command="/usr/bin/xcalib ";
FILE *pipe_xcalib;
char xcalib_result[2048];
int i;
xcalib_result[0]=0;
icc_command.append(base->iccFile->url().ascii());
if ((pipe_xcalib = popen(icc_command.c_str(), "r")) == NULL)
{
printf("Xcalib pipe error\n\r");
}
else {
fgets(xcalib_result, 2048, pipe_xcalib);
pclose(pipe_xcalib);
for (i=1;i<2048;i++) {
if (xcalib_result[i] == 0) {
xcalib_result[i-1]=0;
i=2048;
}
}
if (strlen(xcalib_result) > 2) {
KMessageBox::error(this, QString("Unable to apply ICC configuration:\n\r%1").arg(xcalib_result));
}
}
}
emit changed(false);
}
void KICCConfig::defaults()
{
load( true );
}
QString KICCConfig::quickHelp() const
{
return i18n("<h1>ICC Profile Configuration</h1> This module allows you to configure KDE support"
" for ICC profiles. This allows you to easily color correct your monitor"
" for a more lifelike and vibrant image.");
}
#include "iccconfig.moc"

@ -0,0 +1,21 @@
[Desktop Entry]
Exec=kcmshell iccconfig
Icon=kcoloredit
Type=Application
DocPath=kcontrol/iccconfig/index.html
X-KDE-Library=iccconfig
X-KDE-ParentApp=kcontrol
X-KDE-RootOnly=true
X-KDE-SubstituteUID=true
Categories=Qt;KDE;X-KDE-settings-peripherals;
Comment=Configure display ICC profile
Comment[en_US]=Configure display ICC profile
DocPath=kcontrol/iccconfig.html
GenericName=
GenericName[en_US]=
Keywords=ICC,display,color,profile
MimeType=
Name=ICC Color Profile
Name[en_US]=ICC Color Profile

@ -0,0 +1,71 @@
/**
* iccconfig.h
*
* Copyright (c) 2009 Timothy Pearson <kb9vqf@pearsoncomputing.net>
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _KCM_ICCCONFIG_H
#define _KCM_ICCCONFIG_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <dcopobject.h>
#include <kcmodule.h>
#include "iccconfigbase.h"
class KConfig;
class KPopupMenu;
class KListViewItem;
class KICCConfig : public KCModule, public DCOPObject
{
K_DCOP
Q_OBJECT
public:
//KICCConfig(QWidget *parent = 0L, const char *name = 0L);
KICCConfig(QWidget *parent, const char *name, const QStringList &);
virtual ~KICCConfig();
ICCConfigBase *base;
void load();
void load( bool useDefaults);
void save();
void defaults();
int buttons();
QString quickHelp() const;
k_dcop:
private:
KConfig *config;
bool _ok;
KPopupMenu * _popUpKardChooser;
};
#endif

@ -0,0 +1,102 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>ICCConfigBase</class>
<widget class="QWidget">
<property name="name">
<cstring>ICCConfigBase</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>519</width>
<height>356</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QTabWidget" row="0" column="0">
<property name="name">
<cstring>TabWidget2</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QWidget">
<property name="name">
<cstring>tab</cstring>
</property>
<attribute name="title">
<string>ICC Color Profile Configuration</string>
</attribute>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox" row="0" column="0" colspan="2">
<property name="name">
<cstring>enableSupport</cstring>
</property>
<property name="text">
<string>&amp;Enable global ICC color profile support</string>
</property>
</widget>
<widget class="KURLRequester" row="1" column="1">
<property name="name">
<cstring>iccFile</cstring>
</property>
<property name="filter">
<string>*.icc</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
<property name="text">
<string>ICC File</string>
</property>
</widget>
<spacer row="2" column="0">
<property name="name" stdset="0">
<cstring>Spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</grid>
</widget>
</widget>
</grid>
</widget>
<connections>
<connection>
<sender>enableSupport</sender>
<signal>toggled(bool)</signal>
<receiver>ICCConfigBase</receiver>
<slot>enableSupport_toggled(bool)</slot>
</connection>
</connections>
<includes>
<include location="local" impldecl="in implementation">ICCConfigBase.ui.h</include>
</includes>
<slots>
<slot>enableSupport_toggled(bool)</slot>
</slots>
<includes>
<include location="local" impldecl="in implementation">kdialog.h</include>
</includes>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>

@ -0,0 +1,104 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ICCConfigBase</class>
<widget class="QWidget">
<property name="name">
<cstring>ICCConfigBase</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>519</width>
<height>356</height>
</rect>
</property>
<property name="caption">
<string>ICCConfigBase</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QTabWidget" row="0" column="0">
<property name="name">
<cstring>TabWidget2</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<widget class="QWidget">
<property name="name">
<cstring>tab</cstring>
</property>
<attribute name="title">
<string>ICC Color Profile Configuration</string>
</attribute>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>enableSupport</cstring>
</property>
<property name="text">
<string>&amp;Enable ICC color profile support</string>
</property>
</widget>
<widget class="KURLRequester" row="1" column="1">
<property name="name">
<cstring>editPCF</cstring>
</property>
<property name="filter">
<string>.icc</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
<property name="text">
<string>ICC File</string>
</property>
</widget>
<spacer row="2" column="0">
<property name="name">
<cstring>Spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</grid>
</widget>
</widget>
</grid>
</widget>
<connections>
<connection>
<sender>enableSupport</sender>
<signal>toggled(bool)</signal>
<receiver>ICCConfigBase</receiver>
<slot>enableSupport_toggled(bool)</slot>
</connection>
</connections>
<slots>
<slot>enableSupport_toggled(bool)</slot>
</slots>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>