sbirkmann / phpdesktop

Automatically exported from code.google.com/p/phpdesktop
0 stars 0 forks source link

Add application settings file: settings.json #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In settings file we could have options for customizing application's window, 
some of the options might allow setting:
 * default window size
 * minimum/maximum window size when resizing
 * disable maximize button
 * center the window on the screen

Original issue reported on code.google.com by czarek.t...@gmail.com on 13 Jan 2013 at 1:19

GoogleCodeExporter commented 9 years ago
Minimum & maximum window size is set in MainFrame::OnGetMinMaxInfo().

Original comment by czarek.t...@gmail.com on 14 Jan 2013 at 7:46

GoogleCodeExporter commented 9 years ago
Maximize box can be disabled with this code:

    mainFrame.SetWindowLongW(GWL_STYLE, mainFrame.GetWindowLongW(GWL_STYLE) & ~WS_MAXIMIZEBOX);

Original comment by czarek.t...@gmail.com on 14 Jan 2013 at 7:53

GoogleCodeExporter commented 9 years ago
Window is centered by default, allow for customization when that is
not an expected behavior, the code responsible for centering the window:

    mainFrame.CenterWindow();

Original comment by czarek.t...@gmail.com on 14 Jan 2013 at 7:54

GoogleCodeExporter commented 9 years ago
Add a setting to allow for opening Developer Tools using F12 key in Chrome.

Original comment by czarek.t...@gmail.com on 14 Jan 2013 at 8:35

GoogleCodeExporter commented 9 years ago
An example settings.json file would look like:

{
    "application": {
        "single_instance": false
    },
    "main_window": {
        "title": "PHP Desktop",
        "icon": "",
        "default_size": [1024, 768],
        "minimum_size": [800, 600],
        "maximum_size": [],
        "disable_maximize_button": false,
        "center_on_screen": true
    },
    "web_server": {
        "listen_on": ["127.0.0.1", 54007],
        "www_dir": "www",
        "php_cgi": "php\\php-cgi.exe"
    },
    "msie": {
        "on_navigation_error": {
            "redirect_to": "",
            "display_html": ""
        }
    },
    "chrome": {
        "f12_developer_tools": true
    }
}

Original comment by czarek.t...@gmail.com on 15 Jan 2013 at 10:12

GoogleCodeExporter commented 9 years ago
Add debug option to "application":

"debug": {
    "show_console": false,
    "log_level": "INFO",
    "log_file": "debug.log"            
}

Original comment by czarek.t...@gmail.com on 15 Jan 2013 at 10:52

GoogleCodeExporter commented 9 years ago
Settings file is working, I've used json-parser library, it's great:
https://github.com/udp/json-parser

Original comment by czarek.t...@gmail.com on 16 Jan 2013 at 5:48

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 16 Jan 2013 at 5:49

GoogleCodeExporter commented 9 years ago
Feature added in revision 01c415ff2c24. Will appear in next release.

Original comment by czarek.t...@gmail.com on 17 Jan 2013 at 5:36

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 17 Jan 2013 at 5:36

GoogleCodeExporter commented 9 years ago
I want to remove back button(Backsoace) action.

Original comment by parmeshs...@gmail.com on 18 Jun 2015 at 9:03