From 10118a94647fab1466bf51f17c131ee34e3c0766 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicol=C3=A1s=20Dimov?= Date: Sat, 8 Nov 2003 22:35:40 +0000 Subject: [PATCH] algunos cambios menores --- Constructor/cistern.cpp | 1 + Constructor/conduct.cpp | 1 + Constructor/splitter.cpp | 19 +++++++++++++++++-- Constructor/splitter.h | 1 + Constructor/union.cpp | 19 +++++++++++++++++-- Constructor/union.h | 1 + 6 files changed, 38 insertions(+), 4 deletions(-) diff --git a/Constructor/cistern.cpp b/Constructor/cistern.cpp index 7fb292d..81d0fad 100644 --- a/Constructor/cistern.cpp +++ b/Constructor/cistern.cpp @@ -13,6 +13,7 @@ Cistern::Cistern() Glib::RefPtr ref = Gnome::Glade::Xml::create("constructor.glade", "cistern_pty_wnd"); ref->get_widget_derived("cistern_pty_wnd",cistern_pty_wnd); cistern_pty_wnd->cistern = this; + cistern_pty_wnd->set_title("Propiedades del Tanque"); } Cistern::~Cistern() diff --git a/Constructor/conduct.cpp b/Constructor/conduct.cpp index 61d3922..aa1c092 100644 --- a/Constructor/conduct.cpp +++ b/Constructor/conduct.cpp @@ -8,6 +8,7 @@ Conduct::Conduct() imgActual = 0; image = imageN; set_size_request(image->get_width(), image->get_height()); + property_wnd->set_title("Propiedades del Tubo"); } Conduct::~Conduct() diff --git a/Constructor/splitter.cpp b/Constructor/splitter.cpp index d017bc6..a9510de 100644 --- a/Constructor/splitter.cpp +++ b/Constructor/splitter.cpp @@ -10,6 +10,7 @@ Splitter::Splitter() imgActual = 0; image = imageO; set_size_request(image->get_width(), image->get_height()); + property_wnd->set_title("Propiedades del Codo"); } Splitter::~Splitter() @@ -43,12 +44,26 @@ bool Splitter::on_button_press_event(GdkEventButton *event) menu_popup.popup(event->button, event->time); return true; //It has been handled. } + + if ((event->type == GDK_2BUTTON_PRESS) && ( event->button == 1)){ + property_wnd->spin_caudal->set_value( caudal_max ); + property_wnd->txt_item_name->set_text( name ); + property_wnd->show(); + } return true; } void Splitter::on_menu_popup_rotar() { GdkEventButton event; - event.type = GDK_BUTTON_PRESS; - event.button = 2; + event.type = GDK_BUTTON_PRESS; + event.button = 2; + Splitter::on_button_press_event(&event); +} + +void Splitter::on_menu_popup_propiedades() +{ + GdkEventButton event; + event.type = GDK_2BUTTON_PRESS; + event.button = 1; Splitter::on_button_press_event(&event); } diff --git a/Constructor/splitter.h b/Constructor/splitter.h index 3c443a0..fac9059 100644 --- a/Constructor/splitter.h +++ b/Constructor/splitter.h @@ -9,6 +9,7 @@ class Splitter : public CItem { virtual ~Splitter(); virtual bool on_button_press_event(GdkEventButton *event); virtual void on_menu_popup_rotar(); + virtual void on_menu_popup_propiedades(); private: int imgActual; diff --git a/Constructor/union.cpp b/Constructor/union.cpp index d1395be..6c5301a 100644 --- a/Constructor/union.cpp +++ b/Constructor/union.cpp @@ -10,6 +10,7 @@ Union::Union() imgActual = 0; image = imageN; set_size_request(image->get_width(), image->get_height()); + property_wnd->set_title("Propiedades del Empalme"); } Union::~Union() @@ -43,13 +44,27 @@ bool Union::on_button_press_event(GdkEventButton *event) menu_popup.popup(event->button, event->time); return true; //It has been handled. } + + if ((event->type == GDK_2BUTTON_PRESS) && ( event->button == 1)){ + property_wnd->spin_caudal->set_value( caudal_max ); + property_wnd->txt_item_name->set_text( name ); + property_wnd->show(); + } return true; } void Union::on_menu_popup_rotar() { GdkEventButton event; - event.type = GDK_BUTTON_PRESS; - event.button = 2; + event.type = GDK_BUTTON_PRESS; + event.button = 2; + Union::on_button_press_event(&event); +} + +void Union::on_menu_popup_propiedades() +{ + GdkEventButton event; + event.type = GDK_2BUTTON_PRESS; + event.button = 1; Union::on_button_press_event(&event); } diff --git a/Constructor/union.h b/Constructor/union.h index c5426e0..5f6279b 100644 --- a/Constructor/union.h +++ b/Constructor/union.h @@ -10,6 +10,7 @@ class Union : public CItem { virtual ~Union(); virtual bool on_button_press_event(GdkEventButton *event); virtual void on_menu_popup_rotar(); + virtual void on_menu_popup_propiedades(); private: int imgActual; -- 2.43.0