Improving the promoted products and adding some new screenshots.
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 375 KiB |
Before Width: | Height: | Size: 181 KiB |
BIN
Screenshot from 2024-11-09 02-27-43.png
Normal file
After Width: | Height: | Size: 177 KiB |
BIN
Screenshot from 2024-11-09 02-27-57.png
Normal file
After Width: | Height: | Size: 143 KiB |
BIN
Screenshot from 2024-11-09 02-28-06.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
Screenshot from 2024-11-09 02-28-33.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
Screenshot from 2024-11-09 02-28-47.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
Screenshot from 2024-11-09 02-28-55.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
images/roll-4.jpg
Normal file
After Width: | Height: | Size: 104 KiB |
@ -436,9 +436,12 @@ sub _create_popover_menu( $self, $box ) {
|
|||||||
$file_menu->append( 'Open', 'app.open.' . $self->instance_id );
|
$file_menu->append( 'Open', 'app.open.' . $self->instance_id );
|
||||||
$file_menu->append( 'Save', 'app.save.' . $self->instance_id );
|
$file_menu->append( 'Save', 'app.save.' . $self->instance_id );
|
||||||
$file_menu->append( 'Save as', 'app.save-as.' . $self->instance_id );
|
$file_menu->append( 'Save as', 'app.save-as.' . $self->instance_id );
|
||||||
$help_menu->append( 'About', 'app.about.' . $self->instance_id );
|
$help_menu->append(
|
||||||
$help_menu->append( 'Recommended printers and supplies',
|
'Recommended printers and supplies',
|
||||||
'app.good-printers.' . $self->instance_id );
|
'app.good-printers.' . $self->instance_id
|
||||||
|
);
|
||||||
|
$help_menu->append( 'About and contact',
|
||||||
|
'app.about.' . $self->instance_id );
|
||||||
$menu_model->append_submenu( 'File', $file_menu );
|
$menu_model->append_submenu( 'File', $file_menu );
|
||||||
$menu_model->append_submenu( 'Help', $help_menu );
|
$menu_model->append_submenu( 'Help', $help_menu );
|
||||||
my $popover = Gtk4::PopoverMenuBar->new_from_model($menu_model);
|
my $popover = Gtk4::PopoverMenuBar->new_from_model($menu_model);
|
||||||
@ -459,7 +462,8 @@ sub _show_recommended_printers($self) {
|
|||||||
{
|
{
|
||||||
url => 'https://amzn.to/3V7oV7p',
|
url => 'https://amzn.to/3V7oV7p',
|
||||||
country => 'USA',
|
country => 'USA',
|
||||||
description => 'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported',
|
description =>
|
||||||
|
'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported',
|
||||||
image => 'images/printer-1.jpg',
|
image => 'images/printer-1.jpg',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -469,15 +473,23 @@ sub _show_recommended_printers($self) {
|
|||||||
image => 'images/roll-3.jpg',
|
image => 'images/roll-3.jpg',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url => 'https://amzn.to/3O3DGEd',
|
url => 'https://amzn.to/3YHWT2Z',
|
||||||
|
country => 'USA',
|
||||||
|
description => 'Rolls of thermal stickers',
|
||||||
|
image => 'images/roll-4.jpg',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
url => 'https://amzn.to/48J48fR',
|
||||||
country => 'Europe',
|
country => 'Europe',
|
||||||
description => 'Advertised as having bluetooth and usb support, works fine, Perfectly supported',
|
description =>
|
||||||
|
'Advertised as having bluetooth and usb support, works fine, Perfectly supported',
|
||||||
image => 'images/printer-2.jpg',
|
image => 'images/printer-2.jpg',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
url => 'https://amzn.to/3YXWjj1',
|
url => 'https://amzn.to/3YXWjj1',
|
||||||
country => 'Europe',
|
country => 'Europe',
|
||||||
description => 'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported',
|
description =>
|
||||||
|
'Tested printer, uses standard protocol, advertised as only working by bluetooth but the model I got works by usb too. Perfectly supported',
|
||||||
image => 'images/printer-1.jpg',
|
image => 'images/printer-1.jpg',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -489,38 +501,43 @@ sub _show_recommended_printers($self) {
|
|||||||
{
|
{
|
||||||
url => 'https://amzn.to/4eno7BK',
|
url => 'https://amzn.to/4eno7BK',
|
||||||
country => 'Europe',
|
country => 'Europe',
|
||||||
description => 'Rolls of sticker thermal papel',
|
description => 'Rolls of thermal stickers',
|
||||||
image => 'images/roll-2.jpg',
|
image => 'images/roll-2.jpg',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
$explain->set_markup(
|
$explain->set_markup(
|
||||||
'<b><big>Recommended products:</big></b>
|
'<b><big>Recommended products:</big></b>
|
||||||
|
|
||||||
I get a comission each time you buy one of those using these links.'
|
<small>[PROMOTED CONTENT] I get a comission each time you buy one of those products using these links.</small>'
|
||||||
);
|
);
|
||||||
|
$explain->set_halign('start');
|
||||||
|
|
||||||
$box->append($explain);
|
$box->append($explain);
|
||||||
|
|
||||||
for my $product (@products) {
|
for my $product (@products) {
|
||||||
my $product_box = Gtk4::Box->new( 'horizontal', 10 );
|
my $product_box = Gtk4::Box->new( 'horizontal', 10 );
|
||||||
my $image_file = path(__FILE__)->parent->parent->parent->parent->child($product->{image});
|
my $image_file = path(__FILE__)
|
||||||
|
->parent->parent->parent->parent->child( $product->{image} );
|
||||||
my $image = Gtk4::Image->new_from_file($image_file);
|
my $image = Gtk4::Image->new_from_file($image_file);
|
||||||
$image->set_pixel_size(256);
|
$image->set_pixel_size(256);
|
||||||
$product_box->append($image);
|
$product_box->append($image);
|
||||||
my $right_side_product_box = Gtk4::Box->new( 'vertical', 10 );
|
my $right_side_product_box = Gtk4::Box->new( 'vertical', 10 );
|
||||||
my $label_available_in = Gtk4::Label->new(undef);
|
my $label_available_in = Gtk4::Label->new(undef);
|
||||||
$label_available_in->set_halign('start');
|
$label_available_in->set_halign('start');
|
||||||
$label_available_in->set_markup('<small>Available in: '.$product->{country}.'</small>');
|
$label_available_in->set_markup(
|
||||||
|
'<small>Available in: ' . $product->{country} . '</small>' );
|
||||||
$right_side_product_box->append($label_available_in);
|
$right_side_product_box->append($label_available_in);
|
||||||
my @lines = split /\n/, $product->{description};
|
my @lines = split /\n/, $product->{description};
|
||||||
|
|
||||||
for ( my $i = 0 ; 1 ; $i++ ) {
|
for ( my $i = 0 ; 1 ; $i++ ) {
|
||||||
if ( !( $i < scalar @lines ) ) {
|
if ( !( $i < scalar @lines ) ) {
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
my $line = $lines[$i];
|
my $line = $lines[$i];
|
||||||
my $size_line = 60;
|
my $size_line = 85;
|
||||||
if ( length $line > $size_line ) {
|
if ( length $line > $size_line ) {
|
||||||
splice @lines, $i, 1, substr($line, 0, $size_line), substr($line, $size_line);
|
splice @lines, $i, 1, substr( $line, 0, $size_line ),
|
||||||
|
substr( $line, $size_line );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$product->{description} = join "\n", @lines;
|
$product->{description} = join "\n", @lines;
|
||||||
@ -528,17 +545,20 @@ I get a comission each time you buy one of those using these links.'
|
|||||||
$label_description->set_halign('start');
|
$label_description->set_halign('start');
|
||||||
$right_side_product_box->append($label_description);
|
$right_side_product_box->append($label_description);
|
||||||
my $buy_button = Gtk4::Button->new_with_label('Buy now');
|
my $buy_button = Gtk4::Button->new_with_label('Buy now');
|
||||||
|
$buy_button->set_margin_end(60);
|
||||||
$buy_button->set_halign('end');
|
$buy_button->set_halign('end');
|
||||||
$buy_button->signal_connect(clicked => sub{
|
$buy_button->signal_connect(
|
||||||
|
clicked => sub {
|
||||||
my $launcher = Gtk4::UriLauncher->new( $product->{url} );
|
my $launcher = Gtk4::UriLauncher->new( $product->{url} );
|
||||||
$launcher->launch( $self->window, undef, undef );
|
$launcher->launch( $self->window, undef, undef );
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
$buy_button->set_hexpand(1);
|
||||||
$right_side_product_box->append($buy_button);
|
$right_side_product_box->append($buy_button);
|
||||||
$product_box->append($right_side_product_box);
|
$product_box->append($right_side_product_box);
|
||||||
$box->append($product_box);
|
$box->append($product_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$win->set_child($scroll);
|
$win->set_child($scroll);
|
||||||
$win->set_transient_for( $self->window );
|
$win->set_transient_for( $self->window );
|
||||||
$win->present;
|
$win->present;
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
<release version="v1.0.7" date="2024-11-08">
|
<release version="v1.0.8" date="2024-11-08">
|
||||||
<description>
|
<description>
|
||||||
<p>Adding recommended products to use with the IDE</p>
|
<p>Adding recommended products to use with the IDE</p>
|
||||||
</description>
|
</description>
|
||||||
|