generic: make use of the new KDE_DEFAULT_CURSOR_THEME definition

requires d278c3c63c26aa0b0f63d630d27c210213015f1a from kdelibs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-15 02:40:22 +03:00
parent b60b5e38d5
commit 5d34b9cfcb
6 changed files with 9 additions and 6 deletions

View file

@ -24,6 +24,8 @@
#include <config-X11.h> #include <config-X11.h>
#include <kglobalsettings.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
@ -60,7 +62,7 @@ int main( int argc, char* argv[] )
&& isEmpty( XGetDefault( dpy, "Xcursor", "theme" )) && isEmpty( XGetDefault( dpy, "Xcursor", "theme" ))
&& isEmpty( XcursorGetTheme( dpy))) && isEmpty( XcursorGetTheme( dpy)))
{ {
theme = "Oxygen_White"; theme = KDE_DEFAULT_CURSOR_THEME;
} }
// Apply the KDE cursor theme to ourselves // Apply the KDE cursor theme to ourselves

View file

@ -59,7 +59,7 @@ extern "C"
&& QByteArray( XGetDefault( QX11Info::display(), "Xcursor", "theme" )).isEmpty() && QByteArray( XGetDefault( QX11Info::display(), "Xcursor", "theme" )).isEmpty()
&& QByteArray( XcursorGetTheme( QX11Info::display())).isEmpty()) && QByteArray( XcursorGetTheme( QX11Info::display())).isEmpty())
{ {
theme = "Oxygen_White"; theme = QString::fromLatin1(KDE_DEFAULT_CURSOR_THEME);
} }
// Apply the KDE cursor theme to ourselves // Apply the KDE cursor theme to ourselves

View file

@ -382,7 +382,7 @@ void ThemePage::load()
void ThemePage::defaults() void ThemePage::defaults()
{ {
view->selectionModel()->clear(); view->selectionModel()->clear();
QModelIndex defaultIndex = proxy->findIndex("Oxygen_White"); QModelIndex defaultIndex = proxy->findIndex(KDE_DEFAULT_CURSOR_THEME);
view->setCurrentIndex(defaultIndex); view->setCurrentIndex(defaultIndex);
preferredSize = 0; preferredSize = 0;
updateSizeComboBox(); updateSizeComboBox();

View file

@ -358,7 +358,7 @@ int main(int argc, char *argv[])
// Export the Xcursor theme & size settings // Export the Xcursor theme & size settings
KConfigGroup mousecfg(KSharedConfig::openConfig("kcminputrc"), "Mouse"); KConfigGroup mousecfg(KSharedConfig::openConfig("kcminputrc"), "Mouse");
QString theme = mousecfg.readEntry("cursorTheme", QString("Oxygen_White")); QString theme = mousecfg.readEntry("cursorTheme", QString::fromLatin1(KDE_DEFAULT_CURSOR_THEME));
QString size = mousecfg.readEntry("cursorSize", QString()); QString size = mousecfg.readEntry("cursorSize", QString());
QString contents; QString contents;

View file

@ -36,7 +36,7 @@ static QString KGreeterDefaultStyle()
static QString KGreeterDefaultCursorTheme() static QString KGreeterDefaultCursorTheme()
{ {
return QString::fromLatin1("Oxygen_White"); return QString::fromLatin1(KDE_DEFAULT_CURSOR_THEME);
} }
static QString KGreeterDefaultBackground() static QString KGreeterDefaultBackground()

View file

@ -31,6 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <kaction.h> #include <kaction.h>
#include <kactioncollection.h> #include <kactioncollection.h>
#include <kstandardaction.h> #include <kstandardaction.h>
#include <kglobalsettings.h>
#include <KConfigGroup> #include <KConfigGroup>
#include <KLocalizedString> #include <KLocalizedString>
#include <KDebug> #include <KDebug>
@ -152,7 +153,7 @@ void ZoomEffect::recreateTexture()
{ {
// read details about the mouse-cursor theme define per default // read details about the mouse-cursor theme define per default
KConfigGroup mousecfg(KSharedConfig::openConfig("kcminputrc"), "Mouse"); KConfigGroup mousecfg(KSharedConfig::openConfig("kcminputrc"), "Mouse");
QString theme = mousecfg.readEntry("cursorTheme", QString()); QString theme = mousecfg.readEntry("cursorTheme", QString::fromLatin1(KDE_DEFAULT_CURSOR_THEME));
QString size = mousecfg.readEntry("cursorSize", QString()); QString size = mousecfg.readEntry("cursorSize", QString());
// fetch a reasonable size for the cursor-theme image // fetch a reasonable size for the cursor-theme image