Gtk2-Ex-ICal-Recur

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

version_from: lib/Gtk2/Ex/ICal/Recur.pm
installdirs:  site
requires:
    Data::Dumper:                  0
    DateTime::Event::ICal:         0
    Glib:                          0
    Gtk2:                          0
    Gtk2::Ex::CalendarButton:      0
    Gtk2::Ex::ICal::Recur::Selection: 0
    Gtk2::Ex::Simple::List:        0
    Gtk2::Ex::Simple::Menu:        0
    Test::More:                    0

distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.30_01

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;

WriteMakefile(
    NAME                => 'Gtk2::Ex::ICal::Recur',
    AUTHOR              => 'Ofey Aikon <ofey.aikon@gmail.com>',
    VERSION_FROM        => 'lib/Gtk2/Ex/ICal/Recur.pm',
    PL_FILES            => {},
    PREREQ_PM => {
        'Test::More' => 0,
        'Gtk2' => 0,
        'Gtk2::Ex::Simple::Menu' => 0,
        'Gtk2::Ex::Simple::List' => 0,
        'Gtk2::Ex::ICal::Recur::Selection' => 0,
        'Gtk2::Ex::CalendarButton' => 0,
        'DateTime::Event::ICal' => 0,
        'Glib' => 0,
        'Data::Dumper' => 0,
    },
    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
    clean               => { FILES => 'Gtk2-Ex-ICal-Recur-*' },
);

examples/blank-start.pl  view on Meta::CPAN

use strict;
use warnings;
use Gtk2 '-init';
use Gtk2::Ex::ICal::Recur;
use Gtk2::Ex::Simple::Menu;
use Gtk2::Ex::Simple::List;
use Glib qw /TRUE FALSE/;
use Data::Dumper;

my $recur = Gtk2::Ex::ICal::Recur->new;

my $window = Gtk2::Window->new;
$window->signal_connect(destroy => sub { Gtk2->main_quit; });

my $vbox = Gtk2::VBox->new(FALSE);

examples/pre-populated-1.pl  view on Meta::CPAN

use Gtk2 '-init';
use Gtk2::Ex::ICal::Recur;
use Gtk2::Ex::Simple::Menu;
use Gtk2::Ex::Simple::List;
use Glib qw /TRUE FALSE/;
use Data::Dumper;

my $recur = Gtk2::Ex::ICal::Recur->new;
my $model1 = {
	'dtstart' => { 
		year => 2000,
		month  => 6,
		day    => 20,

examples/pre-populated-2.pl  view on Meta::CPAN

use Gtk2 '-init';
use Gtk2::Ex::ICal::Recur;
use Gtk2::Ex::Simple::Menu;
use Gtk2::Ex::Simple::List;
use Glib qw /TRUE FALSE/;
use Data::Dumper;

my $recur = Gtk2::Ex::ICal::Recur->new;
my $model2 = {
	'dtstart' => { 
		year => 2000,
		month  => 6,
		day    => 20,

lib/Gtk2/Ex/ICal/Recur.pm  view on Meta::CPAN

package Gtk2::Ex::ICal::Recur;

our $VERSION = '0.06';

use strict;
use warnings;
use Gtk2 '-init';
use Gtk2::Ex::Simple::Menu;
use Gtk2::Ex::Simple::List;
use Glib qw /TRUE FALSE/;
use Data::Dumper;
use Gtk2::Ex::ICal::Recur::Selection;
use DateTime::Event::ICal;
use Gtk2::Ex::CalendarButton;

###########################################################
# There are four public methods. The rest are all private #
###########################################################

lib/Gtk2/Ex/ICal/Recur.pm  view on Meta::CPAN

					children => [
						'by day' => {
							item_type  => '<Branch>',
							children => $self->{icalselection}->month_day_by_day($callback),
						},
					],
				},
			];
		}
	}
	my $menu = Gtk2::Ex::Simple::Menu->new(menu_tree => $menu_tree);
	my $temphash = {};
	$temphash->{simplemenu} = $menu;
	$temphash->{label} = $label;
	return $temphash;
}

sub day_of_the_week {
	my ($self, $level, $count) = @_;
	my $label = Gtk2::Label->new;
	$label->set_markup('<span foreground="red">choose a day of the week</span>');	

lib/Gtk2/Ex/ICal/Recur.pm  view on Meta::CPAN

		#$self->{recurbox}->{buttons}->[$level]->[$count]->{next}->set_sensitive(TRUE);
		$self->{recurbox}->{buttons}->[$level]->[$count]->{remove}->set_sensitive(TRUE);
	};
	my $menu_tree = [
		'^'  => {
			item_type  => '<Branch>',
			children => $self->{icalselection}->week_day($callback),
		},
	];

	my $menu = Gtk2::Ex::Simple::Menu->new(menu_tree => $menu_tree);
	my $temphash = {};
	$temphash->{simplemenu} = $menu;
	$temphash->{label} = $label;
	return $temphash;
}

sub month_or_day_of_the_year {
	my ($self, $level, $count) = @_;
	my $label = Gtk2::Label->new;
	$label->set_markup('<span foreground="red">choose a month/week/day</span>');

lib/Gtk2/Ex/ICal/Recur.pm  view on Meta::CPAN

						'by day of the year' => {
							item_type  => '<Branch>',
							children => $self->{icalselection}->day_of_the_year($callback),
						},
					],
				},
			];
		}				
	}

	my $menu = Gtk2::Ex::Simple::Menu->new(menu_tree => $menu_tree);
	my $temphash = {};
	$temphash->{simplemenu} = $menu;
	$temphash->{label} = $label;
	return $temphash;
}

1;

__END__



( run in 1.741 second using v1.01-cache-2.11-cpan-49f99fa48dc )