]> git.tdb.fi Git - netvis.git/commitdiff
Get rid of the draw_labels and blend variables
authorMikko Rasa <tdb@tdb.fi>
Sat, 24 Oct 2009 15:04:11 +0000 (15:04 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sat, 24 Oct 2009 15:04:11 +0000 (15:04 +0000)
source/netvis.cpp
source/netvis.h

index bcdba3f28c6314ff1ebf72a9891181e797dba08d..fb02c0dde99d13828a35d07c38e5b5ecf6c8bd9f 100644 (file)
@@ -42,8 +42,6 @@ NetVis::NetVis(int argc, char **argv):
        font(0),
        max_hosts(1000),
        max_visible_hosts(30),
-       draw_labels(true),
-       blend(true),
        frames(0)
 {
        if(argc<2)
@@ -67,7 +65,6 @@ NetVis::NetVis(int argc, char **argv):
        wnd = new Graphics::SimpleGLWindow(1024, 768);
        wnd->set_title("NetVis");
        wnd->signal_close.connect(sigc::bind(sigc::mem_fun(this, &NetVis::exit), 0));
-       wnd->signal_key_press.connect(sigc::mem_fun(this, &NetVis::key_press));
        wnd->show();
 
        GL::enable(GL::BLEND);
@@ -255,17 +252,6 @@ const Port &NetVis::get_port(unsigned number)
        return *port;
 }
 
-void NetVis::key_press(unsigned key, unsigned, wchar_t)
-{
-       if(key==46)
-               draw_labels = !draw_labels;
-       else if(key==56)
-       {
-               blend = !blend;
-               GL::set(GL_BLEND, blend);
-       }
-}
-
 void NetVis::capture_handler(unsigned char *user, const pcap_pkthdr *, const unsigned char *data)
 {
        NetVis *self = reinterpret_cast<NetVis *>(user);
index 3739d330ec941de08c03c2698a576269bcfa4b7a..eb8c0a8e9d66fab276be8e6cd93687302a11db78 100644 (file)
@@ -43,8 +43,6 @@ private:
        std::map<unsigned, Host *> disabled_hosts;
        std::list<Packet *> packets;
        std::map<unsigned, Port *> ports;
-       bool draw_labels;
-       bool blend;
 
        Msp::Time::TimeStamp tick_t;
        Msp::Time::TimeStamp fps_t;
@@ -64,7 +62,6 @@ private:
        Host &get_host(unsigned);
        Msp::GL::Color generate_color(bool) const;
        const Port &get_port(unsigned);
-       void key_press(unsigned, unsigned, wchar_t);
 
        static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);