diff options
| -rw-r--r-- | src/app/lxdesupport.cpp | 3 | ||||
| -rw-r--r-- | src/plugins/Effect/ladspa/ladspahost.cpp | 7 | ||||
| -rw-r--r-- | src/plugins/General/hotkey/hotkeymanager.cpp | 11 | ||||
| -rw-r--r-- | src/plugins/Input/flac/decoder_flac.cpp | 3 | ||||
| -rw-r--r-- | src/plugins/Ui/skinned/dock.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/Ui/skinned/eqgraph.cpp | 15 | ||||
| -rw-r--r-- | src/plugins/Ui/skinned/pixmapwidget.h | 6 |
7 files changed, 13 insertions, 34 deletions
diff --git a/src/app/lxdesupport.cpp b/src/app/lxdesupport.cpp index 797bb89ff..f1e9f318f 100644 --- a/src/app/lxdesupport.cpp +++ b/src/app/lxdesupport.cpp @@ -31,7 +31,8 @@ void LXDESupport::load() QString conf_path = qgetenv("XDG_CONFIG_HOME"); if(conf_path.isEmpty()) conf_path = QDir::homePath() + "/.config"; - conf_path.append("/lxsession/LXDE/desktop.conf"); + //conf_path.append("/lxsession/LXDE/desktop.conf"); + conf_path.append("/lxsession/Lubuntu/desktop.conf"); QSettings lxde_settings(conf_path, QSettings::IniFormat); QString themeName = lxde_settings.value("GTK/sNet/IconThemeName").toString(); diff --git a/src/plugins/Effect/ladspa/ladspahost.cpp b/src/plugins/Effect/ladspa/ladspahost.cpp index 785502e50..730088bff 100644 --- a/src/plugins/Effect/ladspa/ladspahost.cpp +++ b/src/plugins/Effect/ladspa/ladspahost.cpp @@ -435,7 +435,6 @@ void LADSPAHost::initialize(LADSPAEffect *instance) const LADSPA_Descriptor *plugin = instance->descriptor; const LADSPA_PortRangeHint *hints = plugin->PortRangeHints; LADSPA_Data fact, min, max, step, start; - int dp; for (unsigned long k = 0; k < MAX_KNOBS && k < plugin->PortCount; ++k) { @@ -474,41 +473,35 @@ void LADSPAHost::initialize(LADSPAEffect *instance) /* infinity */ if (10000.0f <= max - min) { - dp = 1; step = 5.0f; /* 100.0 ... lots */ } else if (100.0f < max - min) { - dp = 0; step = 5.0f; /* 10.0 ... 100.0 */ } else if (10.0f < max - min) { - dp = 1; step = 0.5f; /* 1.0 ... 10.0 */ } else if (1.0f < max - min) { - dp = 2; step = 0.05f; /* 0.0 ... 1.0 */ } else { - dp = 3; step = 0.005f; } if (LADSPA_IS_HINT_INTEGER(hints[k].HintDescriptor)) { - dp = 0; if (step < 1.0f) step = 1.0f; } diff --git a/src/plugins/General/hotkey/hotkeymanager.cpp b/src/plugins/General/hotkey/hotkeymanager.cpp index 4190c9eb7..070619b3a 100644 --- a/src/plugins/General/hotkey/hotkeymanager.cpp +++ b/src/plugins/General/hotkey/hotkeymanager.cpp @@ -34,6 +34,7 @@ extern "C" #include <X11/Xlib.h> #include <X11/keysym.h> #include <X11/XF86keysym.h> +#include <X11/XKBlib.h> } #undef CursorShape #undef Status @@ -90,7 +91,7 @@ HotkeyManager::HotkeyManager(QObject *parent) : QObject(parent) Hotkey *hotkey = new Hotkey; hotkey->action = i; hotkey->key = key; - hotkey->code = XKeysymToKeycode(QX11Info::display(), hotkey->key); + hotkey->code = XkbKeycodeToKeysym(QX11Info::display(), hotkey->key, 0, 0); if(!hotkey->code) continue; XGrabKey(QX11Info::display(), hotkey->code, mod | mask_mod, rootWindow, False, @@ -136,7 +137,7 @@ bool HotkeyManager::eventFilter(QObject* o, QEvent* e) if (e->type() == QEvent::KeyPress && (o == qApp->desktop () || o == qApp->activeWindow ())) { QKeyEvent* k = static_cast<QKeyEvent*>(e); - quint32 key = XKeycodeToKeysym(QX11Info::display(), k->nativeScanCode (), 0); + quint32 key = XkbKeycodeToKeysym(QX11Info::display(), k->nativeScanCode (), 0, 0); quint32 mod = k->nativeModifiers (); SoundCore *core = SoundCore::instance(); MediaPlayer *player = MediaPlayer::instance(); @@ -222,7 +223,7 @@ void HotkeyManager::ensureModifiers() XModifierKeymap* map = XGetModifierMapping(appDpy); if (map) { - // XKeycodeToKeysym helper code adapeted from xmodmap + // XkbKeycodeToKeysym helper code adapeted from xmodmap int min_keycode, max_keycode, keysyms_per_keycode = 1; XDisplayKeycodes (appDpy, &min_keycode, &max_keycode); XFree(XGetKeyboardMapping (appDpy, min_keycode, (max_keycode - min_keycode + 1), &keysyms_per_keycode)); @@ -238,7 +239,7 @@ void HotkeyManager::ensureModifiers() int symIndex = 0; do { - sym = XKeycodeToKeysym(appDpy, map->modifiermap[mapIndex], symIndex); + sym = XkbKeycodeToKeysym(appDpy, map->modifiermap[mapIndex], symIndex, 0); symIndex++; } while ( !sym && symIndex < keysyms_per_keycode); @@ -308,5 +309,5 @@ QList<long> HotkeyManager::ignModifiersList() quint32 HotkeyManager::keycodeToKeysym(quint32 keycode) { - return XKeycodeToKeysym(QX11Info::display(), keycode, 0); + return XkbKeycodeToKeysym(QX11Info::display(), keycode, 0, 0); } diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp index 19646316f..454febdde 100644 --- a/src/plugins/Input/flac/decoder_flac.cpp +++ b/src/plugins/Input/flac/decoder_flac.cpp @@ -91,9 +91,6 @@ static int flac_decode (void *void_data, char *buf, int buf_len) { DecoderFLAC *dflac = (DecoderFLAC *) void_data; unsigned to_copy; - int bytes_per_sample; - - bytes_per_sample = dflac->data()->bits_per_sample / 8; if (!dflac->data()->sample_buffer_fill) { diff --git a/src/plugins/Ui/skinned/dock.cpp b/src/plugins/Ui/skinned/dock.cpp index 020106d79..46dcdd233 100644 --- a/src/plugins/Ui/skinned/dock.cpp +++ b/src/plugins/Ui/skinned/dock.cpp @@ -135,7 +135,7 @@ void Dock::addWidget (QWidget *widget) void Dock::move (QWidget* mv, QPoint npos) { - QRect desktopRect = QApplication::desktop()->availableGeometry(m_mainWidget); + //QRect desktopRect = QApplication::desktop()->availableGeometry(m_mainWidget); /*if(npos.y() < desktopRect.y()) npos.setY(desktopRect.y());*/ diff --git a/src/plugins/Ui/skinned/eqgraph.cpp b/src/plugins/Ui/skinned/eqgraph.cpp index 4753d89ae..72b9d7bb4 100644 --- a/src/plugins/Ui/skinned/eqgraph.cpp +++ b/src/plugins/Ui/skinned/eqgraph.cpp @@ -116,7 +116,7 @@ void EQGraph::draw() return; } - int i, y, ymin, ymax, py = 0; + int i, y; double x[] = { 0, 11, 23, 35, 47, 59, 71, 83, 97, 109 }, yf[10]; double *bands = new double[10]; @@ -133,19 +133,6 @@ void EQGraph::draw() y = 0; if (y > 18) y = 18; - if (!i) - py = y; - if (y < py) - { - ymin = y; - ymax = py; - } - else - { - ymin = py; - ymax = y; - } - py = y; QPainter paint (&pixmap); paint.drawPixmap (i*m_ratio, y*m_ratio, m_skin->getEqSpline (y)); diff --git a/src/plugins/Ui/skinned/pixmapwidget.h b/src/plugins/Ui/skinned/pixmapwidget.h index e2a2f810b..8272fbc9a 100644 --- a/src/plugins/Ui/skinned/pixmapwidget.h +++ b/src/plugins/Ui/skinned/pixmapwidget.h @@ -23,7 +23,7 @@ #include <QWidget> /** - @author Ilya Kotov <forkotov02@hotmail.ru> + @author Ilya Kotov <forkotov02@hotmail.ru> */ class QPixmap; @@ -33,14 +33,14 @@ Q_OBJECT public: PixmapWidget(QWidget *parent = 0); - ~PixmapWidget(); + virtual ~PixmapWidget(); virtual void setPixmap(const QPixmap); protected: void paintEvent ( QPaintEvent * event ); -private: +private: QPixmap m_pixmap; |
