summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/TEWidget.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/TEWidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index f3f462f..e4415dc 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -86,24 +86,49 @@
86 86
87#define loc(X,Y) ((Y)*columns+(X)) 87#define loc(X,Y) ((Y)*columns+(X))
88 88
89//FIXME: the rim should normally be 1, 0 only when running in full screen mode. 89//FIXME: the rim should normally be 1, 0 only when running in full screen mode.
90#define rimX 0 // left/right rim width 90#define rimX 0 // left/right rim width
91#define rimY 0 // top/bottom rim high 91#define rimY 0 // top/bottom rim high
92 92
93#define SCRWIDTH 16 // width of the scrollbar 93#define SCRWIDTH 16 // width of the scrollbar
94 94
95#define yMouseScroll 1 95#define yMouseScroll 1
96// scroll increment used when dragging selection at top/bottom of window. 96// scroll increment used when dragging selection at top/bottom of window.
97 97
98/* Button XPM */
99namespace {
100static char * menu_xpm[] = {
101"12 12 5 1",
102 " c None",
103 ".c #000000",
104 "+c #FFFDAD",
105 "@c #FFFF00",
106 "#c #E5E100",
107" ",
108" ",
109" ......... ",
110" .+++++++. ",
111" .+@@@@#. ",
112" .+@@@#. ",
113" .+@@#. ",
114" .+@#. ",
115" .+#. ",
116" .+. ",
117" .. ",
118" "};
119
120}
121
122
98/* ------------------------------------------------------------------------- */ 123/* ------------------------------------------------------------------------- */
99/* */ 124/* */
100/* Colors */ 125/* Colors */
101/* */ 126/* */
102/* ------------------------------------------------------------------------- */ 127/* ------------------------------------------------------------------------- */
103 128
104//FIXME: the default color table is in session.C now. 129//FIXME: the default color table is in session.C now.
105// We need a way to get rid of this one, here. 130// We need a way to get rid of this one, here.
106static const ColorEntry base_color_table[TABLE_COLORS] = 131static const ColorEntry base_color_table[TABLE_COLORS] =
107// The following are almost IBM standard color codes, with some slight 132// The following are almost IBM standard color codes, with some slight
108// gamma correction for the dim colors to compensate for bright X screens. 133// gamma correction for the dim colors to compensate for bright X screens.
109// It contains the 8 ansiterm/xterm colors in 2 intensities. 134// It contains the 8 ansiterm/xterm colors in 2 intensities.
@@ -1232,25 +1257,25 @@ void TEWidget::dropEvent(QDropEvent* event)
1232 } 1257 }
1233 else if(QTextDrag::decode(event, dropText)) { 1258 else if(QTextDrag::decode(event, dropText)) {
1234// kdDebug() << "Drop:" << dropText.local8Bit() << "\n"; 1259// kdDebug() << "Drop:" << dropText.local8Bit() << "\n";
1235 if (currentSession) { 1260 if (currentSession) {
1236 currentSession->getEmulation()->sendString(dropText.local8Bit()); 1261 currentSession->getEmulation()->sendString(dropText.local8Bit());
1237 } 1262 }
1238 // Paste it 1263 // Paste it
1239 } 1264 }
1240} 1265}
1241#endif 1266#endif
1242 1267
1243 1268
1244void TEWidget::drop_menu_activated(int item) 1269void TEWidget::drop_menu_activated(int)
1245{ 1270{
1246#ifndef QT_NO_DRAGANDDROP 1271#ifndef QT_NO_DRAGANDDROP
1247 switch (item) 1272 switch (item)
1248 { 1273 {
1249 case 0: // paste 1274 case 0: // paste
1250 currentSession->getEmulation()->sendString(dropText.local8Bit()); 1275 currentSession->getEmulation()->sendString(dropText.local8Bit());
1251// KWM::activate((Window)this->winId()); 1276// KWM::activate((Window)this->winId());
1252 break; 1277 break;
1253 case 1: // cd ... 1278 case 1: // cd ...
1254 currentSession->getEmulation()->sendString("cd "); 1279 currentSession->getEmulation()->sendString("cd ");
1255 struct stat statbuf; 1280 struct stat statbuf;
1256 if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 ) 1281 if ( ::stat( QFile::encodeName( dropText ), &statbuf ) == 0 )