summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_jornada.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_jornada.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_jornada.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp
index 1f69326..5d32901 100644
--- a/libopie2/opiecore/device/odevice_jornada.cpp
+++ b/libopie2/opiecore/device/odevice_jornada.cpp
@@ -93,61 +93,50 @@ struct j_button jornada56x_buttons [] = {
93 "addressbook", "beamBusinessCard()" }, 93 "addressbook", "beamBusinessCard()" },
94 { Model_Jornada_56x, 94 { Model_Jornada_56x,
95 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Todo Button"), 95 Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Todo Button"),
96 "devicebuttons/jornada56x_todo", 96 "devicebuttons/jornada56x_todo",
97 "todolist", "raise()", 97 "todolist", "raise()",
98 "todolist", "create()" }, 98 "todolist", "create()" },
99 { Model_Jornada_56x, 99 { Model_Jornada_56x,
100 Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Home Button"), 100 Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Home Button"),
101 "devicebuttons/jornada56x_home", 101 "devicebuttons/jornada56x_home",
102 "QPE/Launcher", "home()", 102 "QPE/Launcher", "home()",
103 "buttonsettings", "raise()" }, 103 "buttonsettings", "raise()" },
104 { Model_Jornada_56x, 104 { Model_Jornada_56x,
105 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Record Button"), 105 Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Record Button"),
106 "devicebuttons/jornada56x_record", 106 "devicebuttons/jornada56x_record",
107 "QPE/VMemo", "toggleRecord()", 107 "QPE/VMemo", "toggleRecord()",
108 "sound", "raise()" }, 108 "sound", "raise()" },
109}; 109};
110 110
111void Jornada::init(const QString&) 111void Jornada::init(const QString&)
112{ 112{
113 d->m_vendorstr = "HP"; 113 d->m_vendorstr = "HP";
114 d->m_vendor = Vendor_HP; 114 d->m_vendor = Vendor_HP;
115 d->m_modelstr = "Jornada 56x"; 115 d->m_modelstr = "Jornada 56x";
116 d->m_model = Model_Jornada_56x; 116 d->m_model = Model_Jornada_56x;
117 d->m_systemstr = "Familiar";
118 d->m_system = System_Familiar;
119 d->m_rotation = Rot0; 117 d->m_rotation = Rot0;
120 118 //Distribution detecting code is now in base class
121 QFile f ( "/etc/familiar-version" );
122 f.setName ( "/etc/familiar-version" );
123 if ( f.open ( IO_ReadOnly )) {
124
125 QTextStream ts ( &f );
126 d->m_sysverstr = ts.readLine().mid( 10 );
127
128 f. close();
129 }
130} 119}
131 120
132void Jornada::initButtons() 121void Jornada::initButtons()
133{ 122{
134 if ( d->m_buttons ) 123 if ( d->m_buttons )
135 return; 124 return;
136 125
137 d->m_buttons = new QValueList <ODeviceButton>; 126 d->m_buttons = new QValueList <ODeviceButton>;
138 127
139 for ( uint i = 0; i < ( sizeof( jornada56x_buttons ) / sizeof( j_button )); i++ ) { 128 for ( uint i = 0; i < ( sizeof( jornada56x_buttons ) / sizeof( j_button )); i++ ) {
140 j_button *ib = jornada56x_buttons + i; 129 j_button *ib = jornada56x_buttons + i;
141 ODeviceButton b; 130 ODeviceButton b;
142 131
143 if (( ib->model & d->m_model ) == d->m_model ) { 132 if (( ib->model & d->m_model ) == d->m_model ) {
144 b. setKeycode ( ib->code ); 133 b. setKeycode ( ib->code );
145 b. setUserText ( QObject::tr ( "Button", ib->utext )); 134 b. setUserText ( QObject::tr ( "Button", ib->utext ));
146 b. setPixmap ( Resource::loadPixmap ( ib->pix )); 135 b. setPixmap ( Resource::loadPixmap ( ib->pix ));
147 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); 136 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
148 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); 137 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
149 138
150 d->m_buttons->append ( b ); 139 d->m_buttons->append ( b );
151 } 140 }
152 } 141 }
153 reloadButtonMapping(); 142 reloadButtonMapping();