Merge lp:~clicompanion-devs/clicompanion/branch-km0r3 into lp:clicompanion

Proposed by Kenny Meyer
Status: Merged
Approved by: Duane Hinnen
Approved revision: 25
Merged at revision: 27
Proposed branch: lp:~clicompanion-devs/clicompanion/branch-km0r3
Merge into: lp:clicompanion
Diff against target: 76 lines (+26/-15)
2 files modified
.clicompanion (+11/-11)
clicompanion.0.0.7.py (+15/-4)
To merge this branch: bzr merge lp:~clicompanion-devs/clicompanion/branch-km0r3
Reviewer Review Type Date Requested Status
Duane Hinnen Approve
Review via email: mp+31806@code.launchpad.net

Description of the change

Fixed lp:611145

To post a comment you must log in.
Revision history for this message
Duane Hinnen (duanedesign) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.clicompanion'
--- .clicompanion 2010-08-01 04:10:34 +0000
+++ .clicompanion 2010-08-05 00:43:40 +0000
@@ -1,15 +1,15 @@
1dpkg -l: package : Find version of a package1dpkg -l: package : Find version of a package
2df -h : : file system disk space usage2df -h: : file system disk space usage
3free -m : : show RAM usage3free -m: : show RAM usage
4ps auxww | grep : process : displays information about the active process4ps auxww | grep: process : displays information about the active process
5iwconfig : : Display wireless network information5iwconfig: : Display wireless network information
6ifconfig -a : : displays the status of the currently active interfaces6ifconfig -a: : displays the status of the currently active interfaces
7sudo iwlist : : scan Scan Wireless networks7sudo iwlist: : scan Scan Wireless networks
8sudo /etc/init.d/networking restart : : Reset the Network8sudo /etc/init.d/networking restart: : Reset the Network
9lsb_release -a : : What version of Ubuntu do I have?9lsb_release -a: : What version of Ubuntu do I have?
10uname -a : : What kernel am I running10uname -a: : What kernel am I running
11sudo apt-get update && sudo apt-get upgrade : : Refresh update info and update all packages 11sudo apt-get update && sudo apt-get upgrade: : Refresh update info and update all packages
12sudo apt-get clean : : clear out all packages in /var/cache/apt/archives12sudo apt-get clean: : clear out all packages in /var/cache/apt/archives
13sudo apt-get autoclean : : clear out obsolete packages(packages with a newer release)13sudo apt-get autoclean : : clear out obsolete packages(packages with a newer release)
14apt-cache search :package : Find information on a package (not installed)14apt-cache search :package : Find information on a package (not installed)
15sudo lshw : : List hardware 15sudo lshw : : List hardware
1616
=== modified file 'clicompanion.0.0.7.py'
--- clicompanion.0.0.7.py 2010-08-01 04:10:34 +0000
+++ clicompanion.0.0.7.py 2010-08-05 00:43:40 +0000
@@ -228,10 +228,10 @@
228 # Python raises a TypeError if row data doesn't exist. Catch228 # Python raises a TypeError if row data doesn't exist. Catch
229 # that and fail silently.229 # that and fail silently.
230 pass230 pass
231 231
232 modelfilter.set_visible_func(search, search_term) 232 modelfilter.set_visible_func(search, search_term)
233 self.treeview.set_model(modelfilter)233 self.treeview.set_model(modelfilter)
234 234
235 #send the command to the terminal235 #send the command to the terminal
236 def run_command(self, widget, data=None):236 def run_command(self, widget, data=None):
237 global ROW237 global ROW
@@ -248,15 +248,26 @@
248 Companion.vte.feed_child(cmnd+"\n") #send command248 Companion.vte.feed_child(cmnd+"\n") #send command
249 Companion.vte.show()249 Companion.vte.show()
250 Companion.vte.grab_focus()250 Companion.vte.grab_focus()
251 251
252 #open the man page for selected command252 #open the man page for selected command
253 def man_page(self, widget, data=None):253 def man_page(self, widget, data=None):
254 row_int = int(ROW[0][0]) # removes everything but number from EX: [5,]254 row_int = int(ROW[0][0]) # removes everything but number from EX: [5,]
255 cmnd = CMNDS[row_int] #CMNDS is where commands are store255 cmnd = CMNDS[row_int] #CMNDS is where commands are store
256 splitcommand=cmnd.split(" ")256 splitcommand = self._filter_sudo_from(cmnd.split(" "))
257 Companion.vte.feed_child("man "+splitcommand[0]+"| most \n") #send command257 Companion.vte.feed_child("man "+splitcommand[0]+"| most \n") #send command
258 self.vte.grab_focus()258 self.vte.grab_focus()
259 Companion.vte.show()259 Companion.vte.show()
260
261 @staticmethod
262 def _filter_sudo_from(command):
263 """Filter the sudo from `command`, where `command` is a list.
264
265 Return the command list with the "sudo" filtered out.
266 """
267 if command[0].startswith("sudo"):
268 del command[0]
269 return command
270 return command
260 271
261 # open file containing command dictionary and put it in a variable272 # open file containing command dictionary and put it in a variable
262 def update(self):273 def update(self):

Subscribers

People subscribed via source and target branches