Allow EditEntry Dialog to be smaller

Fixed: Line breaks are ignored in Entry Detail View

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@206 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 16 years ago
parent 0c7ad0dcaa
commit bc8ec1b520
  1. 34
      src/forms/EditEntryDlg.ui
  2. 27
      src/mainwindow.cpp

@ -20,18 +20,12 @@
<bool>true</bool>
</property>
<layout class="QGridLayout" >
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>6</number>
</property>
<item rowspan="2" row="5" column="1" >
<layout class="QGridLayout" >
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<property name="spacing" >
<number>6</number>
</property>
<item row="1" column="1" >
@ -240,6 +234,12 @@
</item>
<item row="8" column="1" >
<widget class="QTextEdit" name="Edit_Comment" >
<property name="minimumSize" >
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="tabChangesFocus" >
<bool>true</bool>
</property>
@ -282,7 +282,9 @@
<string/>
</property>
<property name="icon" >
<iconset/>
<iconset>
<normaloff/>
</iconset>
</property>
<property name="iconSize" >
<size>
@ -298,7 +300,9 @@
<string/>
</property>
<property name="icon" >
<iconset/>
<iconset>
<normaloff/>
</iconset>
</property>
<property name="iconSize" >
<size>
@ -314,7 +318,9 @@
<string/>
</property>
<property name="icon" >
<iconset/>
<iconset>
<normaloff/>
</iconset>
</property>
<property name="iconSize" >
<size>
@ -424,7 +430,7 @@
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>100</width>
<height>20</height>
@ -460,7 +466,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons" >
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
@ -472,7 +478,7 @@
<property name="sizeType" >
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>50</height>

@ -660,7 +660,7 @@ void KeepassMainWindow::updateDetailView(){
templ.replace("%lastmod%",entry->lastMod().toString(Qt::DefaultLocaleShortDate));
templ.replace("%lastaccess%",entry->lastAccess().toString(Qt::DefaultLocaleShortDate));
templ.replace("%expire%",entry->expire().toString(Qt::DefaultLocaleShortDate));
templ.replace("%comment%",entry->comment());
templ.replace("%comment%",entry->comment().replace("\n","<br/>"));
templ.replace("%attachment%",entry->binaryDesc());
if(entry->expire()!=Date_Never){
@ -715,9 +715,9 @@ void KeepassMainWindow::updateDetailView(){
void KeepassMainWindow::setStateEntrySelected(SelectionState s){
EntrySelection=s;
if(GroupSelection == NONE || GroupSelection == SINGLE)
switch(EntrySelection){
EntrySelection = s;
if (GroupSelection == NONE || GroupSelection == SINGLE){
switch (EntrySelection){
case NONE:
EditPasswordToClipboardAction->setEnabled(false);
EditUsernameToClipboardAction->setEnabled(false);
@ -760,10 +760,12 @@ switch(EntrySelection){
EditAutoTypeAction->setEnabled(false);
#endif
break;
default: Q_ASSERT(false);
}
else if(GroupSelection == SEARCHGROUP)
switch(EntrySelection){
default:
Q_ASSERT(false);
}
}
else if (GroupSelection == SEARCHGROUP){
switch(EntrySelection){
case NONE:
EditUsernameToClipboardAction->setEnabled(false);
EditPasswordToClipboardAction->setEnabled(false);
@ -806,9 +808,12 @@ switch(EntrySelection){
EditAutoTypeAction->setEnabled(false);
#endif
break;
default: Q_ASSERT(false);
}
else Q_ASSERT(false);
default:
Q_ASSERT(false);
}
}
else
Q_ASSERT(false);
}