summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2003-05-20 00:05:18 (UTC)
committer llornkcor <llornkcor>2003-05-20 00:05:18 (UTC)
commit5e86b57756459ebab4e0df224b833a38ec9ba223 (patch) (unidiff)
tree5e46d4d1f4384af88fb30141d0a5d968b4ca3f52
parentec7b5087388f611b994666254c08ce2543dd446a (diff)
downloadopie-5e86b57756459ebab4e0df224b833a38ec9ba223.zip
opie-5e86b57756459ebab4e0df224b833a38ec9ba223.tar.gz
opie-5e86b57756459ebab4e0df224b833a38ec9ba223.tar.bz2
fix menu issue
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index d3429de..e81b7ca 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -70,91 +70,95 @@ static int log_progress(netbuf *, int xfered, void *)
70 qApp->processEvents(); 70 qApp->processEvents();
71 return 1; 71 return 1;
72} 72}
73 73
74OpieFtp::OpieFtp( ) 74OpieFtp::OpieFtp( )
75 : QMainWindow( ) 75 : QMainWindow( )
76{ 76{
77 setCaption( tr( "OpieFtp" ) ); 77 setCaption( tr( "OpieFtp" ) );
78 fuckeduphack=FALSE; 78 fuckeduphack=FALSE;
79 QGridLayout *layout = new QGridLayout( this ); 79 QGridLayout *layout = new QGridLayout( this );
80 layout->setSpacing( 2); 80 layout->setSpacing( 2);
81 layout->setMargin( 2); 81 layout->setMargin( 2);
82 82
83 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 83 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
84 84
85 QPEMenuBar *menuBar = new QPEMenuBar(this); 85 QPEMenuBar *menuBar = new QPEMenuBar(this);
86// QPEToolBar *menuBar = new QPEToolBar(this); 86// QPEToolBar *menuBar = new QPEToolBar(this);
87// menuBar->setHorizontalStretchable( TRUE ); 87// menuBar->setHorizontalStretchable( TRUE );
88 88
89 QWMatrix matrix; 89 QWMatrix matrix;
90 QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); 90 QPixmap pix(Resource::loadPixmap( "UnknownDocument" ));
91 matrix.scale( .4, .4); 91 matrix.scale( .4, .4);
92 unknownXpm = pix.xForm(matrix); 92 unknownXpm = pix.xForm(matrix);
93 93
94 connectionMenu = new QPopupMenu( this ); 94 connectionMenu = new QPopupMenu( this );
95 localMenu = new QPopupMenu( this ); 95 localMenu = new QPopupMenu( this );
96 remoteMenu = new QPopupMenu( this ); 96 remoteMenu = new QPopupMenu( this );
97 tabMenu = new QPopupMenu( this ); 97 tabMenu = new QPopupMenu( this );
98 98
99 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); 99 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 );
100 100
101 menuBar->insertItem( tr( "Connection" ), connectionMenu); 101 menuBar->insertItem( tr( "Connection" ), connectionMenu);
102 menuBar->insertItem( tr( "Local" ), localMenu); 102// menuBar->insertItem( tr( "Local" ), localMenu);
103 menuBar->insertItem( tr( "Remote" ), remoteMenu); 103// menuBar->insertItem( tr( "Remote" ), remoteMenu);
104 menuBar->insertItem( tr( "View" ), tabMenu); 104 menuBar->insertItem( tr( "View" ), tabMenu);
105 105
106 tabMenu->insertItem( tr( "Local" ), localMenu);
107 tabMenu->insertItem( tr( "Remote" ), remoteMenu);
108
106 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); 109 connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() ));
107 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); 110 connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() ));
108 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); 111 connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() ));
109 112
110 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); 113 localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() ));
111 localMenu->insertSeparator(); 114 localMenu->insertSeparator();
112 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); 115 localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() ));
113 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); 116 localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() ));
114 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); 117 localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() ));
115 localMenu->insertSeparator(); 118 localMenu->insertSeparator();
116 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); 119 localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() ));
117 localMenu->setCheckable(TRUE); 120 localMenu->setCheckable(TRUE);
118 121
119 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); 122 remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() ));
120 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); 123 remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() ));
121 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); 124 remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() ));
122 remoteMenu->insertSeparator(); 125 remoteMenu->insertSeparator();
123 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); 126 remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() ));
124 127
128 tabMenu->insertSeparator();
125 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); 129 tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() ));
126 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); 130 tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() ));
127 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); 131 tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() ));
128// tabMenu->insertSeparator(); 132 tabMenu->insertSeparator();
129// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); 133// tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
130 tabMenu->setCheckable(TRUE); 134 tabMenu->setCheckable(TRUE);
131 135
132 136
133 137
134 cdUpButton = new QToolButton( this,"cdUpButton"); 138 cdUpButton = new QToolButton( this,"cdUpButton");
135 cdUpButton->setPixmap(Resource::loadPixmap("up")); 139 cdUpButton->setPixmap(Resource::loadPixmap("up"));
136 cdUpButton ->setFixedSize( QSize( 20, 20 ) ); 140 cdUpButton ->setFixedSize( QSize( 20, 20 ) );
137 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); 141 connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) );
138 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); 142 layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 );
139 cdUpButton->hide(); 143 cdUpButton->hide();
140 144
141// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton"); 145// docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",this,"docsButton");
142// docButton->setFixedSize( QSize( 20, 20 ) ); 146// docButton->setFixedSize( QSize( 20, 20 ) );
143// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); 147// connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) );
144// docButton->setFlat(TRUE); 148// docButton->setFlat(TRUE);
145// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); 149// layout->addMultiCellWidget( docButton, 0, 0, 6, 6 );
146 150
147 homeButton = new QToolButton(this,"homeButton"); 151 homeButton = new QToolButton(this,"homeButton");
148 homeButton->setPixmap( Resource::loadPixmap("home")); 152 homeButton->setPixmap( Resource::loadPixmap("home"));
149 homeButton->setFixedSize( QSize( 20, 20 ) ); 153 homeButton->setFixedSize( QSize( 20, 20 ) );
150 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); 154 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) );
151 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); 155 layout->addMultiCellWidget( homeButton, 0, 0, 4, 4);
152 homeButton->hide(); 156 homeButton->hide();
153 157
154 TabWidget = new QTabWidget( this, "TabWidget" ); 158 TabWidget = new QTabWidget( this, "TabWidget" );
155 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); 159 layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 );
156 160
157// TabWidget->setTabShape(QTabWidget::Triangular); 161// TabWidget->setTabShape(QTabWidget::Triangular);
158 162
159 tab = new QWidget( TabWidget, "tab" ); 163 tab = new QWidget( TabWidget, "tab" );
160 tabLayout = new QGridLayout( tab ); 164 tabLayout = new QGridLayout( tab );