/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to mandos-monitor

* mandos-monitor (MandosClientWidget): Change "StopChecker" key to "S"
                                       and changed "CheckedOK" key to
                                       "C".
  (UserInterface.__init__): Show version number and brief help on start.
  (UserInterface.process_input): Help key now shows help in log
                                 buffer, and shows log buffer if
                                 hidden.  Commented out
                                 non-implemented keys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
                                                  .object_path)
156
156
        elif key == u"s":
157
157
            self.proxy.StartChecker()
158
 
        elif key == u"c":
 
158
        elif key == u"S":
159
159
            self.proxy.StopChecker()
160
 
        elif key == u"S":
 
160
        elif key == u"C":
161
161
            self.proxy.CheckedOK()
162
162
        # xxx
163
163
#         elif key == u"p" or key == "=":
250
250
        self.log_wrap = u"any"
251
251
        
252
252
        self.rebuild()
253
 
        self.log_message(u"Message")
254
 
        self.log_message(u"Message0 Message1 Message2 Message3 Message4 Message5 Message6 Message7 Message8 Message9")
255
 
        self.log_message(u"Message10 Message11 Message12 Message13 Message14 Message15 Message16 Message17 Message18 Message19")
256
 
        self.log_message(u"Message20 Message21 Message22 Message23 Message24 Message25 Message26 Message27 Message28 Message29")
 
253
        self.log_message((u"bold",
 
254
                          u"Mandos Monitor version " + version))
 
255
        self.log_message((u"bold",
 
256
                          u"q: Quit  ?: Help"))
257
257
        
258
258
        self.busname = domain + '.Mandos'
259
259
        self.main_loop = gobject.MainLoop()
430
430
                self.change_log_display()
431
431
                self.refresh()
432
432
            elif key == u"?" or key == u"f1":
433
 
                self.log_message(u"Help!")
 
433
                if not self.log_visible:
 
434
                    self.log_visible = True
 
435
                    self.rebuild()
 
436
                self.log_message((u"bold",
 
437
                                  u"  ".join((u"q: Quit",
 
438
                                              u"?: Help",
 
439
                                              u"l: Log window toggle",
 
440
                                              u"TAB: Switch window",
 
441
                                              u"w: Wrap (log)"))))
 
442
                self.log_message((u"bold",
 
443
                                  u"  ".join((u"Clients:",
 
444
                                              u"e: Enable",
 
445
                                              u"d: Disable",
 
446
                                              u"r: Remove",
 
447
                                              u"s: Start new checker",
 
448
                                              u"S: Stop checker",
 
449
                                              u"C: Checker OK"))))
434
450
                self.refresh()
435
451
            elif key == u"tab":
436
452
                if self.topwidget.get_focus() is self.logbox:
438
454
                else:
439
455
                    self.topwidget.set_focus(self.logbox)
440
456
                self.refresh()
441
 
            elif (key == u"end" or key == u"meta >" or key == u"G"
442
 
                  or key == u">"):
443
 
                pass            # xxx end-of-buffer
444
 
            elif (key == u"home" or key == u"meta <" or key == u"g"
445
 
                  or key == u"<"):
446
 
                pass            # xxx beginning-of-buffer
447
 
            elif key == u"ctrl e" or key == u"$":
448
 
                pass            # xxx move-end-of-line
449
 
            elif key == u"ctrl a" or key == u"^":
450
 
                pass            # xxx move-beginning-of-line
451
 
            elif key == u"ctrl b" or key == u"meta (" or key == u"h":
452
 
                pass            # xxx left
453
 
            elif key == u"ctrl f" or key == u"meta )" or key == u"l":
454
 
                pass            # xxx right
455
 
            elif key == u"a":
456
 
                pass            # scroll up log
457
 
            elif key == u"z":
458
 
                pass            # scroll down log
 
457
            #elif (key == u"end" or key == u"meta >" or key == u"G"
 
458
            #      or key == u">"):
 
459
            #    pass            # xxx end-of-buffer
 
460
            #elif (key == u"home" or key == u"meta <" or key == u"g"
 
461
            #      or key == u"<"):
 
462
            #    pass            # xxx beginning-of-buffer
 
463
            #elif key == u"ctrl e" or key == u"$":
 
464
            #    pass            # xxx move-end-of-line
 
465
            #elif key == u"ctrl a" or key == u"^":
 
466
            #    pass            # xxx move-beginning-of-line
 
467
            #elif key == u"ctrl b" or key == u"meta (" or key == u"h":
 
468
            #    pass            # xxx left
 
469
            #elif key == u"ctrl f" or key == u"meta )" or key == u"l":
 
470
            #    pass            # xxx right
 
471
            #elif key == u"a":
 
472
            #    pass            # scroll up log
 
473
            #elif key == u"z":
 
474
            #    pass            # scroll down log
459
475
            elif self.topwidget.selectable():
460
476
                self.topwidget.keypress(self.size, key)
461
477
                self.refresh()