version 0.5.0_alpha
git-svn-id: svn://db.shs.com.ru/pip@8 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Remote console viewer
|
||||
Copyright (C) 2014 Ivan Pelipenko peri4ko@gmail.com
|
||||
Copyright (C) 2015 Ivan Pelipenko peri4ko@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -19,15 +19,15 @@
|
||||
|
||||
#include "pip.h"
|
||||
|
||||
void key_event(char key, void * );
|
||||
void key_event(PIKbdListener::KeyEvent key, void * );
|
||||
|
||||
PIConsole console(false, key_event);
|
||||
PIStringList as;
|
||||
bool selected = false;
|
||||
|
||||
void key_event(char key, void * ) {
|
||||
if (key < '1' || key > '9') return;
|
||||
int ind = key - '1';
|
||||
void key_event(PIKbdListener::KeyEvent key, void * ) {
|
||||
if (key.key < '1' || key.key > '9') return;
|
||||
int ind = key.key - '1';
|
||||
if (ind < 0 || ind >= as.size_s()) return;
|
||||
selected = true;
|
||||
console.connectToServer(as[ind]);
|
||||
|
||||
Reference in New Issue
Block a user