| 1 | package Gapp::Actions::Form; | ||
| 2 | { | ||
| 3 | $Gapp::Actions::Form::VERSION = '0.60'; | ||
| 4 | } | ||
| 5 | |||
| 6 | use Gapp::Actions -declare => [qw( | ||
| 7 | Cancel | ||
| 8 | Ok | ||
| 9 | Apply | ||
| 10 | )]; | ||
| 11 | |||
| 12 | |||
| 13 | action Apply => ( | ||
| 14 | name => 'Apply', | ||
| 15 | label => 'Apply', | ||
| 16 | mnemonic => '_Apply', | ||
| 17 | tooltip => 'Apply', | ||
| 18 | icon => 'gtk-apply', | ||
| 19 | code => sub { | ||
| 20 | my ( $action, $widget, $userargs, $gtkw, $gtkargs ) = @_; | ||
| 21 | |||
| 22 | my $form = $widget->form; | ||
| 23 | |||
| 24 | $form->apply; | ||
| 25 | } | ||
| 26 | ); | ||
| 27 | |||
| 28 | action Cancel => ( | ||
| 29 | name => 'Cancel', | ||
| 30 | label => 'Cancel', | ||
| 31 | mnemonic => '_Cancel', | ||
| 32 | tooltip => 'Cancel', | ||
| 33 | icon => 'gtk-cancel', | ||
| 34 | code => sub { | ||
| 35 | my ( $action, $widget, $userargs, $gtkw, $gtkargs ) = @_; | ||
| 36 | my $form = $widget->form; | ||
| 37 | $form->cancel; | ||
| 38 | } | ||
| 39 | ); | ||
| 40 | |||
| 41 | action Ok => ( | ||
| 42 | name => 'Ok', | ||
| 43 | label => 'Ok', | ||
| 44 | mnemonic => '_Ok', | ||
| 45 | tooltip => 'Ok', | ||
| 46 | icon => 'gtk-ok', | ||
| 47 | code => sub { | ||
| 48 | my ( $action, $widget, $userargs, $gtkw, $gtkargs ) = @_; | ||
| 49 | my $form = $widget->form; | ||
| 50 | $form->ok; | ||
| 51 | } | ||
| 52 | ); | ||
| 53 | |||
| 54 | 1; |