Class: Idb::DeviceStatusDialog
- Inherits:
-
Qt::Dialog
- Object
- Qt::Dialog
- Idb::DeviceStatusDialog
- Defined in:
- lib/gui/device_status_dialog.rb
Instance Method Summary collapse
- #apt_get_section ⇒ Object
- #cycript_section ⇒ Object
- #dumpdecrypted_section ⇒ Object
-
#initialize(*args) ⇒ DeviceStatusDialog
constructor
A new instance of DeviceStatusDialog.
- #installed_check_mark ⇒ Object
- #keychaineditor_section ⇒ Object
- #mark_apt_get_installed ⇒ Object
- #mark_cycript_installed ⇒ Object
- #mark_dumpdecrypted_installed ⇒ Object
- #mark_keychain_editor_installed ⇒ Object
- #mark_open_installed ⇒ Object
- #mark_openurl_installed ⇒ Object
- #mark_pbwatcher_installed ⇒ Object
- #mark_pcviewer_installed ⇒ Object
- #mark_rsync_installed ⇒ Object
- #open_section ⇒ Object
- #open_url_section ⇒ Object
- #pbwatcher_section ⇒ Object
- #pcviewer_section ⇒ Object
- #rsync_section ⇒ Object
Constructor Details
#initialize(*args) ⇒ DeviceStatusDialog
Returns a new instance of DeviceStatusDialog.
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/gui/device_status_dialog.rb', line 272 def initialize *args super *args @layout = Qt::GridLayout.new setLayout(@layout) setWindowTitle "Device Status" @close_button = Qt::PushButton.new "Close" @close_button.connect(SIGNAL(:released)) {|x| reject() } #TODO: prevent closing @layout.addWidget @close_button, 10, 2 apt_get_section open_section open_url_section dumpdecrypted_section pbwatcher_section pcviewer_section keychaineditor_section rsync_section cycript_section setFixedHeight(sizeHint().height()); end |
Instance Method Details
#apt_get_section ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/gui/device_status_dialog.rb', line 68 def apt_get_section @aptget_label = Qt::Label.new "<b>apt-get / aptitude</b><br>(Install additional software packages)" @layout.addWidget @aptget_label, 0, 0 if $device.apt_get_installed? mark_apt_get_installed else @install_aptget = Qt::PushButton.new "Install" @install_aptget.connect(SIGNAL(:released)) { error = Qt::MessageBox.new error.setText("Aptitude or apt-get must be installed on the device using Cydia.") error.setIcon(Qt::MessageBox::Critical) error.exec if $device.apt_get_installed? @install_aptget.hide mark_apt_get_installed end } @layout.addWidget @install_aptget, 0, 1 end end |
#cycript_section ⇒ Object
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/gui/device_status_dialog.rb', line 248 def cycript_section @cycript_label = Qt::Label.new "<b>cycript</b><br>(explore and modify running applications using a hybrid of Objective-C++ and JavaScript. http://www.cycript.org/ )" @layout.addWidget @cycript_label, 8, 0 if $device.cycript_installed? mark_cycript_installed else @install_cycript = Qt::PushButton.new "Install" @install_cycript.connect(SIGNAL(:released)) { $device.install_cycript if $device.cycript_installed? @install_cycript.hide mark_cycript_installed else error = Qt::MessageBox.new error.setInformativeText("cycript could not be installed. Please make sure Cydia has finished all tasks and is closed on the device.") error.setIcon(Qt::MessageBox::Critical) error.exec end } @layout.addWidget @install_cycript, 8, 1 end end |
#dumpdecrypted_section ⇒ Object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/gui/device_status_dialog.rb', line 129 def dumpdecrypted_section @dumpdecrypted_label = Qt::Label.new "<b>dumpdecrypted</b><br>(Decrypt app binaries on the device).<br>Developed and maintained by Stefan Esser https://github.com/stefanesser/dumpdecrypted" @layout.addWidget @dumpdecrypted_label, 3, 0 if $device.dumpdecrypted_installed? mark_dumpdecrypted_installed else @install_dumpdecrypted = Qt::PushButton.new "Install" @install_dumpdecrypted.connect(SIGNAL(:released)) { $device.install_dumpdecrypted if $device.dumpdecrypted_installed? @install_dumpdecrypted.hide mark_dumpdecrypted_installed else error = Qt::MessageBox.new error.setInformativeText("No compiled version of dumpdecrypted was found in utils/dumpdecrypted. It cannot be shipped with idb due to licensing issues. Compilation failed likely due to XCode 5 not shipping the right version of gcc anymore. Try manually copying dumpdecrypted.dylib into /var/root on the device.") error.setIcon(Qt::MessageBox::Critical) error.exec end } @layout.addWidget @install_dumpdecrypted, 3, 1 end end |
#installed_check_mark ⇒ Object
5 6 7 8 9 10 |
# File 'lib/gui/device_status_dialog.rb', line 5 def installed_check_mark installed_check_mark = Qt::Label.new pixmap = Qt::Pixmap.new File.join(File.dirname(File.(__FILE__)), '/images/check.png') installed_check_mark.setPixmap pixmap installed_check_mark end |
#keychaineditor_section ⇒ Object
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/gui/device_status_dialog.rb', line 199 def keychaineditor_section @keychain_editor_label = Qt::Label.new "<b>keychain_editor</b><br>(provides keychain edit functionality.<br>by Nitin Jami)" @layout.addWidget @keychain_editor_label, 6, 0 if $device.keychain_editor_installed? mark_keychain_editor_installed else @install_keychain_editor = Qt::PushButton.new "Install" @install_keychain_editor.connect(SIGNAL(:released)) { $device.install_keychain_editor if $device.keychain_editor_installed? @install_keychain_editor.hide mark_keychain_editor_installed end } @layout.addWidget @install_keychain_editor, 6, 1 end end |
#mark_apt_get_installed ⇒ Object
43 44 45 46 47 |
# File 'lib/gui/device_status_dialog.rb', line 43 def mark_apt_get_installed @aptget_label.text = @aptget_label.text + "<br>Found: #{$device.apt_get_path}" @layout.addWidget installed_check_mark, 0, 1 setFixedHeight(sizeHint().height()); end |
#mark_cycript_installed ⇒ Object
61 62 63 64 65 |
# File 'lib/gui/device_status_dialog.rb', line 61 def mark_cycript_installed @cycript_label.text = @cycript_label.text + "<br>Found: #{$device.cycript_path}" @layout.addWidget installed_check_mark, 8, 1 setFixedHeight(sizeHint().height()); end |
#mark_dumpdecrypted_installed ⇒ Object
36 37 38 39 40 |
# File 'lib/gui/device_status_dialog.rb', line 36 def mark_dumpdecrypted_installed @dumpdecrypted_label.text = @dumpdecrypted_label.text + "<br>Found: #{$device.dumpdecrypted_path}" @layout.addWidget installed_check_mark, 3, 1 setFixedHeight(sizeHint().height()); end |
#mark_keychain_editor_installed ⇒ Object
18 19 20 21 22 |
# File 'lib/gui/device_status_dialog.rb', line 18 def mark_keychain_editor_installed @keychain_editor_label.text = @keychain_editor_label.text + "<br>found: #{$device.keychain_editor_path}" @layout.addWidget installed_check_mark, 6, 1 setFixedHeight(sizeHint().height()); end |
#mark_open_installed ⇒ Object
49 50 51 52 53 |
# File 'lib/gui/device_status_dialog.rb', line 49 def mark_open_installed @open_label.text = @open_label.text + "<br>Found: #{$device.open_path}" @layout.addWidget installed_check_mark, 1, 1 setFixedHeight(sizeHint().height()); end |
#mark_openurl_installed ⇒ Object
55 56 57 58 59 |
# File 'lib/gui/device_status_dialog.rb', line 55 def mark_openurl_installed @openurl_label.text = @openurl_label.text + "<br>Found: #{$device.openurl_path}" @layout.addWidget installed_check_mark, 2, 1 setFixedHeight(sizeHint().height()); end |
#mark_pbwatcher_installed ⇒ Object
30 31 32 33 34 |
# File 'lib/gui/device_status_dialog.rb', line 30 def mark_pbwatcher_installed @pbwatcher_label.text = @pbwatcher_label.text + "<br>found: #{$device.pbwatcher_path}" @layout.addWidget installed_check_mark, 4, 1 setFixedHeight(sizeHint().height()); end |
#mark_pcviewer_installed ⇒ Object
24 25 26 27 28 |
# File 'lib/gui/device_status_dialog.rb', line 24 def mark_pcviewer_installed @pcviewer_label.text = @pcviewer_label.text + "<br>found: #{$device.pcviewer_path}" @layout.addWidget installed_check_mark, 5, 1 setFixedHeight(sizeHint().height()); end |
#mark_rsync_installed ⇒ Object
12 13 14 15 16 |
# File 'lib/gui/device_status_dialog.rb', line 12 def mark_rsync_installed @rsync_label.text = @rsync_label.text + "<br>found: #{$device.rsync_path}" @layout.addWidget installed_check_mark, 7, 1 setFixedHeight(sizeHint().height()); end |
#open_section ⇒ Object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/gui/device_status_dialog.rb', line 92 def open_section @open_label = Qt::Label.new "<b>open</b><br>(Open apps on the device)" @layout.addWidget @open_label, 1, 0 if $device.open_installed? mark_open_installed else @install_open = Qt::PushButton.new "Install" @install_open.connect(SIGNAL(:released)) { $device.install_open if $device.open_installed? @install_open.hide mark_open_installed else error = Qt::MessageBox.new error.setInformativeText("open could not be installed. Please make sure Cydia has finished all tasks and is closed on the device.") error.setIcon(Qt::MessageBox::Critical) error.exec end } @layout.addWidget @install_open, 1, 1 end end |
#open_url_section ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/gui/device_status_dialog.rb', line 117 def open_url_section @openurl_label = Qt::Label.new "<b>openURL</b><br>(Open URL on the device)" @layout.addWidget @openurl_label, 2, 0 if $device.openurl_installed? mark_openurl_installed else end end |
#pbwatcher_section ⇒ Object
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/gui/device_status_dialog.rb', line 155 def pbwatcher_section @pbwatcher_label = Qt::Label.new "<b>pbwatcher</b><br>(idb pasteboard monitor helper)" @layout.addWidget @pbwatcher_label, 4, 0 if $device.pbwatcher_installed? mark_pbwatcher_installed else @install_pbwatcher = Qt::PushButton.new "Install" @install_pbwatcher.connect(SIGNAL(:released)) { $device.install_pbwatcher if $device.pbwatcher_installed? @install_pbwatcher.hide mark_pbwatcher_installed end } @layout.addWidget @install_pbwatcher, 4, 1 end end |
#pcviewer_section ⇒ Object
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/gui/device_status_dialog.rb', line 177 def pcviewer_section @pcviewer_label = Qt::Label.new "<b>pcviewer</b><br>(idb file protection class helper)" @layout.addWidget @pcviewer_label, 5, 0 if $device.pcviewer_installed? mark_pcviewer_installed else @install_pcviewer = Qt::PushButton.new "Install" @install_pcviewer.connect(SIGNAL(:released)) { $device.install_pcviewer if $device.pcviewer_installed? @install_pcviewer.hide mark_pcviewer_installed end } @layout.addWidget @install_pcviewer, 5, 1 end end |
#rsync_section ⇒ Object
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/gui/device_status_dialog.rb', line 221 def rsync_section @rsync_label = Qt::Label.new "<b>rsync</b><br>(folder synchronization)" @layout.addWidget @rsync_label, 7, 0 if $device.rsync_installed? mark_rsync_installed else @install_rsync = Qt::PushButton.new "Install" @install_rsync.connect(SIGNAL(:released)) { $device.install_rsync if $device.rsync_installed? @install_rsync.hide mark_rsync_installed else error = Qt::MessageBox.new error.setInformativeText("rsync could not be installed. Please make sure Cydia has finished all tasks and is closed on the device.") error.setIcon(Qt::MessageBox::Critical) error.exec end } @layout.addWidget @install_rsync, 7, 1 end end |