Release 0.4.3-3maemo with patches to disable menus/actions, add ScrollArea and fix...
[keepassx] / debian / patches / 60_ScrollAreaInDialogs.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 60_ScrollAreaInDialogs.dpatch by  <yma@>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: No description.
6
7 @DPATCH@
8 diff -urNad keepassx~/src/dialogs/EditEntryDlg.cpp keepassx/src/dialogs/EditEntryDlg.cpp
9 --- keepassx~/src/dialogs/EditEntryDlg.cpp      2011-01-23 18:20:41.000000000 +0100
10 +++ keepassx/src/dialogs/EditEntryDlg.cpp       2011-01-23 22:45:14.000000000 +0100
11 @@ -19,6 +19,8 @@
12   ***************************************************************************/
13  
14  #include <QFileDialog>
15 +#include <QScrollArea>
16 +
17  #include "SelectIconDlg.h"
18  #include "PasswordGenDlg.h"
19  #include "EditEntryDlg.h"
20 @@ -39,6 +41,18 @@
21         setupUi(this);
22         ModFlag=false;
23         QMenu *ExpirePresetsMenu=new QMenu();
24 +
25 +        // YMA add scroll area
26 +        QWidget* wrapper = new QWidget();
27 +        wrapper->setLayout(this->layout());
28 +
29 +        QScrollArea* scrollArea = new QScrollArea(this);
30 +        scrollArea->setWidgetResizable(true);
31 +        scrollArea->setWidget(wrapper);
32 +
33 +        QHBoxLayout* wrapperLayout = new QHBoxLayout();
34 +        wrapperLayout->addWidget(scrollArea);
35 +        this->setLayout(wrapperLayout);
36         
37         setGeometry( config->dialogGeometry(this) );
38  
39 diff -urNad keepassx~/src/dialogs/PasswordGenDlg.cpp keepassx/src/dialogs/PasswordGenDlg.cpp
40 --- keepassx~/src/dialogs/PasswordGenDlg.cpp    2011-01-23 18:20:41.000000000 +0100
41 +++ keepassx/src/dialogs/PasswordGenDlg.cpp     2011-01-23 22:45:43.000000000 +0100
42 @@ -18,6 +18,7 @@
43   *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
44   ***************************************************************************/
45  
46 +#include <QScrollArea>
47  
48  #include "dialogs/PasswordGenDlg.h"
49  #include "dialogs/CollectEntropyDlg.h"
50 @@ -32,6 +33,19 @@
51  : QDialog(parent,fl)
52  {
53         setupUi(this);
54 +
55 +        // YMA add scroll area
56 +        QWidget* wrapper = new QWidget();
57 +        wrapper->setLayout(this->layout());
58 +
59 +        QScrollArea* scrollArea = new QScrollArea(this);
60 +        scrollArea->setWidgetResizable(true);
61 +        scrollArea->setWidget(wrapper);
62 +
63 +        QHBoxLayout* wrapperLayout = new QHBoxLayout();
64 +        wrapperLayout->addWidget(scrollArea);
65 +        this->setLayout(wrapperLayout);
66 +
67         connect(ButtonGenerate, SIGNAL(clicked()), SLOT(OnGeneratePw()));
68         connect(DialogButtons, SIGNAL(rejected()), SLOT(OnCancel()));
69         connect(DialogButtons, SIGNAL(accepted()), SLOT(OnAccept()));
70 diff -urNad keepassx~/src/dialogs/SettingsDlg.cpp keepassx/src/dialogs/SettingsDlg.cpp
71 --- keepassx~/src/dialogs/SettingsDlg.cpp       2011-01-23 18:22:01.000000000 +0100
72 +++ keepassx/src/dialogs/SettingsDlg.cpp        2011-01-23 22:45:22.000000000 +0100
73 @@ -19,6 +19,8 @@
74  
75  #include <QFileDialog>
76  #include <QColorDialog>
77 +#include <QScrollArea>
78 +
79  #include "dialogs/SettingsDlg.h"
80  #include "dialogs/CustomizeDetailViewDlg.h"
81  
82 @@ -28,6 +30,19 @@
83  CSettingsDlg::CSettingsDlg(QWidget* parent):QDialog(parent,Qt::Dialog)
84  {
85         setupUi(this);
86 +
87 +        // YMA add scroll area
88 +        QWidget* wrapper = new QWidget();
89 +        wrapper->setLayout(this->layout());
90 +
91 +        QScrollArea* scrollArea = new QScrollArea(this);
92 +        scrollArea->setWidgetResizable(true);
93 +        scrollArea->setWidget(wrapper);
94 +
95 +        QHBoxLayout* wrapperLayout = new QHBoxLayout();
96 +        wrapperLayout->addWidget(scrollArea);
97 +        this->setLayout(wrapperLayout);
98 +
99         connect(listWidget, SIGNAL( currentRowChanged(int) ), stackedWidget, SLOT( setCurrentIndex(int) ) );
100         
101         connect(DialogButtons, SIGNAL( accepted() ), this, SLOT( OnOK() ) );