From ba5b1392a8d611093ec9e91235f76340016c7ddb Mon Sep 17 00:00:00 2001 From: tariq Date: Sun, 7 May 2006 16:28:58 +0000 Subject: [PATCH] (0.2.1 RC) git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@83 b624d157-de02-0410-bad0-e51aec6abb33 --- changelog | 3 +- src/PwManager.cpp | 6 +- src/PwManager.h | 2 +- src/PwmConfig.cpp | 2 + src/PwmConfig.h | 3 +- src/dialogs/SelectIconDlg.cpp | 1 + src/forms/AboutDlg.ui | 2 +- src/forms/MainWindow.ui | 9 +++ src/lib/AutoType.h | 8 +-- src/lib/AutoType_X11.cpp | 13 ++++- src/lib/GroupView.h | 4 +- src/mainwindow.cpp | 45 ++++++++++++++- src/mainwindow.h | 4 ++ src/translations/keepass-de_DE.ts | 92 ++++++++++++++++--------------- src/translations/keepass-fr_FR.ts | 78 +++++++++++++------------- 15 files changed, 174 insertions(+), 98 deletions(-) diff --git a/changelog b/changelog index 9121c1b..75cbe2a 100644 --- a/changelog +++ b/changelog @@ -1,7 +1,7 @@ --------------- 0.2.1 --------------- --added AutoType feature +-added AutoType feature (experimental!) -added custom icons feature -new command line option for manual language selection (-lang ) -when saving an attachment the original filename is adopted by the file dialog @@ -9,6 +9,7 @@ -sorting by dates now works as expected -the 'Expires' column and the detailed entry view now also show the string 'never' for entries which don't expire -entry view now gets updated after changing the column setup +-added menu entry to change the size of the toolbar icons --------------- 0.2.0 --------------- diff --git a/src/PwManager.cpp b/src/PwManager.cpp index fb1301d..03d2b4e 100755 --- a/src/PwManager.cpp +++ b/src/PwManager.cpp @@ -357,7 +357,7 @@ return CustomIcons[i-BUILTIN_ICONS]; void PwDatabase::addIcon(const QPixmap& icon){ CustomIcons << icon; -emit modified(); +emit iconsModified(); } void PwDatabase::removeIcon(int id){ @@ -377,13 +377,13 @@ for(int i=0;iid+BUILTIN_ICONS) Groups[i].ImageID--; } -emit modified(); +emit iconsModified(); } void PwDatabase::replaceIcon(int id,const QPixmap& icon){ if(id UnkownMetaStreams; signals: -void modified(); +void iconsModified(); }; diff --git a/src/PwmConfig.cpp b/src/PwmConfig.cpp index 9eb612f..74abab8 100755 --- a/src/PwmConfig.cpp +++ b/src/PwmConfig.cpp @@ -70,6 +70,7 @@ RememberLastKey=ini.GetValueB("Options","RememberLastKey",true); LastKeyLocation=ini.GetValue("Options","LastKeyLocation","").c_str(); LastKeyType=(tKeyType)ini.GetValueI("Options","LastKeyType",(int)PASSWORD); if(!OpenLast)RememberLastKey=false; +ToolbarIconSize=ini.GetValueI("UI","ToolbarIconSize",16); return true; } @@ -110,6 +111,7 @@ if(RememberLastKey){ else{ ini.SetValue("Options","LastKeyLocation",""); ini.SetValueI("Options","LastKeyType",0);} +ini.SetValueI("UI","ToolbarIconSize",ToolbarIconSize,true); if(!ini.WriteFile())return false; else return true; } diff --git a/src/PwmConfig.h b/src/PwmConfig.h index 289d517..025a892 100755 --- a/src/PwmConfig.h +++ b/src/PwmConfig.h @@ -57,7 +57,8 @@ public: QString MountDir; bool RememberLastKey; //location and type, not the key itself tKeyType LastKeyType; - QString LastKeyLocation; + QString LastKeyLocation; + int ToolbarIconSize; bool loadFromIni(QString filename); bool saveToIni(QString filename); diff --git a/src/dialogs/SelectIconDlg.cpp b/src/dialogs/SelectIconDlg.cpp index 079fd71..2f1c71a 100644 --- a/src/dialogs/SelectIconDlg.cpp +++ b/src/dialogs/SelectIconDlg.cpp @@ -107,6 +107,7 @@ if(!icon.load(filename)){ return; } db->replaceIcon(List->currentItem()->data(32).toInt(),icon.scaled(16,16,Qt::KeepAspectRatio,Qt::SmoothTransformation)); +List->currentItem()->setIcon(QIcon(db->icon(List->currentItem()->data(32).toInt()))); } void CSelectIconDlg::OnPickIcon(){ diff --git a/src/forms/AboutDlg.ui b/src/forms/AboutDlg.ui index 0427888..5c0503a 100644 --- a/src/forms/AboutDlg.ui +++ b/src/forms/AboutDlg.ui @@ -29,7 +29,7 @@ 211 - 32767 + 268 diff --git a/src/forms/MainWindow.ui b/src/forms/MainWindow.ui index aa0fafb..3f1888d 100644 --- a/src/forms/MainWindow.ui +++ b/src/forms/MainWindow.ui @@ -503,16 +503,25 @@ + + true + 16x16 + + true + 22x22 + + true + 28x28 diff --git a/src/lib/AutoType.h b/src/lib/AutoType.h index fe7afc9..402d0fa 100644 --- a/src/lib/AutoType.h +++ b/src/lib/AutoType.h @@ -24,14 +24,14 @@ #include #include #include -//#ifdef Q_WS_X11 +#ifdef Q_WS_X11 #define XK_MISCELLANY #define XK_XKB_KEYS #define XK_3270 #include #include #include -//#endif +#endif #include "Database.h" typedef struct tKeysymMap{ @@ -44,7 +44,7 @@ public: static QWidget* MainWin; static void perform(CEntry* entry,QString& errors); private: -//#ifdef Q_WS_X11 +#ifdef Q_WS_X11 static tKeysymMap KeysymMap[]; static quint16 getKeysym(const QChar& unicode); static int getModifiers(Display*,KeySym,int); @@ -52,7 +52,7 @@ private: static void releaseModifiers(Display*,int); static void templateToKeysyms(const QString& Template, QList& KeySymList,CEntry* entry); static void stringToKeysyms(const QString& string,QList& KeySymList); -//#endif +#endif diff --git a/src/lib/AutoType_X11.cpp b/src/lib/AutoType_X11.cpp index 557d80f..ccfb8df 100644 --- a/src/lib/AutoType_X11.cpp +++ b/src/lib/AutoType_X11.cpp @@ -22,9 +22,12 @@ #include #include - QWidget* AutoType::MainWin=NULL; + +#ifdef Q_WS_X11 + + int AutoType::getModifiers(Display *d,KeySym keysym, int keycode){ int SymsPerKey; KeySym* Syms=XGetKeyboardMapping(d,keycode,1,&SymsPerKey); @@ -1149,3 +1152,11 @@ for(int i=0; isetIconSize(QSize(16,16)); + toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); toolBar->addAction(FileNewAction); toolBar->addAction(FileOpenAction); toolBar->addAction(FileSaveAction); @@ -237,6 +240,12 @@ void KeepassMainWindow::setupMenus(){ ViewColumnsAttachmentAction->setChecked(config.Columns[9]); ViewShowStatusbarAction->setChecked(config.ShowStatusbar); + switch(config.ToolbarIconSize){ + case 16: ViewToolButtonSize16Action->setChecked(true); break; + case 22: ViewToolButtonSize22Action->setChecked(true); break; + case 28: ViewToolButtonSize28Action->setChecked(true); break; + } + FileNewAction->setShortcut(tr("Ctrl+N")); FileOpenAction->setShortcut(tr("Ctrl+O")); FileSaveAction->setShortcut(tr("Ctrl+S")); @@ -257,6 +266,12 @@ void KeepassMainWindow::setupMenus(){ #endif } +void KeepassMainWindow::setupDatabaseConnections(Database* DB){ +connect(DB,SIGNAL(iconsModified()),this,SLOT(OnFileModified())); +connect(DB,SIGNAL(iconsModified()),EntryView,SLOT(updateItems())); +connect(DB,SIGNAL(iconsModified()),GroupView,SLOT(updateItems())); +} + void KeepassMainWindow::openDatabase(QString filename,bool IsAuto){ Q_ASSERT(!FileOpen); @@ -272,7 +287,7 @@ Q_ASSERT(r==1); db = new PwDatabase(); GroupView->db=db; EntryView->db=db; -connect(db,SIGNAL(modified()),this,SLOT(OnFileModified())); +setupDatabaseConnections(db); if(PasswordDlg.password!="" && PasswordDlg.keyfile=="") db->CalcMasterKeyByPassword(PasswordDlg.password); if(PasswordDlg.password=="" && PasswordDlg.keyfile!="") @@ -357,6 +372,7 @@ if(dlg.exec()==1){ setStateFileOpen(true); setStateFileModified(true); FileOpen=true; + setupDatabaseConnections(db); } else delete db; } @@ -402,6 +418,7 @@ if(!IsOpen){ EditCloneEntryAction->setEnabled(false); EditDeleteEntryAction->setEnabled(false); EditGroupSearchAction->setEnabled(false); + EditAutoTypeAction->setEnabled(false); } else{ OnGroupSelectionChanged(); @@ -1021,3 +1038,27 @@ Q_ASSERT(EntryView->selectedItems().size()==1); QString error; AutoType::perform(((EntryViewItem*)(EntryView->selectedItems()[0]))->pEntry,error); } + +void KeepassMainWindow::OnViewToolbarIconSize16(bool state){ +if(!state)return; +ViewToolButtonSize22Action->setChecked(false); +ViewToolButtonSize28Action->setChecked(false); +config.ToolbarIconSize=16; +toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); +} + +void KeepassMainWindow::OnViewToolbarIconSize22(bool state){ +if(!state)return; +ViewToolButtonSize16Action->setChecked(false); +ViewToolButtonSize28Action->setChecked(false); +config.ToolbarIconSize=22; +toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); +} + +void KeepassMainWindow::OnViewToolbarIconSize28(bool state){ +if(!state)return; +ViewToolButtonSize16Action->setChecked(false); +ViewToolButtonSize22Action->setChecked(false); +config.ToolbarIconSize=28; +toolBar->setIconSize(QSize(config.ToolbarIconSize,config.ToolbarIconSize)); +} \ No newline at end of file diff --git a/src/mainwindow.h b/src/mainwindow.h index bdfb8c8..ee37a9b 100755 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -83,6 +83,9 @@ private slots: void OnEditAutoType(); void OnViewShowToolbar(bool); void OnViewShowEntryDetails(bool); + void OnViewToolbarIconSize16(bool); + void OnViewToolbarIconSize22(bool); + void OnViewToolbarIconSize28(bool); void OnCurrentGroupChanged(QTreeWidgetItem*,QTreeWidgetItem*); void OnEntryItemDoubleClicked(QTreeWidgetItem* item,int column); void OnEntrySelectionChanged(); @@ -116,6 +119,7 @@ private: void setStateGroupSelected(SelectionState s); void setStateEntrySelected(SelectionState s); void openDatabase(QString filename,bool IsStart=false); + void setupDatabaseConnections(Database* DB); bool closeDatabase(); void search(CGroup* pGroup); void editEntry(CEntry* pEntry); diff --git a/src/translations/keepass-de_DE.ts b/src/translations/keepass-de_DE.ts index 92655df..41dcc31 100644 --- a/src/translations/keepass-de_DE.ts +++ b/src/translations/keepass-de_DE.ts @@ -46,7 +46,7 @@ General Public License (GPL) Version 2. Credits - + @@ -54,16 +54,18 @@ General Public License (GPL) Version 2. More than one 'Auto-Type:' key sequence found. Allowed is only one per entry. - + Es wurde mehr als eine 'Auto-Type:'-Zeichenkette gefunden. +Erlaubt ist nur eine pro Eintrag. Syntax Error in Auto-Type sequence near character %1 Found '{' without closing '}' - + Syntaxfehler in Auto-Type-Zeichenkette bei Zeichen %1 +Öffnende Klammer '{' ohne Gegenstück gefunden. Error - Fehler + Fehler @@ -136,52 +138,53 @@ http://keepass.berlios.de/translation-howto.html Eugen Gorschenin - + $TRANSLATION_AUTHOR - + Tarek Saidi Information on how to translate KeePassX can be found under: http://keepass.berlios.de/ - + Informationen über das Erstellen eine Übersetztung für KeePassX sind hier zu finden: +http://keepass.berlios.de Team - + Team Tarek Saidi - + Developer, Project Admin - + Entwickler und Projektadministrator tariq@users.berlios.de - + Web Designer - + geugen@users.berlios.de - + Thanks To - Dank An + Dank An Patches for better MacOS X support - + Patches für bessere MacOS X Unterstützung www.outofhanwell.com - + @@ -220,7 +223,7 @@ http://keepass.berlios.de/ Settings - Einstellungen + Einstellungen @@ -301,11 +304,11 @@ Sind Sie sicher? %1 Bit - + Add Attachment... - + Anhang hinzufügen... @@ -332,11 +335,11 @@ Sind Sie sicher? Password Generator - Passwortgenerator + Passwortgenerator %1 Bit - + @@ -477,37 +480,38 @@ Bitter prüfen Sie Ihre Zugriffsrechte. CSelectIconDlg Delete - + Löschen Add Icons... - + Symbol hinzufügen... Images (%1) - + Symbole (%1) %1: File could not be loaded. - + %1: Datei konnte nicht geladen werden. Error - Fehler + Fehler Replace... - + Ersetzen... An error occured while loading the icon(s): %1 - + Beim Laden der Symbole traten Fehler auf: +%1 An error occured while loading the icon. - + Beim Laden des Symbols ist ein Fehler aufgetreten. @@ -609,11 +613,11 @@ Bitter prüfen Sie Ihre Zugriffsrechte. > - + %1 Bit - + @@ -648,7 +652,7 @@ Bitter prüfen Sie Ihre Zugriffsrechte. > - + @@ -1000,7 +1004,7 @@ die Änderungen speichern? Ctrl+V - + @@ -1215,27 +1219,27 @@ die Änderungen speichern? Perform AutoType - + AutoType ausführen Type Here - + Type Here Toolbar Icon Size - + Symbolleistengröße 16x16 - + 22x22 - + 28x28 - + @@ -1459,7 +1463,7 @@ Stellen Sie sicher, dass Sie Schreibzugriff auf '~/.keepass' haben. Never - Nie + Nie @@ -1561,19 +1565,19 @@ Stellen Sie sicher, dass Sie Schreibzugriff auf '~/.keepass' haben.SelectIconDlg Icon Selection - + Symbolauswahl Add Custom Icon... - + Eigenes Symbol hinzufügen... Pick - + Wählen Cancel - Abbrechen + Abbrechen diff --git a/src/translations/keepass-fr_FR.ts b/src/translations/keepass-fr_FR.ts index 2def2e0..72d8404 100644 --- a/src/translations/keepass-fr_FR.ts +++ b/src/translations/keepass-fr_FR.ts @@ -26,14 +26,14 @@ <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">KeePassX</span> - Cross Platform Password Manager</p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:200; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt; font-weight:600;">KeePassX</span><B> - Gestionnaire de Mots de Passe Multiplateforme </B> </p></body></html> + Copyright (C) 2005 - 2006 Tarek Saidi KeePassX is distributed under the terms of the General Public License (GPL) version 2. - <B>Copyright © 2005 - 2006 Tarek Saidi <B><br> -<B>KeePassX est distribué sous les termes de la licence GNU GPL v2.<B> + <span style=" font-size:9pt; font-weight:400;">Copyright (c) 2005 - 2006 Tarek Saidi <br> +KeePassX est distribué sous les termes de la<br> Licence Publique Générale GNU v2 (GPL v2).</span> tarek.saidi@arcor.de @@ -45,7 +45,7 @@ General Public License (GPL) version 2. Credits - + Crédits @@ -59,11 +59,12 @@ Seulement une par entrée est autorisée. Syntax Error in Auto-Type sequence near character %1 Found '{' without closing '}' - + Erreur de syntaxe à l'intérieur de la séquence d'auto-saisie près du caractère %1 + Trouvé '{' sans accolade fermante '}' Error - Erreur + Erreur @@ -118,7 +119,7 @@ Seulement une par entrée est autorisée. $TRANSLATION_AUTHOR_EMAIL Here you can enter your email or homepage if you want. - <b> Adresse électronique: </b> <br>djellel@free.fr + <b> Courriel: </b> <br>djellel@free.fr @@ -129,8 +130,7 @@ http://keepass.berlios.de/translation-howto.html Matthias Miller - <B> Matthias Miller</B><br> -Pour l'aide apportée dans le portage de KeePass vers Mac OS X. + Matthias Miller http://www.outofhanwell.com/<br>Mac OS X Support @@ -138,8 +138,7 @@ Pour l'aide apportée dans le portage de KeePass vers Mac OS X. Eugen Gorschenin - <B>Eugen Gorschenin</B><br> -Pour le nouveau site Internet. + Eugen Gorschenin @@ -148,48 +147,49 @@ Pour le nouveau site Internet. $TRANSLATION_AUTHOR - + <br>Djellel DIDA Information on how to translate KeePassX can be found under: http://keepass.berlios.de/ - + Toutes les informations concernant la méthode pour traduire KeePassX peuvent être obtenues à l'adresse suivante:<br> +<ADDRESS>http://keepass.berlios.de/<ADDRESS> Team - + Equipe Tarek Saidi - + Tarek Saidi Developer, Project Admin - + Développeur et Administrateur du Projet tariq@users.berlios.de - + tariq@users.berlios.de Web Designer - + Concepteur du site Internet geugen@users.berlios.de - + geugen@users.berlios.de Thanks To - Remerciement à + Remerciement à Patches for better MacOS X support - + Pour les rustines ayant permis un meilleur support de MacOS X www.outofhanwell.com - + <ADDRESS>www.outofhanwell.com<ADDRESS> @@ -249,7 +249,7 @@ S'il vous plait, vérifier votre saisie. Save Attachment... - Enregistrer l'attachement... + Enregistrer la pièce jointe... Overwrite? @@ -287,12 +287,12 @@ Voulez-vous le remplacer ? Delete Attachment? - Supprimer l'attachement ? + Supprimer la pièce jointe ? You are about to delete the attachment of this entry. Are you sure? - Vous êtes sur le point de supprimer l'attachement de cette entrée. + Vous êtes sur le point de supprimer la pièce jointe de cette entrée. En êtes-vous sûr ? @@ -313,7 +313,7 @@ En êtes-vous sûr ? Add Attachment... - + Ajouter une pièce jointe... @@ -509,16 +509,16 @@ S'il vous plait, vérifier vos permissions. Replace... - + Remplacez... An error occured while loading the icon(s): %1 - + Une erreur est survenue lors du chargement (des) de l'icône(s): %1 An error occured while loading the icon. - + Une erreur est survenue lors du chargement de l'icône. @@ -616,7 +616,7 @@ S'il vous plait, vérifier vos permissions. Attachment: - Attachement: + Pièce jointe: > @@ -813,7 +813,7 @@ S'il vous plait, vérifier vos permissions. Attachment - Attachement + Pièce jointe %1 items @@ -1110,7 +1110,7 @@ Désirez-vous enregistrer le changement ? Save Attachment As... - Enregistrer l'attachement sous... + Enregistrer la pièce jointe sous... Add New Entry... @@ -1190,7 +1190,7 @@ Désirez-vous enregistrer le changement ? Attachment - Attachement + Pièce jointe Settings... @@ -1230,23 +1230,23 @@ Désirez-vous enregistrer le changement ? Type Here - + Saisir ici Toolbar Icon Size - + Taille des icônes de la barre d'outils 16x16 - + 22x22 - + 28x28 - + @@ -1470,7 +1470,7 @@ Make sure you have write access to '~/.keepass'. Never - Jamais + Jamais