Commit Graph

35 Commits (025ed8ca827d8cd90c29ebfb8c3eaacc59e18f8c)

Author SHA1 Message Date
Slávek Banko 59c2b00dd7
Fix FTBFS when building kxkb without tdehw library.
This relates to issue #550.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
6 months ago
Mavridis Philippe aed24cdf3f Kxkb: layout switching and UI bugfixes and minor refactoring
* Layout switching
  - Improved layout change logic (indicator is now always updated when the actual switch occurs). This fixes layout switching triggered by the X11 shortcut not being synchronized with layout switching from the tray icon click and the TDE shortcut.
  - Kxkb will ignore XkbStateNotify events not related to XkbGroupState which caused strange behaviour with the system tray context menu.
  - Reapply Xkb settings when a keyboard device changes state
  - Do not run setxkbmap without arguments
  - Catch and process changes to Xkb layouts and options
  - Always check for Xkb opcode in X11 events, this fixes invalid group issue (Michele Calgaro)

* Tray indicator
  - Do not reload all Kxkb settings every time we are requested to get a pixmap!
  - Tray indicator pixmap manager improvements
  - Fix Quit tray icon menu item

* Configuration
  - Optimize settings reloading
  - Do not reload settings every time getKxkbOptions() is called; if settings actually need to be re-read, it must be done maunally before calling this function
  - Use pointer to global KxkbConfig instance instead of keeping own copy
  - Fixed optimized loading of initial settings using KxkbConfig::LOAD_INIT_OPTIONS (I had sort of broken it in the past)
  - Removed unused KxkbConfig::LOAD_ACTIVE_OPTIONS
  - `newInstance()` now delegates calling setLayout() to readSettings()
  - Merged `initTray()` into `readSettings()` - no reason to exist as separate function

* Refactoring
  - Merged KxkbLabelController into KxkbSystemTray
  - Rename LayoutIcon to LayoutIconManager for clarity
  - Minor code cleanup in LayoutIconManager
  - Remove use of singleton pattern for LayoutIconManager
  - Make XKBExtension a singleton.
  - Add mutex to XKBExtension to prevent it from processing configuration changes likely caused by KXkb
  - `XKBExtension::getServerOptions()` now also returns layout and variant information in a XkbOptions struct
  - New `KxkbConfig::setFromXkbOptions()` member can update current configuration from a XkbOptions struct
  - No need to use `tdeApp` pointer in KXKBApp (KUniqueApplication) class
  - Consistent code style and more appropriate function names and return types
  - Commented option sections for clarity
  - Removed superfluous debug messages
  - Add proper copyright header to extension.*

* Settings GUI
  - Make "Transparent background" checkbox available for theme colors in the GUI
  - Add customization options "Stretch flag", "Dim flag", "Show indicator bevel"
  - Disable KMilo checkbox when layout notifications disabled
  - Fix reading settings for TDE layout hotkeys

This resolves #547.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 months ago
Michele Calgaro 669c9bc7d8
Use tdestandarddirs.h
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
7 months ago
Michele Calgaro cbf7df3a2e
Use tdeglobalaccel.h
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
8 months ago
Michele Calgaro 834496cf73
Use tdeApp
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
8 months ago
Michele Calgaro 6671b1a5d0
Use tdeprocess.h
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
10 months ago
Michele Calgaro c1e3b95ae6
Rename KUniqueApplication to TDEUniqueApplication
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
11 months ago
Michele Calgaro 026828840f
Replace KDE_[NO_]EXPORT with TDE_[NO_]EXPORT
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Alexander Golubev 18a8b8d435 kxkb: utilize a translations provseided by xkeyboard-config
xkeyboard-config package comes with a message catalogue of its own to
translate locale, keyboard model and xkb option names. It would be
easier and more robust to utilize it instead of redoing all
translation in-house.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Michele Calgaro a4241b7911
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro c4a6487c82
Replace various '#define' strings - part 6
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Mavridis Philippe 7c724a4921
KXkb: add keyboard layout notification
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
2 years ago
Mavridis Philippe 9647d4c7ff
Kxkb: move LayoutUnit struct into its own file and add getLayoutName function
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
2 years ago
Roman Savochenko d4d334c1af
kxkb: prevent overflow in case of non-existing layout group
Signed-off-by: Roman Savochenko <roman@oscada.org>
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Mavridis Philippe 22bb398b3b
kxkb: re-add custom TDE switching shortcut
This commit fixes issue #342.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
2 years ago
Mavridis Philippe e8208c1dfb
Kxkb: improve TDE Control Centre module.
1) Add conflicts check for hotkey checkboxes

Due to the ability to set multiple keyboard layout switching hotkeys,
it is important to inform the user of conflicting options that are
not handled properly by the X.org server when set at the same time
(e.g. Win+Space and Alt+Space).

This change adds a warning that informs the user about the problem and
the conflicting options. This warning is shown only when setting
multiple hotkeys via the Xkb options tab, which is for the advanced
user. Most users will ever need only one hotkey, and the combobox on
the first tab should be more than enough.

2) Add "none" item to layout switching options

3) Replace Reset old options checkbox with radio buttons

As per discussion, this makes the function of the option more
apparent. WhatIs hints have been added for additional clarity.

4) Update hotkey combobox per server options

5) Avoid duplication of options by querying Xkb for already set options.

This was a problem in Append Mode in which `setxkbmap` strings would
get too long due to setting already set options. This code checks for
already set options and omits them from the new `setxkbmap` call.

This does not apply to Overwrite Mode.

6) Overwrite previous grp: options when using the combobox

See previous commit message about the addition of hotkeys combobox.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
3 years ago
Mavridis Philippe a67db2d484
Kxkb: Improve layout switching
1) New layout switching approach

The new approach is based on the "grp" options group of Xkb
and so enables us to use predefined X11 layout (group) switching
hotkeys like "Caps Lock" or "Shift+Alt" (you can see the full list
in the Options tab). The added bonus to this is that we conform
to the Xkb setting.

The code lets Xkb handle the keyboard layout switching hotkey(s)
and is similar to the one that is used in kkbswitch, monitoring
for an Xkb group (layout) change event.

This solution required me to remove some hacky and obsolete code
which was there to support really old pre-XFree-4.2 era systems
and included the "include groups" hack.

This means that the "Enable latin layout" checkbox is now gone
and setxkbmap is only called when the keyboard layouts and/or
options are modified, and not for every layout change.

2) Common layout switching hotkeys combobox

A combobox was added to the first page of the Keyboard Layouts
KCM module. It provides to the users a quick way to set a layout
switching key combination. It also controls the "grp" group in
the Xkb tab.

A special note about this combobox is that, even if Append Mode
was selected in the Xkb Options tab, this hotkey will overwrite
previous hotkey options. This means that all grp: options will
be forced removed before applying the option from the combobox
(in contrast to specifying options via the Xkb Options tab,
which, in Append Mode, will not get overwritten until next login).

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
3 years ago
Mavridis Philippe 3bdd919eec
Removed unneeded quit() call.
This resolves a problem with Kxkb's Quit confirmation, where pressing Cancel
would nevertheless quit the program.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
4 years ago
Timothy Pearson 77cbe84cb6 Rename additional header files to avoid conflicts with KDE4 13 years ago
Timothy Pearson 9286b9ebcc Rename common header files for consistency with class renaming 13 years ago
Timothy Pearson a5430e4b98 Rename many classes and header files to avoid conflicts with KDE4 13 years ago
Timothy Pearson f537c21b68 Rename a number of classes to enhance compatibility with KDE4 13 years ago
Timothy Pearson de7e5867a6 Rename a number of libraries and executables to avoid conflicts with KDE4 13 years ago
Timothy Pearson 79b21d47bc Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4 13 years ago
Timothy Pearson 1d061b286a Rename KInstance and KAboutData to avoid conflicts with KDE4 13 years ago
Timothy Pearson e4e0479220 Rename KApplication to TDEApplication to avoid conflicts with KDE4 13 years ago
Timothy Pearson d41050ea3f Rename KCmdLineArgs to TDECmdLineArgs to avoid conflicts with KDE4 13 years ago
Darrell Anderson 4f24944314 Branding cleanup: I18N_NOOP KDE -> TDE. 14 years ago
Timothy Pearson 43d99cc247 Rename kwin to twin (part 1 of 2) 14 years ago
tpearson 9a3f0aacd4 rename the following methods:
tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
14 years ago
tpearson 8155225c9b Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
15 years ago
tpearson fd3a982e26 Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1212480 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
15 years ago
tpearson 495d08bc2d Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1211357 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
15 years ago
tpearson c663b64409 Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
15 years ago
toma 4aed2c8219 Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
16 years ago