Distinguish between adding groups and subgroups

Fixed visual distortion in PasswordGenDlg
Updated Spanish translation

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@240 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 16 years ago
parent 888d0982d4
commit 06a938ce4a
  1. 2
      share/applications/keepassx.desktop
  2. 3
      src/dialogs/PasswordGenDlg.cpp
  3. 10
      src/forms/MainWindow.ui
  4. 7
      src/lib/GroupView.cpp
  5. 1
      src/lib/GroupView.h
  6. 21
      src/mainwindow.cpp
  7. 1
      src/src.pro
  8. 1053
      src/translations/keepassx-es_ES.ts

@ -2,11 +2,13 @@
Name=KeePassX Name=KeePassX
GenericName=Cross Platform Password Manager GenericName=Cross Platform Password Manager
GenericName[de]=Passwortverwaltung GenericName[de]=Passwortverwaltung
GenericName[es]=Gestor de contraseñas multiplataforma
GenericName[fr]=Gestionnaire de mot de passe GenericName[fr]=Gestionnaire de mot de passe
Exec=keepassx %f Exec=keepassx %f
Icon=keepassx Icon=keepassx
Comment=Cross Platform Password Manager Comment=Cross Platform Password Manager
Comment[de]=Passwortverwaltung Comment[de]=Passwortverwaltung
Comment[es]=Gestor de contraseñas multiplataforma
Comment[fr]=Gestionnaire de mot de passe Comment[fr]=Gestionnaire de mot de passe
Terminal=false Terminal=false
Type=Application Type=Application

@ -114,8 +114,7 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, bool StandAloneMode,Qt::WFlags fl)
Check_EveryGroup->setChecked(config->pwGenEveryGroup()); Check_EveryGroup->setChecked(config->pwGenEveryGroup());
Spin_Num->setValue(config->pwGenLength()); Spin_Num->setValue(config->pwGenLength());
adjustSize(); adjustSize();
setMaximumSize(size()); resize(size() + QSize(10, 20));
setMinimumSize(size());
createBanner(&BannerPixmap,getPixmap("dice"),tr("Password Generator"),width()); createBanner(&BannerPixmap,getPixmap("dice"),tr("Password Generator"),width());
if(!config->showPasswords()) if(!config->showPasswords())

@ -172,6 +172,7 @@
<string>&amp;Edit</string> <string>&amp;Edit</string>
</property> </property>
<addaction name="EditNewGroupAction" /> <addaction name="EditNewGroupAction" />
<addaction name="EditNewSubgroupAction" />
<addaction name="EditEditGroupAction" /> <addaction name="EditEditGroupAction" />
<addaction name="EditDeleteGroupAction" /> <addaction name="EditDeleteGroupAction" />
<addaction name="separator" /> <addaction name="separator" />
@ -290,9 +291,9 @@
<string>&amp;Quit</string> <string>&amp;Quit</string>
</property> </property>
</action> </action>
<action name="EditNewGroupAction" > <action name="EditNewSubgroupAction" >
<property name="text" > <property name="text" >
<string>&amp;Add New Group...</string> <string>&amp;Add New Subgroup...</string>
</property> </property>
</action> </action>
<action name="EditEditGroupAction" > <action name="EditEditGroupAction" >
@ -578,6 +579,11 @@
<string>Copy URL to Clipboard</string> <string>Copy URL to Clipboard</string>
</property> </property>
</action> </action>
<action name="EditNewGroupAction" >
<property name="text" >
<string>Add New Group...</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

@ -103,6 +103,13 @@ void KeepassGroupView::OnHideSearchResults(){
} }
void KeepassGroupView::OnNewGroup(){ void KeepassGroupView::OnNewGroup(){
CGroup NewGroup;
CEditGroupDialog dlg(db,&NewGroup,parentWidget(),true);
if(dlg.exec())
createGroup(NewGroup.Title, NewGroup.Image, NULL);
}
void KeepassGroupView::OnNewSubgroup(){
GroupViewItem* parent=(GroupViewItem*)currentItem(); GroupViewItem* parent=(GroupViewItem*)currentItem();
CGroup NewGroup; CGroup NewGroup;
CEditGroupDialog dlg(db,&NewGroup,parentWidget(),true); CEditGroupDialog dlg(db,&NewGroup,parentWidget(),true);

@ -65,6 +65,7 @@ class KeepassGroupView:public QTreeWidget{
void OnCurrentGroupChanged(QTreeWidgetItem*); void OnCurrentGroupChanged(QTreeWidgetItem*);
void OnDeleteGroup(); void OnDeleteGroup();
void OnNewGroup(); void OnNewGroup();
void OnNewSubgroup();
void OnEditGroup(); void OnEditGroup();
void updateIcons(); void updateIcons();
void OnHideSearchResults(); void OnHideSearchResults();

@ -148,6 +148,7 @@ void KeepassMainWindow::setupConnections(){
connect(menuBookmarks,SIGNAL(triggered(QAction*)),this,SLOT(OnBookmarkTriggered(QAction*))); connect(menuBookmarks,SIGNAL(triggered(QAction*)),this,SLOT(OnBookmarkTriggered(QAction*)));
connect(EditNewGroupAction, SIGNAL(triggered()), GroupView, SLOT(OnNewGroup())); connect(EditNewGroupAction, SIGNAL(triggered()), GroupView, SLOT(OnNewGroup()));
connect(EditNewSubgroupAction, SIGNAL(triggered()), GroupView, SLOT(OnNewSubgroup()));
connect(EditEditGroupAction, SIGNAL(triggered()), GroupView, SLOT(OnEditGroup())); connect(EditEditGroupAction, SIGNAL(triggered()), GroupView, SLOT(OnEditGroup()));
connect(EditDeleteGroupAction, SIGNAL(triggered()), GroupView, SLOT(OnDeleteGroup())); connect(EditDeleteGroupAction, SIGNAL(triggered()), GroupView, SLOT(OnDeleteGroup()));
connect(EditNewEntryAction, SIGNAL(triggered()), EntryView, SLOT(OnNewEntry())); connect(EditNewEntryAction, SIGNAL(triggered()), EntryView, SLOT(OnNewEntry()));
@ -223,7 +224,7 @@ void KeepassMainWindow::setupToolbar(){
toolBar->addAction(FileUnLockWorkspaceAction); toolBar->addAction(FileUnLockWorkspaceAction);
toolBar->addSeparator(); toolBar->addSeparator();
QuickSearchEdit=new QLineEdit(toolBar); QuickSearchEdit=new QLineEdit(toolBar);
QuickSearchEdit->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); QuickSearchEdit->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);
toolBar->addWidget(QuickSearchEdit); toolBar->addWidget(QuickSearchEdit);
toolBar->setVisible(config->showToolbar()); toolBar->setVisible(config->showToolbar());
} }
@ -247,6 +248,7 @@ void KeepassMainWindow::setupIcons(){
EditOpenUrlAction->setIcon(getIcon("openurl")); EditOpenUrlAction->setIcon(getIcon("openurl"));
EditSaveAttachmentAction->setIcon(getIcon("filesave")); EditSaveAttachmentAction->setIcon(getIcon("filesave"));
EditNewGroupAction->setIcon(getIcon("newgroup")); EditNewGroupAction->setIcon(getIcon("newgroup"));
EditNewSubgroupAction->setIcon(getIcon("newgroup"));
EditEditGroupAction->setIcon(getIcon("editgroup")); EditEditGroupAction->setIcon(getIcon("editgroup"));
EditDeleteGroupAction->setIcon(getIcon("deletegroup")); EditDeleteGroupAction->setIcon(getIcon("deletegroup"));
EditSearchAction->setIcon(getIcon("dbsearch")); EditSearchAction->setIcon(getIcon("dbsearch"));
@ -272,7 +274,7 @@ void KeepassMainWindow::setupIcons(){
} }
void KeepassMainWindow::setupMenus(){ void KeepassMainWindow::setupMenus(){
GroupView->ContextMenu->addAction(EditNewGroupAction); GroupView->ContextMenu->addAction(EditNewSubgroupAction);
GroupView->ContextMenu->addAction(EditEditGroupAction); GroupView->ContextMenu->addAction(EditEditGroupAction);
GroupView->ContextMenu->addAction(EditDeleteGroupAction); GroupView->ContextMenu->addAction(EditDeleteGroupAction);
GroupView->ContextMenu->addSeparator(); GroupView->ContextMenu->addSeparator();
@ -349,9 +351,9 @@ void KeepassMainWindow::setupMenus(){
FileOpenAction->setShortcut(tr("Ctrl+O")); FileOpenAction->setShortcut(tr("Ctrl+O"));
FileCloseAction->setShortcut(tr("Ctrl+W")); FileCloseAction->setShortcut(tr("Ctrl+W"));
FileSaveAction->setShortcut(tr("Ctrl+S")); FileSaveAction->setShortcut(tr("Ctrl+S"));
FileUnLockWorkspaceAction->setShortcut(tr("Ctrl+L")); FileUnLockWorkspaceAction->setShortcut(tr("Ctrl+L"));
FileExitAction->setShortcut(tr("Ctrl+Q")); FileExitAction->setShortcut(tr("Ctrl+Q"));
EditNewGroupAction->setShortcut(tr("Ctrl+G")); EditNewGroupAction->setShortcut(tr("Ctrl+G"));
EditPasswordToClipboardAction->setShortcut(tr("Ctrl+C")); EditPasswordToClipboardAction->setShortcut(tr("Ctrl+C"));
EditUsernameToClipboardAction->setShortcut(tr("Ctrl+B")); EditUsernameToClipboardAction->setShortcut(tr("Ctrl+B"));
EditOpenUrlAction->setShortcut(tr("Ctrl+U")); EditOpenUrlAction->setShortcut(tr("Ctrl+U"));
@ -595,6 +597,7 @@ void KeepassMainWindow::setStateFileOpen(bool IsOpen){
FileSettingsAction->setEnabled(IsOpen); FileSettingsAction->setEnabled(IsOpen);
FileChangeKeyAction->setEnabled(IsOpen); FileChangeKeyAction->setEnabled(IsOpen);
menuExport->setEnabled(IsOpen); menuExport->setEnabled(IsOpen);
EditNewGroupAction->setEnabled(IsOpen);
EditSearchAction->setEnabled(IsOpen); EditSearchAction->setEnabled(IsOpen);
GroupView->setEnabled(IsOpen); GroupView->setEnabled(IsOpen);
EntryView->setEnabled(IsOpen); EntryView->setEnabled(IsOpen);
@ -605,7 +608,7 @@ void KeepassMainWindow::setStateFileOpen(bool IsOpen){
FileUnLockWorkspaceAction->setEnabled(IsOpen||IsLocked); FileUnLockWorkspaceAction->setEnabled(IsOpen||IsLocked);
if(!IsOpen){ if(!IsOpen){
EditNewGroupAction->setEnabled(false); EditNewSubgroupAction->setEnabled(false);
EditEditGroupAction->setEnabled(false); EditEditGroupAction->setEnabled(false);
EditDeleteGroupAction->setEnabled(false); EditDeleteGroupAction->setEnabled(false);
EditPasswordToClipboardAction->setEnabled(false); EditPasswordToClipboardAction->setEnabled(false);
@ -646,21 +649,21 @@ void KeepassMainWindow::setStateGroupSelected(SelectionState s){
GroupSelection=s; GroupSelection=s;
switch(GroupSelection){ switch(GroupSelection){
case NONE: case NONE:
EditNewGroupAction->setEnabled(true); EditNewSubgroupAction->setEnabled(false);
EditEditGroupAction->setEnabled(false); EditEditGroupAction->setEnabled(false);
EditDeleteGroupAction->setEnabled(false); EditDeleteGroupAction->setEnabled(false);
EditGroupSearchAction->setEnabled(false); EditGroupSearchAction->setEnabled(false);
EditNewEntryAction->setEnabled(false); EditNewEntryAction->setEnabled(false);
break; break;
case SINGLE: case SINGLE:
EditNewGroupAction->setEnabled(true); EditNewSubgroupAction->setEnabled(true);
EditEditGroupAction->setEnabled(true); EditEditGroupAction->setEnabled(true);
EditDeleteGroupAction->setEnabled(true); EditDeleteGroupAction->setEnabled(true);
EditGroupSearchAction->setEnabled(true); EditGroupSearchAction->setEnabled(true);
EditNewEntryAction->setEnabled(true); EditNewEntryAction->setEnabled(true);
break; break;
case SEARCHGROUP: case SEARCHGROUP:
EditNewGroupAction->setEnabled(false); EditNewSubgroupAction->setEnabled(false);
EditEditGroupAction->setEnabled(false); EditEditGroupAction->setEnabled(false);
EditDeleteGroupAction->setEnabled(false); EditDeleteGroupAction->setEnabled(false);
EditGroupSearchAction->setEnabled(false); EditGroupSearchAction->setEnabled(false);

@ -143,6 +143,7 @@ TRANSLATIONS += translations/keepassx-cs_CZ.ts \
translations/keepassx-es_ES.ts \ translations/keepassx-es_ES.ts \
translations/keepassx-fr_FR.ts \ translations/keepassx-fr_FR.ts \
translations/keepassx-gl_ES.ts \ translations/keepassx-gl_ES.ts \
translations/keepassx-it_IT.ts \
translations/keepassx-ja_JP.ts \ translations/keepassx-ja_JP.ts \
translations/keepassx-ru_RU.ts \ translations/keepassx-ru_RU.ts \
translations/keepassx-xx_XX.ts translations/keepassx-xx_XX.ts

File diff suppressed because it is too large Load Diff