mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
clean code: remove outdated code
xorg xrecord detection logic
This commit is contained in:
parent
b47004aba0
commit
41f2ca9864
|
@ -1,34 +0,0 @@
|
|||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||
|
||||
#include "broken_xrecord.hh"
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#ifdef HAVE_X11
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/record.h>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
|
||||
#include <QtGui/private/qtx11extras_p.h>
|
||||
#else
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool isRECORDBroken()
|
||||
{
|
||||
#ifdef HAVE_X11
|
||||
|
||||
char const * vendor = ServerVendor( QX11Info::display() );
|
||||
|
||||
if ( vendor && strstr( vendor, "X.Org" ) )
|
||||
{
|
||||
int release = VendorRelease( QX11Info::display() );
|
||||
|
||||
return release >= 10600000 && release < 10701000;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
||||
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
||||
|
||||
#ifndef __BROKEN_XRECORD_HH_INCLUDED__
|
||||
#define __BROKEN_XRECORD_HH_INCLUDED__
|
||||
|
||||
/// Returns true if the RECORD extension is likely to be broken. Under Windows
|
||||
/// it always returns false.
|
||||
/// This function is to be removed once the RECORD extension is working again
|
||||
/// on all the major distributions.
|
||||
bool isRECORDBroken();
|
||||
|
||||
#endif
|
|
@ -295,7 +295,6 @@ HEADERS += folding.hh \
|
|||
orderandprops.hh \
|
||||
language.hh \
|
||||
dictionarybar.hh \
|
||||
broken_xrecord.hh \
|
||||
history.hh \
|
||||
atomic_rename.hh \
|
||||
articlewebview.hh \
|
||||
|
@ -429,7 +428,6 @@ SOURCES += folding.cc \
|
|||
orderandprops.cc \
|
||||
language.cc \
|
||||
dictionarybar.cc \
|
||||
broken_xrecord.cc \
|
||||
history.cc \
|
||||
atomic_rename.cc \
|
||||
articlewebview.cc \
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "language.hh"
|
||||
#include "langcoder.hh"
|
||||
#include <QMessageBox>
|
||||
#include "broken_xrecord.hh"
|
||||
#include "mainwindow.hh"
|
||||
#include <QWebEngineSettings>
|
||||
#include <QWebEngineProfile>
|
||||
|
@ -297,9 +296,6 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
|
|||
|
||||
ui.audioPlaybackProgram->setText( p.audioPlaybackProgram );
|
||||
|
||||
if ( !isRECORDBroken() )
|
||||
ui.brokenXRECORD->hide();
|
||||
|
||||
// Proxy server
|
||||
|
||||
ui.useProxyServer->setChecked( p.proxyServer.enabled );
|
||||
|
|
|
@ -844,26 +844,6 @@ seconds, which is specified here.</string>
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="brokenXRECORD">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">Note: You appear to be running an X.Org XServer release which has the RECORD extension broken. Hotkeys in GoldenDict will probably not work. This must be fixed in the server itself. Please refer to the following </span><a href="https://bugs.freedesktop.org/show_bug.cgi?id=20500"><span style=" text-decoration: underline; color:#0000ff;">bug entry</span></a><span style=" color:#ff0000;"> and leave a comment there if you like.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_12">
|
||||
<property name="orientation">
|
||||
|
|
Loading…
Reference in a new issue