Commit Graph

309 Commits

Author SHA1 Message Date
Neel Patel
dcf5bfc495 Runtime fixes:
- Compilation error with Qt4 as "QUrlQuery" class was introduced since Qt5.
- Client side download code has been removed as now we support server side download.
- We should not delete sender object inside slot. If we do so it may crash the application. To avoid this, we used Qt's "deleteLater" which will delete the objects once the processing of all the events have been done.
2016-07-25 12:39:57 +01:00
Neel Patel
a6024fc49a Support server side download in runtime application. 2016-07-18 15:28:20 +01:00
Neel Patel
d22ea8bf61 Properly support file downloads in the desktop runtime. Fixes #1405. Fixes #1342 2016-07-13 12:26:24 +01:00
Dave Page
b8c9ccc939 Use Alt+Shift for runtime shortcuts to avoid collisions with app shortcuts. 2016-06-29 20:31:40 +01:00
Ashesh Vashi
fc34f85aa3 Set the sys path from the runtime as we were doing it earlier along with the
PYTHONPATH environment variable settings.
2016-06-21 18:24:07 +05:30
Ashesh Vashi
980ab4735e Revert "Adding proper virtual environment path on windows."
As per Dave, we are not using 'pgAdmin 4' from the community installer,
hence - we should not bother about it.

This reverts commit 3484998775.
2016-06-21 17:44:46 +05:30
Ashesh Vashi
3484998775 Adding proper virtual environment path on windows. 2016-06-21 16:54:34 +05:30
Ashesh Vashi
061a9d9322 Using the preprocessor macor Q_OS_WIN differently, it was failing to
compile the runtime on windows with C1017 error.
2016-06-21 15:45:26 +05:30
Ashesh Vashi
4a7607445f Setting the PYTHONPATH variable before initializing the python
environment using Py_Initialize() function.

Also, add virtual environment binary path to the PATH environment
variable.
2016-06-21 15:02:35 +05:30
Ashesh Vashi
8b8e6fe59b Passing the arguments to the function appending the path by reference. 2016-06-20 23:04:00 +05:30
Ashesh Vashi
691f01b623 [Runtime] Setting few of the environment variables (i.e. PATH and
PYTHONPATH) to run the runtime with the virtual environment properly.
And, also allow to use the python interpreter to be used with the
background process modules.

- Add binary directory of the virtual environment to PATH environment
  variable.
- Add lib, dynamic libraries (python specific), and site-package
  directories of the virtual environment in the PYTHONPATH environment
  variable.
2016-06-20 21:31:19 +05:30
Dave Page
c16df45f2c Allow QMAKE_[C|CXX|L]FLAGS to be set externally from PGADMIN_[C|CXX|LD]FLAGS environment variables respectively. 2016-06-20 12:54:49 +01:00
Dave Page
2c06ab4ac3 Allow the python-config executable to be specified in the environment. 2016-06-20 11:19:57 +01:00
Asser Schrøder Femø
fc955537a8 Fix runtime compatibility with newer Python versions
Initial patch by Asser. Change restricted to Python 3.3 and above by me as PyUnicode_DecodeFSDefault was added in 3.3.
2016-06-20 10:51:46 +01:00
Dave Page
7e27c6280f Replace runtime menu with shortcuts for a cleaner UI (and
because 99% of users don't need those options anyway).
2016-06-17 11:32:39 +01:00
Dave Page
e9dc1496e2 Favour Python 2 as it's more widely tested. 2016-06-17 11:32:39 +01:00
Dave Page
4dc563d71c Fix python detection on Linux/Mac. 2016-06-17 09:40:06 +01:00
Dave Page
73988bcece Do a more sensible venv search on Windows, and don't update the
registry upon installation.
2016-06-16 16:22:45 +01:00
Dave Page
cef0dc7c88 Hunt for the runtime on Windows in the same way we do on Mac. 2016-06-16 13:07:35 +01:00
Dave Page
fa917a0828 Prevent the runtime from compiling bytecode to avoid permissions issues. 2016-06-16 11:30:23 +01:00
Leonard Hecker
702609517f This quite trivial patch adds support for HiDPI (i.e. "retina") displays on OS X.
The reason for this issue is that you guys use a heavily trimmed down Info.plist
file, which among others doesn't contain the NSPrincipalClass key.
Without that key an OS X application is treated as a legacy one and thus won't
support many "new" features including HiDPI displays.
By adding the key back, you a) follow the recommended Info.plist style and
b) get HiDPI support for free!

Apart from that I _really_ recommend adding the following keys too (mostly
keys added by default by Xcode - I've guessed the values):

<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>pgAdmin 4</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2016 The pgAdmin Development Team. All rights reserved.</string>
2016-06-11 18:14:47 +01:00
Neel Patel
d1a0a9bab2 Icon for the Windows runtime executable. Fixes #1310 2016-06-08 10:54:28 +01:00
Dave Page
4380c6714e Fix venv search path on Mac. 2016-06-07 12:12:39 +01:00
Sandeep Thakkar
3074af101b Add Mac Appbundle generation support. 2016-06-02 13:56:56 +01:00
Neel Patel
b64868079a QWebView does not render checkbox, and radio button propoerly on
MacOSX.

In order to fix it, we need to set 'style' to 'funsion' on MacOSX.

Reference:
https://bugreports.qt.io/browse/QTBUG-43366
2016-06-02 15:15:56 +05:30
Ashesh Vashi
fddc30c99f [Runtime] Adding python libs in the LIBS build environment. 2016-06-02 13:12:45 +05:30
Neel Patel
7b2e4fb467 Add Inspection support to the runtime when built in debug mode. 2016-05-19 09:33:00 -04:00
Dave Page
a5bb65c468 Search path for the runtime when running in a Mac dev env. 2016-05-10 16:39:02 +01:00
Sandeep Thakkar
c8406a5994 Fix the runtime search path when running in a Mac App Bundle 2016-05-06 15:53:00 +01:00
Vladimir Koković
2d5c69503e Ensure runtime settings are synced after they are updated. 2016-04-16 19:00:49 -04:00
Neel Patel
3b7886e61e Runtime fixes for QT4 support. 2016-02-23 09:10:49 +00:00
Ashesh Vashi
9274d87c55 Creating separate .gitignore for runtime, and added them in .gitignore
new temporary files created by qmake.
2016-02-18 17:12:53 +05:30
Neel Patel
8a06d5bd54 Remove a duplicate code line and add Windows environment setup info. 2016-02-03 09:58:58 +00:00
Neel Patel
efc8815ecb Update the runtime to properly support Windows. 2016-02-02 13:16:01 +00:00
Neel Patel
d6d8a2348e Fix tab auto-hiding to work with Qt < 5.4. 2016-01-26 10:03:15 +00:00
Dave Page
39e822e846 Further nice-ification of the runtime UI. 2016-01-25 17:21:00 +00:00
Dave Page
f1f09242ed Set the window title. 2016-01-22 14:24:06 +00:00
Dave Page
af742011a5 Further UI improvements for the runtime. 2016-01-22 14:24:06 +00:00
Dave Page
b39943e3ff Fix comment 2016-01-21 09:07:48 +00:00
Dave Page
7c9347873f Use a custom configuration dialogue and allow the user to specify
the application path as well as the Python path.
2016-01-19 10:26:36 +00:00
Neel Patel
8f146ebb4c Support tabs in the runtime browser.
Added functionality to open different website link and load the
website data to different tab. To achieve this, new customized
QTabWidget and QWebView are added to render the data to WebView
widget. All the widgets (New Tab, WebViewWinodw, and QToolButton)
are added dynamically. QToolButton is used to traverse back and
forward to web document opened in WebViewWindow.

Introduced the New class called WebViewWindow which is derived
from QWebView. Each tab of the QTabWidget contains the instance
of WebViewWindow class. WebViewWindow class is useful to display
the web document.

Introduced New class called TabWindow which is derived from
QTabWidget. This class is useful to achieve following functionality:
  - Customize the close button of tabbar so that it can only be
    visible other then main pgAdmin 4 window.
  - Enable/Disable the toolbutton added left side of tabbar
    depending on the web history traversed by the user in WebViewWindow.
  - Set the tooltip text of the tabbar depending on the title change
    event of WebViewWindow class.

Modified the Qt project file to support the both the version
of python 2 and python 3.

Qt5 is recommended to test pgAdmin4 in dektop mode.
2016-01-18 14:33:28 +00:00
Dave Page
07fac62bce Improve sizing of Python Path input box. 2016-01-14 15:53:29 +00:00
Dave Page
81405dbe0a Use the modern pgAdmin icon on Mac 2016-01-14 15:22:49 +00:00
Dave Page
2354c3e07d Allow multiple Python Path elements to be given in a semi-colon delimited list. 2016-01-12 13:50:49 +00:00
Prasad Somwanshi
6c62d9eecd sleep api used in pgAdmin4.cpp doesn't seem cross-platform(used from POSIX
specific C header). Either need to be replaced by C++11 equivalent or Qt
one. QThread::sleep seem appropriate to me.
2015-10-29 11:24:07 +01:00
Dave Page
fe834d1ed2 Re-organise node structure and loading to make things somewhat more
simple. This also adds the ability to display servers on the treeview.
2015-03-10 13:09:11 +00:00
Dave Page
5cffcabc70 Update the runtime to use URLs provided by the utils module. 2015-01-20 13:56:37 +00:00
Dave Page
cd9d005c49 Remove CherryPy from the source tree, and change references to Flask
instead. Add support to the runtime to allow the user to specify the
Python path. This needs to be more automated for release, but will be
useful for debugging and development.
2014-12-16 12:53:09 +00:00
Dave Page
1db7d968e2 Fix merge error. 2014-03-09 14:39:12 +00:00
Dave Page
b022e5d347 Have the runtime check in a loop to see if the app server is up before
opening the browser window.
2013-10-04 21:49:12 +01:00
Dave Page
457a842cec Find a random port number to use for the application server to avoid conflicts
with any other apps that may have already bound to the default port used by CP.
2013-10-04 21:48:01 +01:00
Dave Page
a1524f3726 Add a qmake cache. 2013-10-04 21:42:16 +01:00
Dave Page
467d7d571b Include pgAdmin4.h in the project file. 2013-10-04 21:42:16 +01:00
Dave Page
7a066ec4b2 Save/restore the window position. 2013-10-04 21:42:16 +01:00
Dave Page
2d8f6481dc Fix a display issue in the Linux error handling.
Linux won't refresh the qWebView unless we explicitly process
events after telling it to load the page again.
2013-06-22 00:59:34 +01:00
Dave Page
9080a782d5 Handle slow startup of the web server.
If the web server is slow to start, we may need to retry the initial
page load. Implement a retry system that will retry the initial load
4 times, after 1, 2, 3 and 4 seconds, before giving up and leaving
the user with an error message and a link to retry manually.
2013-06-22 00:49:40 +01:00
Dave Page
7fd90ac10f QT4 compatibility. 2013-06-21 23:32:32 +01:00
Dave Page
28f45ea9f9 Initial PoC of a CherryPy app integrate with the runtime.
Upon startup, the runtime will attempt to locate pgAdmin4.py in a
number of different relative locations. Once found, it will execute
it in a new thread. The main window is then created and the brower's
initial page is set to the root of the CherryPy server. At present,
that's http://127.0.0.1:8080.
2013-06-21 23:21:11 +01:00
Dave Page
38ff104cb9 Add a very experimental QT based runtime for pgAdmin 4.
This runtime implements a brower control with embedded Python
interpretor. The Python interpretor runs a simple script at
startup to generate some HTML that is displayed in the browser.
Arbitrary URLs can be opened from the "Open URL" option on the
File menu.
2013-06-16 14:17:46 +01:00