Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
teejee2008 committed Jul 21, 2019
1 parent 8bf3cb6 commit d8d191a
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 17 deletions.
34 changes: 27 additions & 7 deletions src/Gtk/GeneralBox.vala
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,26 @@ public class GeneralBox : Gtk.Box {
var expander = new Gtk.Label("");
expander.vexpand = true;
vbox_main.add(expander);

var bbox1 = new Gtk.ButtonBox(Orientation.HORIZONTAL);
bbox1.set_layout(Gtk.ButtonBoxStyle.CENTER);
vbox_main.add(bbox1);

var btn = new Gtk.Button.with_label("New Version Available");
bbox1.add(btn);

btn.clicked.connect(()=>{
var win = new VersionMessageWindow(window);
});

string css = "font-size: 20px; font-weight: bold;";

gtk_apply_css({ btn }, css);

expander = new Gtk.Label("");
expander.vexpand = true;
vbox_main.add(expander);


var hbox = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 6);
//hbox.margin_bottom = 6;
Expand All @@ -459,19 +479,19 @@ public class GeneralBox : Gtk.Box {

var bbox = add_link_box();

var button = new Gtk.LinkButton.with_label("", _("Donate"));
bbox.add(button);
//var button = new Gtk.LinkButton.with_label("", _("Donate"));
//bbox.add(button);

button.clicked.connect(() => {
var win = new DonationWindow(window);
win.show();
});
//button.clicked.connect(() => {
// var win = new DonationWindow(window);
// win.show();
//});

// user manual

//bbox = add_link_box();

button = new Gtk.LinkButton.with_label("", _("User Manual"));
var button = new Gtk.LinkButton.with_label("", _("User Manual"));
bbox.add(button);

button.clicked.connect(() => {
Expand Down
5 changes: 5 additions & 0 deletions src/Gtk/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ public class MainWindow : Window {

guimode_changed();

return false;
});

Timeout.add(20000, ()=>{

show_paid_version_message();

return false;
Expand Down
32 changes: 22 additions & 10 deletions src/Gtk/VersionMessageWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ public class VersionMessageWindow : Gtk.Window {

msg_title = _("New Version Available");

msg_body = _("This version of Aptik is more than a year old and is no longer maintained. There may be issues when restoring to newer distributions.\n\nA paid version of Aptik is now available with more features and better support.");
msg_body = _("This version of Aptik is more than a year old and is no longer maintained. There may be issues when restoring to newer distributions.\n\nA paid version of Aptik is now available with more features.");

msg_body = "<span size=\"large\" weight=\"bold\">%s</span>\n\n%s".printf(msg_title, msg_body);

init_window();

show_all();

set_size_request(350, 200);
set_size_request(500, 200);
}

public void init_window () {
Expand All @@ -91,12 +91,12 @@ public class VersionMessageWindow : Gtk.Window {

// img
var img = new Image.from_icon_name(icon_name, Gtk.IconSize.DIALOG);
img.margin_right = 12;
//img.margin_right = 12;
hbox_contents.add(img);

// vbox_msg
var vbox_msg = new Gtk.Box(Orientation.VERTICAL, 24);
vbox_msg.margin_right = 6;
//vbox_msg.margin_right = 6;
hbox_contents.add(vbox_msg);

// lbl_msg
Expand All @@ -108,15 +108,27 @@ public class VersionMessageWindow : Gtk.Window {
lbl_msg.wrap_mode = Pango.WrapMode.WORD;
//hbox_contents.add(lbl_msg);

vbox_msg.add(lbl_msg);

// sw_msg
sw_msg = new ScrolledWindow(null, null);
//sw_msg = new ScrolledWindow(null, null);
//sw_msg.set_shadow_type (ShadowType.ETCHED_IN);
sw_msg.add (lbl_msg);
sw_msg.expand = true;
sw_msg.hscrollbar_policy = PolicyType.NEVER;
sw_msg.vscrollbar_policy = PolicyType.AUTOMATIC;
//sw_msg.add (lbl_msg);
//sw_msg.expand = true;
//sw_msg.hscrollbar_policy = PolicyType.NEVER;
//sw_msg.vscrollbar_policy = PolicyType.AUTOMATIC;
//sw_msg.set_size_request();
vbox_msg.add(sw_msg);
//vbox_msg.add(sw_msg);

//website
var link = new LinkButton("https://teejeetech.in/2019/07/14/aptik-v19-07/");
link.xalign = 0.0f;
link.margin_top = 5;
vbox_msg.add(link);

link.activate_link.connect(()=>{
return xdg_open("https://teejeetech.in/2019/07/14/aptik-v19-07/");
});

// actions
var hbox_actions = new Gtk.Box(Orientation.HORIZONTAL, 6);
Expand Down

0 comments on commit d8d191a

Please sign in to comment.