fixed restore window size; added file:/// into placeholder

This commit is contained in:
Artem Anufrij 2018-10-18 22:10:56 +02:00
parent 20c4527142
commit bf014d3560
4 changed files with 10 additions and 6 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
build/

4
.vscode/tasks.json vendored
View file

@ -4,9 +4,9 @@
"version": "2.0.0",
"tasks": [
{
"label": "make",
"label": "ninja",
"type": "shell",
"command": "cd ${workspaceFolder}/build && make",
"command": "cd ${workspaceFolder}/build && ninja",
"group": {
"kind": "build",
"isDefault": true

View file

@ -207,8 +207,11 @@ namespace Webpin {
private void store_settings () {
settings.window_state = (this.is_maximized ? Settings.WindowState.MAXIMIZED: Settings.WindowState.NORMAL);
if (settings.window_state == Settings.WindowState.NORMAL) {
settings.window_height = this.get_allocated_height ();
settings.window_width = this.get_allocated_width ();
int width, height;
this.get_size (out width, out height);
settings.window_height = height;
settings.window_width = width;
}
}
}

View file

@ -91,7 +91,7 @@ namespace Webpin.Widgets.Views {
app_name_entry.set_placeholder_text (_ ("Application name"));
app_url_entry = new Gtk.Entry ();
app_url_entry.set_placeholder_text (_ ("https://myapp.domain"));
app_url_entry.set_placeholder_text (_ ("https://myapp.domain or file:///my/local/file"));
//icon selector popover
icon_selector_popover = new Gtk.Popover (icon_button);
@ -176,7 +176,7 @@ namespace Webpin.Widgets.Views {
reset_grab_color_and_icon ();
app_url_entry.get_style_context ().add_class ("error");
app_url_entry.set_icon_from_icon_name (Gtk.EntryIconPosition.SECONDARY, "dialog-information");
app_url_entry.set_icon_tooltip_text (Gtk.EntryIconPosition.SECONDARY, _ ("url must start with http:// or https://"));
app_url_entry.set_icon_tooltip_text (Gtk.EntryIconPosition.SECONDARY, _ ("url must start with http:// or https:// or file:///"));
app_url_valid = false;
} else {
grab_color_and_icon ();