#!/usr/bin/perl
  use strict;
  use Gtk2 -init;
  use Gtk2::GladeXML;

  
  my $programa = Gtk2::GladeXML->new('prueba5.glade');
  
  my $ventana_principal = $programa->get_widget('ventana_principal');
  my $etiqueta = $programa->get_widget('etiqueta');
  

  my $widget_entrada_de_texto = $programa->get_widget('entrada_texto');
  my $combo_uno = $programa->get_winget('combo_ent1');
  my $combo_dos = $programa->get_winget('combo_ent2');

  
  $programa->signal_autoconnect_from_package('main');
  
  $ventana_principal->show_all();
  
  Gtk2->main;
  
  sub on_button1_clicked {Gtk2->main_quit;}

  sub on_recoger_clicked {

  	my ($texto_introducido);
 	my $com1 = $combo_uno->get_active_text();
	my $com2 = $combo_dos->get_active_text();
          
  	$texto_introducido = $widget_entrada_de_texto->get_text();
          
  
  	$etiqueta->set_markup("el contiene : <b>combo 1</b> <span foreground=\"blue\">$com1</span> 
El combo 2 contiene: <i>combo 2</i> ->> <span foreground=\"blue\">$com2</span> y el texto introducido es ->> <span foreground=\"blue\">$texto_introducido</span>");
  }
