aboutsummaryrefslogtreecommitdiff
path: root/x11/kdebase3
diff options
context:
space:
mode:
authorMichael Nottebrock <lofi@FreeBSD.org>2004-08-12 21:16:20 +0000
committerMichael Nottebrock <lofi@FreeBSD.org>2004-08-12 21:16:20 +0000
commitc59d8458d7757601e14de2d40ddbb2390a8e2aa4 (patch)
treec4d6ad78a27109e062933ecb22ef0c0fb9c68a58 /x11/kdebase3
parent9da119a4e74d459e7cedfeb916add2ebe3227f2a (diff)
downloadports-c59d8458d7757601e14de2d40ddbb2390a8e2aa4.tar.gz
ports-c59d8458d7757601e14de2d40ddbb2390a8e2aa4.zip
A couple of patches didn't make it from the kde-freebsd repo into ports.
Here they are... PORTREVISION needs to be bumped again (sorry). Pointy hat to: me
Notes
Notes: svn path=/head/; revision=116073
Diffstat (limited to 'x11/kdebase3')
-rw-r--r--x11/kdebase3/Makefile2
-rw-r--r--x11/kdebase3/files/patch-kxkb_kcmlayout.cpp83
-rw-r--r--x11/kdebase3/files/patch-kxkb_kcmlayout.h25
-rw-r--r--x11/kdebase3/files/patch-kxkb_kxkb.cpp23
-rw-r--r--x11/kdebase3/files/patch-kxkb_rules.cpp85
-rw-r--r--x11/kdebase3/files/patch-kxkb_rules.h33
6 files changed, 250 insertions, 1 deletions
diff --git a/x11/kdebase3/Makefile b/x11/kdebase3/Makefile
index 7fa93289891c..21e13d7867b8 100644
--- a/x11/kdebase3/Makefile
+++ b/x11/kdebase3/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION}/src
diff --git a/x11/kdebase3/files/patch-kxkb_kcmlayout.cpp b/x11/kdebase3/files/patch-kxkb_kcmlayout.cpp
new file mode 100644
index 000000000000..750137b49743
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_kcmlayout.cpp
@@ -0,0 +1,83 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.cpp,v
+retrieving revision 1.82.2.1
+retrieving revision 1.86
+diff -u -p -r1.82.2.1 -r1.86
+--- kxkb/kcmlayout.cpp 2004/05/19 12:09:58 1.82.2.1
++++ kxkb/kcmlayout.cpp 2004/06/28 14:19:03 1.86
+@@ -79,7 +79,8 @@ OptionListItem * OptionListItem::findChi
+ }
+
+ LayoutConfig::LayoutConfig(QWidget *parent, const char *name)
+- : KCModule(parent, name), m_rules(0)
++ : KCModule(parent, name),
++ m_rules(NULL)
+ {
+ QVBoxLayout *main = new QVBoxLayout(this, 0, KDialog::spacingHint());
+
+@@ -122,7 +124,7 @@ LayoutConfig::LayoutConfig(QWidget *pare
+ #endif
+
+ //Read rules - we _must_ read _before_ creating xkb-options comboboxes
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ makeOptionsTab();
+
+@@ -292,6 +294,8 @@ QWidget* LayoutConfig::makeOptionsTab()
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(changed()));
+ connect(listView, SIGNAL(clicked(QListViewItem *)), SLOT(updateOptionsCommand()));
+
++ connect(widget->chkEnableOptions, SIGNAL(toggled(bool)), SLOT(changed()));
++
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(changed()));
+ connect(widget->checkResetOld, SIGNAL(toggled(bool)), SLOT(updateOptionsCommand()));
+
+@@ -405,10 +409,10 @@ void LayoutConfig::load()
+ bool use = config->readBoolEntry( "Use", false );
+
+ // find out which rule applies
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
++ //QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+
+ // update other files
+- ruleChanged(rule);
++ ruleChanged();
+
+ // find out about the model
+ QString model = config->readEntry("Model", "pc104");
+@@ -499,12 +506,12 @@ void LayoutConfig::load()
+ emit KCModule::changed( false );
+ }
+
+-void LayoutConfig::ruleChanged(const QString &rule)
++void LayoutConfig::ruleChanged()
+ {
+- if( rule == m_rule )
+- return;
++// if( rule == m_rule )
++// return;
+
+- m_rule = rule;
++// m_rule = rule;
+
+ QString model; //, layout;
+ if (m_rules)
+@@ -514,7 +521,7 @@ void LayoutConfig::ruleChanged(const QSt
+ }
+
+ delete m_rules;
+- m_rules = new KeyRules(rule);
++ m_rules = new KeyRules();
+
+ QStringList tmp;
+ widget->comboModel->clear();
+@@ -672,7 +680,7 @@ void LayoutConfig::save()
+ void LayoutConfig::defaults()
+ {
+ widget->chkEnable->setChecked(false);
+- ruleChanged("xfree86");
++ ruleChanged();
+
+ widget->comboModel->setCurrentText("pc104");
+ //layoutCombo->setCurrentText("us");
diff --git a/x11/kdebase3/files/patch-kxkb_kcmlayout.h b/x11/kdebase3/files/patch-kxkb_kcmlayout.h
new file mode 100644
index 000000000000..e2630a0a4398
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_kcmlayout.h
@@ -0,0 +1,25 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kcmlayout.h,v
+retrieving revision 1.22
+retrieving revision 1.23
+diff -u -p -r1.22 -r1.23
+--- kxkb/kcmlayout.h 2003/10/29 07:30:36 1.22
++++ kxkb/kcmlayout.h 2004/06/28 14:19:03 1.23
+@@ -54,7 +54,7 @@ protected slots:
+ void variantChanged();
+ void latinChanged();
+ void layoutSelChanged(QListViewItem *);
+- void ruleChanged(const QString &rule);
++ void ruleChanged();
+ void updateLayoutCommand();
+ void updateOptionsCommand();
+ void add();
+@@ -71,7 +71,7 @@ private:
+ QDict<OptionListItem> m_optionGroups;
+ QDict<char> m_variants;
+ QDict<char> m_includes;
+- QString m_rule;
++// QString m_rule;
+ KeyRules *m_rules;
+
+ QWidget* makeOptionsTab();
diff --git a/x11/kdebase3/files/patch-kxkb_kxkb.cpp b/x11/kdebase3/files/patch-kxkb_kxkb.cpp
new file mode 100644
index 000000000000..bc011c166585
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_kxkb.cpp
@@ -0,0 +1,23 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/kxkb.cpp,v
+retrieving revision 1.70
+retrieving revision 1.72
+diff -u -p -r1.70 -r1.72
+--- kxkb/kxkb.cpp 2003/10/30 18:58:11 1.70
++++ kxkb/kxkb.cpp 2004/06/28 14:19:03 1.72
+@@ -222,12 +222,12 @@ bool KXKBApp::settingsRead()
+ }
+ }
+
+- QString rule = "xfree86"; //config->readEntry("Rule", "xfree86");
+- m_rules = new KeyRules( rule );
++ m_rules = new KeyRules();
+ m_model = config->readEntry("Model", "pc104");
+ m_layout = config->readEntry("Layout", "");
+ m_defaultLayout = m_layout;
+
++
+ m_list = config->readListEntry("Additional");
+ if (!m_list.contains(m_layout))
+ {
+
diff --git a/x11/kdebase3/files/patch-kxkb_rules.cpp b/x11/kdebase3/files/patch-kxkb_rules.cpp
new file mode 100644
index 000000000000..c76490862b0f
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_rules.cpp
@@ -0,0 +1,85 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.cpp,v
+retrieving revision 1.37
+retrieving revision 1.38
+diff -u -p -r1.37 -r1.38
+--- kxkb/rules.cpp 2003/10/24 06:15:26 1.37
++++ kxkb/rules.cpp 2004/06/28 14:19:03 1.38
+@@ -16,11 +16,23 @@
+
+ #include "rules.h"
+
+-const QString X11_DIR( "/usr/X11R6/lib/X11/" );
++const char* X11DirList[2] = {"/usr/X11R6/lib/X11/", "/usr/local/X11R6/lib/X11/"};
++const char* rulesFileList[2] = {"xkb/rules/xfree86", "xkb/rules/xorg"};
+
+-KeyRules::KeyRules(QString rule):
++KeyRules::KeyRules():
+ m_layouts(90)
+ {
++ for(int ii=0; ii<2; ii++)
++ if( QDir(X11DirList[ii]).exists() ) {
++ X11_DIR = X11DirList[ii];
++ break;
++ }
++
++ if( X11_DIR.isEmpty() ) {
++ kdDebug() << "Cannot find X11 directory!" << endl;
++ return;
++ }
++
+ // ugly check for XFree 4.3 or older
+ if( QDir(X11_DIR + "xkb/symbols/pc").exists() ) {
+ m_xfree43 = true;
+@@ -29,8 +41,20 @@ KeyRules::KeyRules(QString rule):
+ m_xfree43 = false;
+ }
+
+- loadRules(X11_DIR + QString("xkb/rules/%1").arg(rule));
+- loadOldLayouts(X11_DIR + QString("xkb/rules/xfree86"));
++ QString rulesFile;
++ for(int ii=0; ii<2; ii++)
++ if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
++ rulesFile = X11_DIR + rulesFileList[ii];
++ break;
++ }
++
++ if( rulesFile.isEmpty() ) {
++ kdDebug() << "Cannot find rules file in " << X11_DIR << endl;
++ return;
++ }
++
++ loadRules(rulesFile);
++ loadOldLayouts(rulesFile);
+ loadGroups(::locate("config", "kxkb_groups"));
+ }
+
+@@ -51,9 +75,7 @@ static struct {
+ { 0, 0 }
+ };
+
+- XkbRF_RulesPtr rules;
+-
+- rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
++ XkbRF_RulesPtr rules = XkbRF_Load(QFile::encodeName(file).data(), "", true, true);
+
+ if (rules == NULL) {
+ kdDebug() << "Unable to load rules" << endl;
+@@ -176,7 +198,7 @@ unsigned int KeyRules::getGroup(const QS
+ return it == m_initialGroups.end() ? 0 : it.data();
+ }
+
+-
++/*
+ QStringList KeyRules::rules(QString path)
+ {
+ QStringList result;
+@@ -193,7 +215,7 @@ QStringList KeyRules::rules(QString path
+
+ return result;
+ }
+-
++*/
+
+ /* pretty simple algorithm - reads the layout file and
+ tries to find "xkb_symbols"
diff --git a/x11/kdebase3/files/patch-kxkb_rules.h b/x11/kdebase3/files/patch-kxkb_rules.h
new file mode 100644
index 000000000000..23d2432f51e6
--- /dev/null
+++ b/x11/kdebase3/files/patch-kxkb_rules.h
@@ -0,0 +1,33 @@
+===================================================================
+RCS file: /usr/repos/kde/kdebase/kxkb/rules.h,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -p -r1.11 -r1.12
+--- kxkb/rules.h 2003/08/24 04:02:38 1.11
++++ kxkb/rules.h 2004/06/28 14:19:03 1.12
+@@ -10,14 +10,14 @@ class KeyRules
+ {
+ public:
+
+- KeyRules(QString rule="xfree86");
++ KeyRules();
+
+ const QDict<char> &models() const { return m_models; };
+ const QDict<char> &layouts() const { return m_layouts; };
+ const QDict<char> &options() const { return m_options; };
+
+ void parseVariants(const QStringList& vars, QDict<char>& variants, bool chkVars=true);
+- static QStringList rules(QString path = QString::null);
++// static QStringList rules(QString path = QString::null);
+
+ QStringList getVariants(const QString& layout);
+ unsigned int getGroup(const QString& layout, const char* baseGr);
+@@ -42,6 +42,8 @@ private:
+ QStringList m_oldLayouts;
+ QStringList m_nonLatinLayouts;
+ bool m_xfree43;
++
++ QString X11_DIR; // pseudo-constant
+ };
+
+