Gtk2-GladeXML
view release on metacpan or search on metacpan
examples/fileman.glade view on Meta::CPAN
<property name="label">gtk-home</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_home_button_clicked" last_modification_time="Sat, 15 Nov 2003 23:52:13 GMT"/>
</widget>
<packing>
<property name="new_group">True</property>
</packing>
</child>
<child>
<widget class="button" id="prefs_button">
<property name="visible">True</property>
<property name="label">gtk-preferences</property>
<property name="use_stock">True</property>
<signal name="clicked" handler="on_prefs_button_clicked" last_modification_time="Sat, 15 Nov 2003 23:52:26 GMT"/>
</widget>
<packing>
<property name="new_group">True</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label">
<property name="visible">True</property>
<property name="label" translatable="yes"> Icon size:</property>
examples/fileman.glade view on Meta::CPAN
<child>
<widget class="GtkButton" id="cancelbutton">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-6</property>
<signal name="clicked" handler="on_prefs_cancelbutton_clicked" last_modification_time="Sun, 16 Nov 2003 05:59:19 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="applybutton">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-apply</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-10</property>
<signal name="clicked" handler="on_prefs_applybutton_clicked" last_modification_time="Sun, 16 Nov 2003 05:59:06 GMT"/>
</widget>
</child>
<child>
<widget class="GtkButton" id="okbutton">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-5</property>
<signal name="clicked" handler="on_prefs_okbutton_clicked" last_modification_time="Sun, 16 Nov 2003 05:58:24 GMT"/>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
examples/fileman.pl view on Meta::CPAN
# Signal handlers to match signals defined using Glade-2
#----------------------------------------------------------------------
# Some very simple handlers
sub on_home_button_clicked {ch_dir($home);}
sub on_back_button_clicked {up_dir();}
sub on_location_go_button_clicked {ch_dir($location->get_text());}
sub on_refresh_button_clicked {refresh_fileview();}
sub on_quit_activate {Gtk2->main_quit;}
sub on_prefs_button_clicked {$preferences->show_all;}
sub on_preferences_activate {$preferences->show_all;}
sub on_about_activate {$about->show_all;}
sub on_main_delete_event {Gtk2->main_quit;}
sub on_prefs_cancelbutton_clicked {$preferences->hide;}
sub on_about_okbutton_clicked {$about->hide;}
#----------------------------------------------------------------------
# Handle dialog 'close' (window-decoration induced close)
# * Just hide the dialog, and tell Gtk not to do anything else
#
sub on_dialog_delete_event {
my $w = shift;
$w->hide;
1; # consume this event!
}
#----------------------------------------------------------------------
# Handle preferencess apply click
#
sub on_prefs_applybutton_clicked {
my $context = $status->get_context_id('Main');
$status->push($context, 'Preferences updated');
}
#----------------------------------------------------------------------
# Handle prefs ok click (apply/dismiss dialog)
#
sub on_prefs_okbutton_clicked {
on_prefs_applybutton_clicked();
$preferences->hide;
}
#----------------------------------------------------------------------
# Handle key presses in location text edit control
# * Translate a Return/Enter key into a 'Go' command
# * All other key presses left for GTK
#
sub on_location_entry_key_release_event {
my $widget = shift;
( run in 1.006 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )