author | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
commit | 0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff) | |
tree | 503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /libopie2/opiecore/device/odevice_yopy.cpp | |
parent | a0981652d61776d70f25980f035748b21339e946 (diff) | |
download | opie-0d59c780513da78033f4d9040475dee9db0256d4.zip opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2 |
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you
can check the diff (but it had compiled and run here)
Diffstat (limited to 'libopie2/opiecore/device/odevice_yopy.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_yopy.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index a76f90b..d241db8 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp | |||
@@ -74,90 +74,90 @@ void Yopy::init() | |||
74 | { | 74 | { |
75 | d->m_vendorstr = "G.Mate"; | 75 | d->m_vendorstr = "G.Mate"; |
76 | d->m_vendor = Vendor_GMate; | 76 | d->m_vendor = Vendor_GMate; |
77 | d->m_modelstr = "Yopy3700"; | 77 | d->m_modelstr = "Yopy3700"; |
78 | d->m_model = Model_Yopy_3700; | 78 | d->m_model = Model_Yopy_3700; |
79 | d->m_rotation = Rot0; | 79 | d->m_rotation = Rot0; |
80 | 80 | ||
81 | d->m_systemstr = "Linupy"; | 81 | d->m_systemstr = "Linupy"; |
82 | d->m_system = System_Linupy; | 82 | d->m_system = System_Linupy; |
83 | 83 | ||
84 | QFile f ( "/etc/issue" ); | 84 | QFile f ( "/etc/issue" ); |
85 | if ( f. open ( IO_ReadOnly ) ) | 85 | if ( f. open ( IO_ReadOnly ) ) |
86 | { | 86 | { |
87 | QTextStream ts ( &f ); | 87 | QTextStream ts ( &f ); |
88 | ts.readLine(); | 88 | ts.readLine(); |
89 | d->m_sysverstr = ts. readLine(); | 89 | d->m_sysverstr = ts. readLine(); |
90 | f. close(); | 90 | f. close(); |
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | void Yopy::initButtons() | 95 | void Yopy::initButtons() |
96 | { | 96 | { |
97 | if ( d->m_buttons ) | 97 | if ( d->m_buttons ) |
98 | return ; | 98 | return ; |
99 | 99 | ||
100 | d->m_buttons = new QValueList <ODeviceButton>; | 100 | d->m_buttons = new QValueList <ODeviceButton>; |
101 | 101 | ||
102 | for ( uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof( yopy_button ) ); i++ ) | 102 | for ( uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof( yopy_button ) ); i++ ) |
103 | { | 103 | { |
104 | 104 | ||
105 | yopy_button *ib = yopy_buttons + i; | 105 | yopy_button *ib = yopy_buttons + i; |
106 | 106 | ||
107 | ODeviceButton b; | 107 | ODeviceButton b; |
108 | 108 | ||
109 | b. setKeycode ( ib->code ); | 109 | b. setKeycode ( ib->code ); |
110 | b. setUserText ( QObject::tr ( "Button", ib->utext ) ); | 110 | b. setUserText ( QObject::tr ( "Button", ib->utext ) ); |
111 | b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); | 111 | b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); |
112 | b. setFactoryPresetPressedAction | 112 | b. setFactoryPresetPressedAction |
113 | ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); | 113 | ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); |
114 | b. setFactoryPresetHeldAction | 114 | b. setFactoryPresetHeldAction |
115 | ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); | 115 | ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); |
116 | 116 | ||
117 | d->m_buttons->append ( b ); | 117 | d->m_buttons->append ( b ); |
118 | } | 118 | } |
119 | reloadButtonMapping(); | 119 | reloadButtonMapping(); |
120 | 120 | ||
121 | QCopChannel *sysch = new QCopChannel( "QPE/System", this ); | 121 | QCopChannel *sysch = new QCopChannel( "QPE/System", this ); |
122 | connect( sysch, SIGNAL( received( const QCString &, const QByteArray & ) ), | 122 | connect( sysch, SIGNAL( received(const QCString&,const QByteArray&) ), |
123 | this, SLOT( systemMessage( const QCString &, const QByteArray & ) ) ); | 123 | this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); |
124 | } | 124 | } |
125 | 125 | ||
126 | 126 | ||
127 | bool Yopy::suspend() | 127 | bool Yopy::suspend() |
128 | { | 128 | { |
129 | /* Opie for Yopy does not implement its own power management at the | 129 | /* Opie for Yopy does not implement its own power management at the |
130 | moment. The public version runs parallel to X, and relies on the | 130 | moment. The public version runs parallel to X, and relies on the |
131 | existing power management features. */ | 131 | existing power management features. */ |
132 | return false; | 132 | return false; |
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | bool Yopy::setDisplayBrightness( int bright ) | 136 | bool Yopy::setDisplayBrightness( int bright ) |
137 | { | 137 | { |
138 | /* The code here works, but is disabled as the current version runs | 138 | /* The code here works, but is disabled as the current version runs |
139 | parallel to X, and relies on the existing backlight demon. */ | 139 | parallel to X, and relies on the existing backlight demon. */ |
140 | #if 0 | 140 | #if 0 |
141 | if ( QFile::exists( "/proc/sys/pm/light" ) ) | 141 | if ( QFile::exists( "/proc/sys/pm/light" ) ) |
142 | { | 142 | { |
143 | int fd = ::open( "/proc/sys/pm/light", O_WRONLY ); | 143 | int fd = ::open( "/proc/sys/pm/light", O_WRONLY ); |
144 | if ( fd >= 0 ) | 144 | if ( fd >= 0 ) |
145 | { | 145 | { |
146 | if ( bright ) | 146 | if ( bright ) |
147 | ::write( fd, "1\n", 2 ); | 147 | ::write( fd, "1\n", 2 ); |
148 | else | 148 | else |
149 | ::write( fd, "0\n", 2 ); | 149 | ::write( fd, "0\n", 2 ); |
150 | ::close( fd ); | 150 | ::close( fd ); |
151 | return true; | 151 | return true; |
152 | } | 152 | } |
153 | } | 153 | } |
154 | #endif | 154 | #endif |
155 | return false; | 155 | return false; |
156 | } | 156 | } |
157 | 157 | ||
158 | 158 | ||
159 | int Yopy::displayBrightnessResolution() const | 159 | int Yopy::displayBrightnessResolution() const |
160 | { | 160 | { |
161 | return 2; | 161 | return 2; |
162 | } | 162 | } |
163 | 163 | ||