[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kde-workspace/amourphiouskb] kcontrol/keyboard: layout with default xkb symbol !=basic shown added
From: shivam makkar <amourphious1992 () gmail ! com>
Date: 2012-07-31 19:43:33
Message-ID: 20120731194333.BCBB8A6094 () git ! kde ! org
[Download RAW message or body]
Git commit 6405d2df8a920b1e03c05248bff986bfb6c0aff6 by shivam makkar.
Committed on 31/07/2012 at 21:42.
Pushed by makkar into branch 'amourphiouskb'.
layout with default xkb symbol !=basic shown added function getvariant
M +46 -4 kcontrol/keyboard/kcm_add_layout_dialog.cpp
M +2 -1 kcontrol/keyboard/kcm_add_layout_dialog.h
http://commits.kde.org/kde-workspace/6405d2df8a920b1e03c05248bff986bfb6c0aff6
diff --git a/kcontrol/keyboard/kcm_add_layout_dialog.cpp b/kcontrol/keyboard/kcm_add_layout_dialog.cpp
index aa529c5..d595a45 100644
--- a/kcontrol/keyboard/kcm_add_layout_dialog.cpp
+++ b/kcontrol/keyboard/kcm_add_layout_dialog.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Andriy Rysin (rysin@kde.org)
- * edited by Shivam Makkar (amourphious1992@gmail.com)
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -152,12 +152,54 @@ void AddLayoutDialog::accept()
selectedLayoutUnit.setShortcut(layoutDialogUi->kkeysequencewidget->keySequence());
QDialog::accept();
}
+
+QString AddLayoutDialog::getvariant(QString variant){
+ if (variant==""){
+ variant="basic";
+ if(selectedLayout=="ma")
+ variant="arabic";
+ if(selectedLayout=="az")
+ variant="latin";
+ if(selectedLayout=="bg")
+ variant="bds";
+ if(selectedLayout=="fi")
+ variant="kotoistus";
+ if(selectedLayout=="ca")
+ variant="fr";
+ if(selectedLayout=="in")
+ variant="deva";
+ if(selectedLayout=="jp")
+ variant="106";
+ if(selectedLayout=="ir")
+ variant="pes";
+ if(selectedLayout=="kr")
+ variant="kr106";
+ if(selectedLayout=="ru")
+ variant="winkeys";
+ if(selectedLayout=="lk")
+ variant="sin_phonetic";
+ if(selectedLayout=="ke")
+ variant="swa";
+ if(selectedLayout=="tz")
+ variant="swa";
+ if(selectedLayout=="tw")
+ variant="tw";
+ if(selectedLayout=="bw")
+ variant="tswana";
+ if(selectedLayout=="ua")
+ variant="unicode";
+ if(selectedLayout=="pk")
+ variant="urd-phonetic";
+ if(selectedLayout=="uz")
+ variant="cyrillic";
+ }
+ return variant;
+}
+
void AddLayoutDialog::preview(){
QString variant=layoutDialogUi->variantComboBox->itemData(layoutDialogUi->variantComboBox->currentIndex()).toString();
QMessageBox q;
- QString a=variant;
- if (variant=="")
- variant="basic";
+ variant=getvariant(variant);
/*a.append(selectedLayout);
q.setText(a);
q.exec();*/
diff --git a/kcontrol/keyboard/kcm_add_layout_dialog.h b/kcontrol/keyboard/kcm_add_layout_dialog.h
index af47b64..bab63be 100644
--- a/kcontrol/keyboard/kcm_add_layout_dialog.h
+++ b/kcontrol/keyboard/kcm_add_layout_dialog.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 Andriy Rysin (rysin@kde.org)
- * Edited by Shivam Makkar (amourphious1992@gmail.com)
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -37,6 +37,7 @@ public:
AddLayoutDialog(const Rules* rules, Flags* flags, bool showLabel, QWidget* parent=NULL);
LayoutUnit getSelectedLayoutUnit() { return selectedLayoutUnit; }
+ QString getvariant(QString variant);
void accept();
public Q_SLOTS:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic