Diffstat (limited to 'noncore/net/opieftp/filePermissions.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieftp/filePermissions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opieftp/filePermissions.cpp b/noncore/net/opieftp/filePermissions.cpp index f545c1f..991fcd5 100644 --- a/noncore/net/opieftp/filePermissions.cpp +++ b/noncore/net/opieftp/filePermissions.cpp | |||
@@ -1,131 +1,131 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** copyright 2002 ljp ljp@llornkcor.com | 2 | ** copyright 2002 ljp ljp@llornkcor.com |
3 | ** Created: Sat Feb 23 19:44:40 2002 L.J. Potter | 3 | ** Created: Sat Feb 23 19:44:40 2002 L.J. Potter |
4 | ** | 4 | ** |
5 | ** This file may be distributed and/or modified under the terms of the | 5 | ** This file may be distributed and/or modified under the terms of the |
6 | ** GNU General Public License version 2 as published by the Free Software | 6 | ** GNU General Public License version 2 as published by the Free Software |
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | 7 | ** Foundation and appearing in the file LICENSE.GPL included in the |
8 | ** packaging of this file. | 8 | ** packaging of this file. |
9 | ** | 9 | ** |
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
12 | ** | 12 | ** |
13 | ****************************************************************************/ | 13 | ****************************************************************************/ |
14 | #include "filePermissions.h" | 14 | #include "filePermissions.h" |
15 | 15 | ||
16 | #include <qfileinfo.h> | 16 | #include <qfileinfo.h> |
17 | 17 | ||
18 | #include <qcheckbox.h> | 18 | #include <qcheckbox.h> |
19 | #include <qlabel.h> | 19 | #include <qlabel.h> |
20 | #include <qlineedit.h> | 20 | #include <qlineedit.h> |
21 | #include <qmessagebox.h> | 21 | #include <qmessagebox.h> |
22 | 22 | ||
23 | #include <unistd.h> | 23 | #include <unistd.h> |
24 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
25 | #include <stdlib.h> | 25 | #include <stdlib.h> |
26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
27 | #include <pwd.h> | 27 | #include <pwd.h> |
28 | #include <grp.h> | 28 | #include <grp.h> |
29 | 29 | ||
30 | filePermissions::filePermissions( QWidget* parent, const char* name, bool modal, WFlags fl, const QString &fileName, bool useRemote ) | 30 | filePermissions::filePermissions( QWidget* parent, const char* name, bool modal, WFlags fl, const QString &fileName, bool useRemote ) |
31 | : QDialog( parent, name, modal, fl ) | 31 | : QDialog( parent, name, modal, fl ) |
32 | { | 32 | { |
33 | if ( !name ) | 33 | if ( !name ) |
34 | setName( tr("filePermissions") ); | 34 | setName( tr("filePermissions") ); |
35 | // qDebug("FilePermissions "+fileName); | 35 | // odebug << "FilePermissions "+fileName << oendl; |
36 | resize( 236, 210 ); | 36 | resize( 236, 210 ); |
37 | isRemote=useRemote; | 37 | isRemote=useRemote; |
38 | setMaximumSize( QSize( 236, 210 ) ); | 38 | setMaximumSize( QSize( 236, 210 ) ); |
39 | setCaption( tr( "Set File Permissions" ) ); | 39 | setCaption( tr( "Set File Permissions" ) ); |
40 | 40 | ||
41 | TextLabel1 = new QLabel( this, "TextLabel1" ); | 41 | TextLabel1 = new QLabel( this, "TextLabel1" ); |
42 | TextLabel1->setGeometry( QRect( 25, 5, 175, 20 ) ); | 42 | TextLabel1->setGeometry( QRect( 25, 5, 175, 20 ) ); |
43 | TextLabel1->setText( tr( "Set file permissions for:" ) ); | 43 | TextLabel1->setText( tr( "Set file permissions for:" ) ); |
44 | 44 | ||
45 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 45 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
46 | LineEdit1->setGeometry( QRect( 10, 25, 218, 22 ) ); | 46 | LineEdit1->setGeometry( QRect( 10, 25, 218, 22 ) ); |
47 | LineEdit1->setReadOnly(true); | 47 | LineEdit1->setReadOnly(true); |
48 | 48 | ||
49 | TextLabel4 = new QLabel( this, "TextLabel4" ); | 49 | TextLabel4 = new QLabel( this, "TextLabel4" ); |
50 | TextLabel4->setGeometry( QRect( 5, 85, 50, 15 ) ); | 50 | TextLabel4->setGeometry( QRect( 5, 85, 50, 15 ) ); |
51 | TextLabel4->setText( tr( "owner" ) ); | 51 | TextLabel4->setText( tr( "owner" ) ); |
52 | 52 | ||
53 | TextLabel4_2 = new QLabel( this, "TextLabel4_2" ); | 53 | TextLabel4_2 = new QLabel( this, "TextLabel4_2" ); |
54 | TextLabel4_2->setGeometry( QRect( 5, 105, 50, 15 ) ); | 54 | TextLabel4_2->setGeometry( QRect( 5, 105, 50, 15 ) ); |
55 | TextLabel4_2->setText( tr( "group" ) ); | 55 | TextLabel4_2->setText( tr( "group" ) ); |
56 | 56 | ||
57 | TextLabel4_3 = new QLabel( this, "TextLabel4_3" ); | 57 | TextLabel4_3 = new QLabel( this, "TextLabel4_3" ); |
58 | TextLabel4_3->setGeometry( QRect( 5, 125, 50, 15 ) ); | 58 | TextLabel4_3->setGeometry( QRect( 5, 125, 50, 15 ) ); |
59 | TextLabel4_3->setText( tr( "others" ) ); | 59 | TextLabel4_3->setText( tr( "others" ) ); |
60 | 60 | ||
61 | CheckBox1 = new QCheckBox( this, "CheckBox1" ); | 61 | CheckBox1 = new QCheckBox( this, "CheckBox1" ); |
62 | CheckBox1->setGeometry( QRect( 75, 85, 20, 16 ) ); | 62 | CheckBox1->setGeometry( QRect( 75, 85, 20, 16 ) ); |
63 | connect(CheckBox1, SIGNAL(released()),this,SLOT(ownReadCheck())); | 63 | connect(CheckBox1, SIGNAL(released()),this,SLOT(ownReadCheck())); |
64 | 64 | ||
65 | CheckBox1_2 = new QCheckBox( this, "CheckBox1_2" ); | 65 | CheckBox1_2 = new QCheckBox( this, "CheckBox1_2" ); |
66 | CheckBox1_2->setGeometry( QRect( 135, 85, 20, 16 ) ); | 66 | CheckBox1_2->setGeometry( QRect( 135, 85, 20, 16 ) ); |
67 | connect(CheckBox1_2, SIGNAL(released()),this,SLOT(ownWriteCheck())); | 67 | connect(CheckBox1_2, SIGNAL(released()),this,SLOT(ownWriteCheck())); |
68 | 68 | ||
69 | CheckBox1_3 = new QCheckBox( this, "CheckBox1_3" ); | 69 | CheckBox1_3 = new QCheckBox( this, "CheckBox1_3" ); |
70 | CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) ); | 70 | CheckBox1_3->setGeometry( QRect( 195, 85, 20, 16 ) ); |
71 | connect(CheckBox1_3, SIGNAL(released()),this,SLOT(ownExeCheck())); | 71 | connect(CheckBox1_3, SIGNAL(released()),this,SLOT(ownExeCheck())); |
72 | 72 | ||
73 | CheckBox1_4 = new QCheckBox( this, "CheckBox1_4" ); | 73 | CheckBox1_4 = new QCheckBox( this, "CheckBox1_4" ); |
74 | CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) ); | 74 | CheckBox1_4->setGeometry( QRect( 75, 105, 20, 16 ) ); |
75 | connect(CheckBox1_4, SIGNAL(released()),this,SLOT(grpReadCheck())); | 75 | connect(CheckBox1_4, SIGNAL(released()),this,SLOT(grpReadCheck())); |
76 | 76 | ||
77 | CheckBox1_5 = new QCheckBox( this, "CheckBox1_5" ); | 77 | CheckBox1_5 = new QCheckBox( this, "CheckBox1_5" ); |
78 | CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) ); | 78 | CheckBox1_5->setGeometry( QRect( 135, 105, 20, 16 ) ); |
79 | connect(CheckBox1_5, SIGNAL(released()),this,SLOT(grpWriteCheck())); | 79 | connect(CheckBox1_5, SIGNAL(released()),this,SLOT(grpWriteCheck())); |
80 | 80 | ||
81 | CheckBox1_6 = new QCheckBox( this, "CheckBox1_6" ); | 81 | CheckBox1_6 = new QCheckBox( this, "CheckBox1_6" ); |
82 | CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) ); | 82 | CheckBox1_6->setGeometry( QRect( 195, 105, 20, 16 ) ); |
83 | connect(CheckBox1_6, SIGNAL(released()),this,SLOT(grpExeCheck())); | 83 | connect(CheckBox1_6, SIGNAL(released()),this,SLOT(grpExeCheck())); |
84 | 84 | ||
85 | CheckBox1_7 = new QCheckBox( this, "CheckBox1_7" ); | 85 | CheckBox1_7 = new QCheckBox( this, "CheckBox1_7" ); |
86 | CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) ); | 86 | CheckBox1_7->setGeometry( QRect( 75, 125, 16, 16 ) ); |
87 | connect(CheckBox1_7, SIGNAL(released()),this,SLOT(wrldReadCheck())); | 87 | connect(CheckBox1_7, SIGNAL(released()),this,SLOT(wrldReadCheck())); |
88 | 88 | ||
89 | CheckBox1_8 = new QCheckBox( this, "CheckBox1_8" ); | 89 | CheckBox1_8 = new QCheckBox( this, "CheckBox1_8" ); |
90 | CheckBox1_8->setGeometry( QRect( 135, 125, 20, 16 ) ); | 90 | CheckBox1_8->setGeometry( QRect( 135, 125, 20, 16 ) ); |
91 | connect(CheckBox1_8, SIGNAL(released()),this,SLOT(wrldWriteCheck())); | 91 | connect(CheckBox1_8, SIGNAL(released()),this,SLOT(wrldWriteCheck())); |
92 | 92 | ||
93 | CheckBox1_8_2 = new QCheckBox( this, "CheckBox1_8_2" ); | 93 | CheckBox1_8_2 = new QCheckBox( this, "CheckBox1_8_2" ); |
94 | CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) ); | 94 | CheckBox1_8_2->setGeometry( QRect( 195, 125, 20, 16 ) ); |
95 | connect(CheckBox1_8_2, SIGNAL(released()),this,SLOT(wrldExeCheck())); | 95 | connect(CheckBox1_8_2, SIGNAL(released()),this,SLOT(wrldExeCheck())); |
96 | 96 | ||
97 | GroupLineEdit = new QLineEdit( this, "GroupLineEdit" ); | 97 | GroupLineEdit = new QLineEdit( this, "GroupLineEdit" ); |
98 | GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) ); | 98 | GroupLineEdit->setGeometry( QRect( 125, 155, 106, 22 ) ); |
99 | 99 | ||
100 | OwnerLineEdit = new QLineEdit( this, "OwnerLineEdit" ); | 100 | OwnerLineEdit = new QLineEdit( this, "OwnerLineEdit" ); |
101 | OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) ); | 101 | OwnerLineEdit->setGeometry( QRect( 10, 155, 106, 22 ) ); |
102 | 102 | ||
103 | TextLabel5 = new QLabel( this, "TextLabel5" ); | 103 | TextLabel5 = new QLabel( this, "TextLabel5" ); |
104 | TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) ); | 104 | TextLabel5->setGeometry( QRect( 45, 180, 40, 16 ) ); |
105 | TextLabel5->setText( tr( "Owner" ) ); | 105 | TextLabel5->setText( tr( "Owner" ) ); |
106 | 106 | ||
107 | TextLabel5_2 = new QLabel( this, "TextLabel5_2" ); | 107 | TextLabel5_2 = new QLabel( this, "TextLabel5_2" ); |
108 | TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) ); | 108 | TextLabel5_2->setGeometry( QRect( 155, 180, 40, 16 ) ); |
109 | TextLabel5_2->setText( tr( "Group" ) ); | 109 | TextLabel5_2->setText( tr( "Group" ) ); |
110 | 110 | ||
111 | ModeLine = new QLineEdit( this, "TextLabelMode" ); | 111 | ModeLine = new QLineEdit( this, "TextLabelMode" ); |
112 | ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) ); | 112 | ModeLine->setGeometry( QRect( 10, 60, 40, 15 ) ); |
113 | 113 | ||
114 | TextLabel3_2 = new QLabel( this, "TextLabel3_2" ); | 114 | TextLabel3_2 = new QLabel( this, "TextLabel3_2" ); |
115 | TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) ); | 115 | TextLabel3_2->setGeometry( QRect( 60, 55, 50, 20 ) ); |
116 | TextLabel3_2->setText( tr( "read" ) ); | 116 | TextLabel3_2->setText( tr( "read" ) ); |
117 | TextLabel3_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); | 117 | TextLabel3_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); |
118 | 118 | ||
119 | TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" ); | 119 | TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" ); |
120 | TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) ); | 120 | TextLabel3_2_2->setGeometry( QRect( 120, 55, 50, 20 ) ); |
121 | TextLabel3_2_2->setText( tr( "write" ) ); | 121 | TextLabel3_2_2->setText( tr( "write" ) ); |
122 | TextLabel3_2_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); | 122 | TextLabel3_2_2->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); |
123 | 123 | ||
124 | TextLabel3 = new QLabel( this, "TextLabel3" ); | 124 | TextLabel3 = new QLabel( this, "TextLabel3" ); |
125 | TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) ); | 125 | TextLabel3->setGeometry( QRect( 180, 55, 50, 20 ) ); |
126 | TextLabel3->setText( tr( "execute" ) ); | 126 | TextLabel3->setText( tr( "execute" ) ); |
127 | TextLabel3->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); | 127 | TextLabel3->setAlignment( int( QLabel::AlignBottom | QLabel::AlignHCenter ) ); |
128 | 128 | ||
129 | struct stat buf; | 129 | struct stat buf; |
130 | mode_t mode; | 130 | mode_t mode; |
131 | file = fileName; | 131 | file = fileName; |