From: Mikko Rasa Date: Sat, 24 Oct 2009 15:04:11 +0000 (+0000) Subject: Get rid of the draw_labels and blend variables X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d44d45bee2c3b6b5a8822ecdc23528dcf039ee2a;p=netvis.git Get rid of the draw_labels and blend variables --- diff --git a/source/netvis.cpp b/source/netvis.cpp index bcdba3f..fb02c0d 100644 --- a/source/netvis.cpp +++ b/source/netvis.cpp @@ -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(user); diff --git a/source/netvis.h b/source/netvis.h index 3739d33..eb8c0a8 100644 --- a/source/netvis.h +++ b/source/netvis.h @@ -43,8 +43,6 @@ private: std::map disabled_hosts; std::list packets; std::map 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 *);