mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
generic: misc cleanups
This commit is contained in:
parent
e00d334905
commit
eb88b9aeb2
11 changed files with 27 additions and 186 deletions
|
@ -1,3 +1,5 @@
|
|||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
include(cursors.cmake)
|
||||
include(config.cmake)
|
||||
include(setup.cmake)
|
||||
|
|
|
@ -3,15 +3,19 @@ How to generate all the pngs and the SVGs and the cursor files:
|
|||
mkdir build
|
||||
cd build
|
||||
cmake ../src
|
||||
make [-j <n>] [theme-<color>|package-<color>]
|
||||
make [theme-<color>|package-<color>]
|
||||
|
||||
Where <n> is the number of jobs to run in parallel (man make), and <color> is the color you want generated if you want just one of them.
|
||||
Where <color> is the color you want generated if you want just one of them.
|
||||
|
||||
The build system is still young, with rough edges (e.g. doesn't check if inkscape is found). Hopefully it will work,
|
||||
but there may still be problems.
|
||||
The build system is still young, with rough edges (e.g. doesn't check if
|
||||
inkscape is found). Hopefully it will work, but there may still be problems.
|
||||
|
||||
All of what you see here is to be considered a work in progress, and therefore must be considered as unreleased.
|
||||
All of what you see here is to be considered a work in progress, and therefore
|
||||
must be considered as unreleased.
|
||||
|
||||
Information on the graphics: Riccardo "ruphy" Iaconelli <riccardo@kde.org>
|
||||
Information on the build system: Matthew Woehlke <mw_triad@users.sourceforge.net> and Diego 'Flameeyes' Pettenò.
|
||||
Preferred place to get help: #oxygen on irc.freenode.net (http://freenode.net/)
|
||||
Information on the graphics:
|
||||
Riccardo "ruphy" Iaconelli <riccardo@kde.org>
|
||||
|
||||
Information on the build system:
|
||||
Matthew Woehlke <mw_triad@users.sourceforge.net>
|
||||
Diego 'Flameeyes' Pettenò
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
find_program(TAR tar)
|
||||
# TODO abort if tar not found (or does not understand cjf?)
|
||||
if(NOT WIN32)
|
||||
find_program(INKSCAPE inkscape)
|
||||
# TODO abort if inkscape not found
|
||||
|
||||
find_program(XCURSORGEN xcursorgen)
|
||||
# TODO abort if xcursorgen not found
|
||||
else(NOT WIN32)
|
||||
find_program(INKSCAPE inkscape "$ENV{PROGRAMFILES}/Inkscape" "$ENV{INKSCAPE_DIR}")
|
||||
endif(NOT WIN32)
|
||||
set(setuptools tar inkspace xcursorgen)
|
||||
foreach(tool ${setuptools})
|
||||
string(TOUPPER ${tool} uppertool)
|
||||
find_program(${uppertool} ${tool})
|
||||
if(NOT ${uppertool})
|
||||
message(SEND_ERROR "${tool} was not found")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# For a given cursor, this macro defines a variable ${cursor}_inputs that contains
|
||||
# a list of the necessary png files.
|
||||
|
|
|
@ -286,8 +286,8 @@ int main(int _argc, char *_argv[])
|
|||
dlg->setCaption(modules.first()->name());
|
||||
}
|
||||
|
||||
for (KService::List::ConstIterator it = modules.constBegin(); it != modules.constEnd(); ++it)
|
||||
dlg->addModule(*it, 0, moduleArgs);
|
||||
foreach(const KSharedPtr<KService> it, modules)
|
||||
dlg->addModule(it, 0, moduleArgs);
|
||||
|
||||
if ( !args->isSet( "icon" ) && modules.count() == 1)
|
||||
{
|
||||
|
|
|
@ -24,18 +24,9 @@ set(kglobalaccel_SRCS
|
|||
if ( Q_WS_X11 )
|
||||
set( kglobalaccel_SRCS ${kglobalaccel_SRCS} kglobalaccel_x11.cpp )
|
||||
endif ( Q_WS_X11 )
|
||||
if ( Q_WS_MAC )
|
||||
set( kglobalaccel_SRCS ${kglobalaccel_SRCS} kglobalaccel_mac.cpp )
|
||||
endif ( Q_WS_MAC )
|
||||
if ( Q_WS_QWS )
|
||||
set( kglobalaccel_SRCS ${kglobalaccel_SRCS} kglobalaccel_qws.cpp )
|
||||
endif ( Q_WS_QWS )
|
||||
|
||||
kde4_add_executable( kglobalaccel NOGUI ${kglobalaccel_SRCS} )
|
||||
target_link_libraries(kglobalaccel ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${X11_LIBRARIES})
|
||||
if(Q_WS_MAC)
|
||||
target_link_libraries(kglobalaccel ${CARBON_LIBRARY})
|
||||
endif(Q_WS_MAC)
|
||||
|
||||
# Install application and configuration
|
||||
install( TARGETS kglobalaccel ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
||||
|
@ -44,30 +35,3 @@ install( FILES kglobalaccel.desktop DESTINATION ${SERVICES_INSTALL_DIR})
|
|||
# KNotify configuration
|
||||
install( FILES kglobalaccel.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kglobalaccel )
|
||||
|
||||
###
|
||||
### KDE 4.2 > 4.3 Migration Start
|
||||
###
|
||||
### Uninstall the kde 4.0 - 4.2 kdedglobalaccel files
|
||||
find_file(
|
||||
KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_DESKTOP_FILE
|
||||
kdedglobalaccel.desktop
|
||||
PATHS ${SERVICES_INSTALL_DIR}/kded
|
||||
NO_DEFAULT_PATH)
|
||||
find_file(
|
||||
KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_PLUGIN
|
||||
kded_globalaccel.so
|
||||
PATHS ${PLUGIN_INSTALL_DIR}
|
||||
NO_DEFAULT_PATH)
|
||||
if(KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_DESKTOP_FILE)
|
||||
install(CODE "MESSAGE(\"Removing kdedglobalaccel desktop file\")")
|
||||
install(CODE "file(REMOVE ${KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_DESKTOP_FILE})")
|
||||
endif(KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_DESKTOP_FILE)
|
||||
if(KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_PLUGIN)
|
||||
install(CODE "MESSAGE(\"Removing kdedglobalaccel plugin\")")
|
||||
install(CODE "file(REMOVE ${KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_PLUGIN})")
|
||||
endif(KDEBASE_KGLOBALACCEL_REMOVE_OBSOLETE_KDED_PLUGIN)
|
||||
|
||||
###
|
||||
### KDE 4.2 > 4.3 Migration End
|
||||
###
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
#cmakedefine HAVE_XKB
|
||||
#cmakedefine HAVE_XKB
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
[D-BUS Service]
|
||||
Name=org.kde.kglobalaccel
|
||||
Exec=@CMAKE_INSTALL_PREFIX@/bin/kglobalaccel
|
|
@ -1,61 +0,0 @@
|
|||
/* This file is part of the KDE libraries
|
||||
Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include "kglobalaccel_qws.h"
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <QtGui/qwindowdefs.h>
|
||||
#ifdef Q_WS_QWS
|
||||
|
||||
#include "kglobalaccel.h"
|
||||
|
||||
#include <kapplication.h>
|
||||
#include <kdebug.h>
|
||||
|
||||
KGlobalAccelImpl::KGlobalAccelImpl(GlobalShortcutsRegistry* owner)
|
||||
: m_owner(owner)
|
||||
{
|
||||
}
|
||||
|
||||
bool KGlobalAccelImpl::grabKey( int keyQt, bool grab )
|
||||
{
|
||||
if( !keyQt ) {
|
||||
kWarning(125) << "Tried to grab key with null code.";
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO ...
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void KGlobalAccelImpl::setEnabled( bool enable )
|
||||
{
|
||||
#if 0
|
||||
if ( enable )
|
||||
kapp->installWinEventFilter( this );
|
||||
else
|
||||
kapp->removeWinEventFilter( this );
|
||||
#endif
|
||||
}
|
||||
|
||||
#include "moc_kglobalaccel_qws.cpp"
|
||||
|
||||
#endif // Q_WS_QWS
|
|
@ -1,62 +0,0 @@
|
|||
/* This file is part of the KDE libraries
|
||||
Copyright (C) 2001,2002 Ellis Whitehead <ellis@kde.org>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef KGLOBALACCEL_QWS_H
|
||||
#define KGLOBALACCEL_QWS_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class GlobalShortcutsRegistry;
|
||||
/**
|
||||
* @internal
|
||||
*
|
||||
* The KGlobalAccel private class handles grabbing of global keys,
|
||||
* and notification of when these keys are pressed.
|
||||
*/
|
||||
class KGlobalAccelImpl : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KGlobalAccelImpl(class GlobalShortcutsRegistry* owner);
|
||||
|
||||
public:
|
||||
/**
|
||||
* This function registers or unregisters a certain key for global capture,
|
||||
* depending on \b grab.
|
||||
*
|
||||
* Before destruction, every grabbed key will be released, so this
|
||||
* object does not need to do any tracking.
|
||||
*
|
||||
* \param key the Qt keycode to grab or release.
|
||||
* \param grab true to grab they key, false to release the key.
|
||||
*
|
||||
* \return true if successful, otherwise false.
|
||||
*/
|
||||
bool grabKey(int key, bool grab);
|
||||
|
||||
/// Enable/disable all shortcuts. There will not be any grabbed shortcuts at this point.
|
||||
void setEnabled(bool);
|
||||
|
||||
private:
|
||||
|
||||
GlobalShortcutsRegistry* m_owner;
|
||||
};
|
||||
|
||||
#endif // KGLOBALACCEL_QWS_H
|
|
@ -1,7 +1,7 @@
|
|||
#1 is generate_fishcode.py
|
||||
#2 is md5sum
|
||||
#3 is the output file
|
||||
#4 are the parameters for cut
|
||||
#4 are the parameters for cut
|
||||
import sys
|
||||
import re
|
||||
import hashlib
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# $1 is fish.pl
|
||||
# $2 is md5sum
|
||||
# $3 is the output file
|
||||
# $4 are the parameters for cut
|
||||
# $4 are the parameters for cut
|
||||
|
||||
SUM=`$2 "$1" | cut -d ' ' $4 `
|
||||
echo '#define CHECKSUM "'$SUM'"' > $3
|
||||
|
|
Loading…
Add table
Reference in a new issue