Applications-BackupAndRestore

 view release on metacpan or  search on metacpan

lib/Applications/BackupAndRestore.pm  view on Meta::CPAN

<img src="BackupAndRestore/pod/BackupAndRestore.png"><br>

=end html

=head1

To start up Backup & Restore from a terminal window, type B<BackupAndRestore> and then press C<Enter>.

Backup & Restore has a List View where you see every single backup with time, date, changed files and the exact space required on your harddrive.

Above the list view there is a File Chooser Button where you can select a folder to backup. Position the cursor over  File Chooser Button and press the right mouse button. A pop-up menu appears. Choose a folder from the pop-up menu. Drag a folder ico...

Right hand to the File Chooser Button there is a Recycle Button. The recycle button keeps a list of folders you have saved. For example, place the cursor over the recycle button on a Backup & Restore window; then press the left mouse button to see a ...

Below the list view there is a backup button.

=head2 Backup In Progress Notification

The Backup In Progress Notification is illustrated in Figure 1-2. 

=head3 Figure 1-2.  Backup In Progress Notification

=begin html

lib/Gtk2/Ex/FileLocator/PathnameField.pm  view on Meta::CPAN

      [qw/readable writable/]
   ),
  ],
  signals =>
  { scroll_offset_changed => { param_types => [qw(Glib::Scalar)], }, },
  ;

sub INIT_INSTANCE {
   my ($this) = @_;

   $this->{cursorPosition} = 0;

   my $entry = new Gtk2::Entry;
   $entry->add_events('key-release-mask');

   $entry->signal_connect(
      'key-release-event' => \&on_key_release_event,
      $this
   );

   #$entry->signal_connect_after( 'move-cursor' => \&on_move_cursor, $this );
   #$entry->signal_connect( 'event' => \&on_event, $this );
   $entry->show;

   $this->set( 'entry', $entry );
   $this->add($entry);

   $this->get('chooser')
     ->signal_connect( 'selection_changed', sub { $this->change_text } );
}

lib/Gtk2/Ex/FileLocator/PathnameField.pm  view on Meta::CPAN

        and file_open( $this->get_filename );

   return
     if $event->keyval == $Gtk2::Gdk::Keysyms{Return}
        and file_open( $this->get_filename );

   $this->signal_emit( 'scroll_offset_changed', $entry->get("scroll-offset") );

   return if $this->get_filename eq $entry->get_text;

   $this->{cursorPosition} = $this->get('entry')->get_position;
   #$this->set_filename( $entry->get_text );

   my $uri = sprintf "file://%s", $entry->get_text;
	$this->set_uri( -e $entry->get_text ? $uri : "" );

   #Gtk2->main_iteration while Gtk2->events_pending;
   #$this->signal_emit( 'scroll_offset_changed', $entry->get("scroll-offset") );

   return;
}

lib/Gtk2/Ex/FileLocator/PathnameField.pm  view on Meta::CPAN


   my $string = $this->get('entry')->get_text;
   my $match  = string_shell_complete($string);

   if ( $string ne $match ) {
      $this->get('entry')->set_text($match);
      $this->get('entry')->set_position( length $match );

      my $uri = sprintf "file://%s", $this->get('entry')->get_text;
		
	   $this->{cursorPosition} = -1;

		$this->set_uri($uri);
      $this->signal_emit( 'file_activated', $uri );


      return TRUE;
   }

   return;
}

lib/Gtk2/Ex/FileLocator/PathnameField.pm  view on Meta::CPAN


   my $filename = string_shell_unescape($this->get_filename);
   $filename .= "/" if -d $filename;

   $filename =~ s|/+|/|sgo;

   $filename = Unicode::MapUTF8::from_utf8(
      { -string => $filename, -charset => 'ISO-8859-1' } );
   $this->{filename} = $filename;
   $this->get('entry')->set_text($filename);
   $this->get('entry')->set_position( $this->{cursorPosition} );

#   Gtk2->main_iteration while Gtk2->events_pending;
#   $this->signal_emit( 'scroll_offset_changed',
#      $this->get('entry')->get("scroll-offset") );
}

#sub on_move_cursor {
#   my ($this) = @_;
#   $this->{cursorPosition} = $this->get_position;
#   Gtk2->main_iteration while Gtk2->events_pending;
#   $this->signal_emit( 'scroll_offset_changed', $this->get("scroll-offset") );
#   return;
#}

#sub on_event {
#   my ( $this, $event ) = @_;
#   return unless $event->type eq 'motion-notify' or $event->type eq 'expose';
#
#   #printf "on_event %s %s\n", $event->type, $this->get("scroll-offset");
#   $this->{cursorPosition} = $this->get('entry')->get_position;
#   $this->signal_emit( 'scroll_offset_changed',
#      $this->get('entry')->get("scroll-offset") );
#   0;
#}

1;
__END__
sub on_key_release_event {
	my ($this) = @_;
	$this->set_text( $this->get_text );

lib/Gtk2/Ex/FileLocator/PathnameField.pm  view on Meta::CPAN

	$this->signal_emit( 'file_activated', $this->get_text );
	0;
}
sub auto_complete {
	my $this = shift;
	printf "auto_complete %s\n", $this->get_text;

	my $original = $this->get_text;

	my $string = $this->get_text;
	my $substr = substr $string, 0, $this->get('cursor-position');

	$string =~ s|/*$||sgo;

	printf "string %s\n", $string;
	printf "substr %s\n", $substr;

	if ( -e $substr ) {
		printf "v1\n";
		if ( -d $string ) {
			$string = "$string/";



( run in 0.333 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )