pgAdmin 4 commit: Add a Korean translation.

2018-07-12 Thread Dave Page
Add a Korean translation.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c7325bea935c4350b38f5e2d51527fcce0e98186
Author: Ioseph Kim 

Modified Files
--
web/config.py  | 1 +
.../translations/ko/LC_MESSAGES/messages.mo|   Bin 0 -> 145594 bytes
.../translations/ko/LC_MESSAGES/messages.po| 10861 +++
3 files changed, 10862 insertions(+)



pgAdmin 4 commit: Add "messages" target to extract, update and compile

2018-07-12 Thread Dave Page
Add "messages" target to extract, update and compile message catalogs for 
convenience.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=c6dba67d068fe9e0e7372689f8bbb39b89e63dfe

Modified Files
--
Makefile | 2 ++
1 file changed, 2 insertions(+)



pgAdmin 4 commit: Update message catalogs:

2018-07-12 Thread Dave Page
Update message catalogs:

1455 of 1984 messages (73%) translated in 
pgadmin/translations/de/LC_MESSAGES/messages.po
1910 of 1984 messages (96%) translated in 
pgadmin/translations/fr/LC_MESSAGES/messages.po
1941 of 1984 messages (97%) translated in 
pgadmin/translations/ja/LC_MESSAGES/messages.po
1789 of 1984 messages (90%) translated in 
pgadmin/translations/ko/LC_MESSAGES/messages.po
1785 of 1984 messages (89%) translated in 
pgadmin/translations/pl/LC_MESSAGES/messages.po
1787 of 1984 messages (90%) translated in 
pgadmin/translations/ru/LC_MESSAGES/messages.po
1411 of 1984 messages (71%) translated in 
pgadmin/translations/zh/LC_MESSAGES/messages.po

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=0137cfaee377b14607f417dbd929092ae549d958

Modified Files
--
web/pgadmin/messages.pot   | 1077 +-
.../translations/de/LC_MESSAGES/messages.mo|  Bin 143793 -> 142992 bytes
.../translations/de/LC_MESSAGES/messages.po| 1141 ++-
.../translations/fr/LC_MESSAGES/messages.mo|  Bin 151348 -> 150310 bytes
.../translations/fr/LC_MESSAGES/messages.po| 1161 ++--
.../translations/ja/LC_MESSAGES/messages.mo|  Bin 157440 -> 156496 bytes
.../translations/ja/LC_MESSAGES/messages.po| 1143 ++-
.../translations/pl/LC_MESSAGES/messages.mo|  Bin 144091 -> 143198 bytes
.../translations/pl/LC_MESSAGES/messages.po| 1145 ++-
.../translations/ru/LC_MESSAGES/messages.mo|  Bin 182716 -> 181677 bytes
.../translations/ru/LC_MESSAGES/messages.po| 1143 ++-
.../translations/zh/LC_MESSAGES/messages.mo|  Bin 122531 -> 121739 bytes
.../translations/zh/LC_MESSAGES/messages.po| 1141 ++-
13 files changed, 3882 insertions(+), 4069 deletions(-)



Re: v4 3.1 Korean message file

2018-07-12 Thread Dave Page
Hi

On Wed, Jul 11, 2018 at 5:37 PM, Ioseph Kim  wrote:

> Hi
>
> I translated pgAdmin v4 messages.
> pot file is version 3.1.
>
> apply to next version, plz.
>

Awesome - thank you!

The compile stats against HEAD are 1789 of 1984 messages (90%) translated.
If you have the time (and energy!) to get up to 100%, you can get the most
up to date template file from
https://git.postgresql.org/gitweb/?p=pgadmin4.git;a=blob_plain;f=web/pgadmin/messages.pot

Thanks!

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgAgent commit: Tag REL-4_0_0 has been created.

2018-07-12 Thread Dave Page
Tag REL-4_0_0 has been created.
View: 
https://git.postgresql.org/gitweb?p=pgagent.git;a=tag;h=refs/tags/REL-4_0_0

Log Message
---
Tag 4.0.0

pgAgent v4.0.0 Released

2018-07-12 Thread Dave Page
The pgAdmin Development Team are pleased to announce the release of pgAgent
v4.0.0.

pgAgent is a job scheduler for PostgreSQL; for more information please see
the documentation included as part of the pgAdmin documentation at
https://www.pgadmin.org/docs/pgadmin4/3.x/pgagent.html.

Download (source): https://www.pgadmin.org/download/pgagent-source-code/

We expect DEB and RPM packages to be available from the PostgreSQL APT/YUM
repositories in due course, as well as an updated installer from
EnterpriseDB available through StackBuilder.

Notable changes in this release include:

- Remove the dependency on wxWidgets. pgAgent now uses Boost for thread
management and synchronisation [Neel Patel]
- Refactor connection parsing logic to fix issues with and improve handling
of connection strings [Thomas Krennwallner]
- Handle 2 digit server version numbers [Ashesh Vashi]
- Fix handling of the "succeeded" flag on job steps which could prevent
failure of steps causing the following steps to fail [Sanket Mehta]

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: pgAgent v4.0.0 Released

2018-07-12 Thread Eugene Wang
This is awesome. Always have interests to use pgAgent; however, the
official documentation about installing is obscure and stop me from getting
into it... I honestly cannot get any clue about steps I should do from this
https://www.pgadmin.org/docs/pgadmin4/3.x/pgagent.html link.

Maybe installing pgagent is easy to a lot of people. There are still a lot
of people asking questions of pgagent installation in Stackoverflow.

Can any one contribute a step by step tutorial? I will truly appreciate it.

Yujie Wang (Welcome to call me Eugene, for your pronunciation convenience)
GIS Developer
Connected2fiber
Linkedin : https://www.linkedin.com/in/yujie-wang-61a129a0/

On Thu, Jul 12, 2018 at 9:00 AM, Dave Page  wrote:

> The pgAdmin Development Team are pleased to announce the release of
> pgAgent v4.0.0.
>
> pgAgent is a job scheduler for PostgreSQL; for more information please see
> the documentation included as part of the pgAdmin documentation at
> https://www.pgadmin.org/docs/pgadmin4/3.x/pgagent.html.
>
> Download (source): https://www.pgadmin.org/download/pgagent-source-code/
>
> We expect DEB and RPM packages to be available from the PostgreSQL APT/YUM
> repositories in due course, as well as an updated installer from
> EnterpriseDB available through StackBuilder.
>
> Notable changes in this release include:
>
> - Remove the dependency on wxWidgets. pgAgent now uses Boost for thread
> management and synchronisation [Neel Patel]
> - Refactor connection parsing logic to fix issues with and improve
> handling of connection strings [Thomas Krennwallner]
> - Handle 2 digit server version numbers [Ashesh Vashi]
> - Fix handling of the "succeeded" flag on job steps which could prevent
> failure of steps causing the following steps to fail [Sanket Mehta]
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: pgAgent v4.0.0 Released

2018-07-12 Thread Dave Page
Hi

On Thu, Jul 12, 2018 at 3:12 PM, Eugene Wang  wrote:

> This is awesome. Always have interests to use pgAgent; however, the
> official documentation about installing is obscure and stop me from getting
> into it... I honestly cannot get any clue about steps I should do from this
> https://www.pgadmin.org/docs/pgadmin4/3.x/pgagent.html link.
>
> Maybe installing pgagent is easy to a lot of people. There are still a lot
> of people asking questions of pgagent installation in Stackoverflow.
>
> Can any one contribute a step by step tutorial? I will truly appreciate
> it.
>

We only publish source code for pgAgent - you will find a README in the
archive that has step by step build and configuration instructions to
compile it yourself.

However, I would suggest waiting for the Debian/Ubuntu or Redhat packages
or Windows/Mac installers from EnterpriseDB to be released. These will have
pre-built binaries and are a lot easier to install (but the instructions
will be package-specific so don't come from us).

Regards, Dave.


>
> Yujie Wang (Welcome to call me Eugene, for your pronunciation
> convenience)
> GIS Developer
> Connected2fiber
> Linkedin : https://www.linkedin.com/in/yujie-wang-61a129a0/
>
> On Thu, Jul 12, 2018 at 9:00 AM, Dave Page  wrote:
>
>> The pgAdmin Development Team are pleased to announce the release of
>> pgAgent v4.0.0.
>>
>> pgAgent is a job scheduler for PostgreSQL; for more information please
>> see the documentation included as part of the pgAdmin documentation at
>> https://www.pgadmin.org/docs/pgadmin4/3.x/pgagent.html.
>>
>> Download (source): https://www.pgadmin.org/download/pgagent-source-code/
>>
>> We expect DEB and RPM packages to be available from the PostgreSQL
>> APT/YUM repositories in due course, as well as an updated installer from
>> EnterpriseDB available through StackBuilder.
>>
>> Notable changes in this release include:
>>
>> - Remove the dependency on wxWidgets. pgAgent now uses Boost for thread
>> management and synchronisation [Neel Patel]
>> - Refactor connection parsing logic to fix issues with and improve
>> handling of connection strings [Thomas Krennwallner]
>> - Handle 2 digit server version numbers [Ashesh Vashi]
>> - Fix handling of the "succeeded" flag on job steps which could prevent
>> failure of steps causing the following steps to fail [Sanket Mehta]
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: Regarding RM #3316 Pgadmin4 No Tray Crash

2018-07-12 Thread Dave Page
On Thu, Jul 12, 2018 at 11:17 AM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

>
>
> On Wed, Jul 11, 2018 at 8:18 PM, Dave Page  wrote:
>
>>
>>
>> On Wed, Jul 11, 2018 at 11:05 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Dave
>>>
>>> On Wed, Jul 11, 2018 at 1:31 PM, Dave Page  wrote:
>>>


 On Wed, Jul 11, 2018 at 8:03 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi
>
> On Tue, Jul 10, 2018 at 9:16 PM, Dave Page  wrote:
>
>>
>>
>> On Tue, Jul 10, 2018 at 4:05 PM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Tue, 10 Jul 2018, 18:32 Dave Page,  wrote:
>>>
 Hi

 On Tue, Jul 10, 2018 at 11:20 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Hackers,
>
> I have implemented the fix for RM #3316 "Pgadmin4 No Tray Crash".
> I have implemented it as follows:
>
>- Check the availability of System Tray for 30 seconds (no
>changes made here).
>- If System Tray not found create one Floating Window with
>menu. (Refer attached screenshot).
>- I have remove close(x) button of the floating window.
>- Fedora have "Quit" menu for the applications, so I have
>handle the close event and shutdown the python server.
>
> I have tested this on Fedora-28 (no system tray) and Ubuntu 18.04
> (with system tray).
>
> Please review the screenshot and suggest changes (if any). I'll
> send the patch later.
>

 What does the window look like without the menu? I'd suggest
 putting a Slonik image there, and maybe a note (or a button to display 
 a
 note) saying that installing a system tray plugin can be used to hide 
 the
 window.

>>>
>>>  You mean instead of "pgAdmin4" menu we should add toolbar with
>>> button having slonik image and when click on there submenus will be 
>>> open.
>>>
>>
>> No - I assume that's a drop down menu over a blank window? I'm
>> suggesting something to fill the blank space.
>>
>
>Attached are the screenshot after adding 'Slonik' icon and 'Note'.
>

 Looks good - though please fix the aspect ratio so it doesn't squish
 the logo. I may tweak the message in review.

>>>
>>> I have tried using "QPixmap", but not able to fix the aspect ratio.
>>>


> Should we allow user to resize the floating window? Definitely not
> maximize, because icon gets blurred.
>

 No - but it should be minimisable.

>>>
>>>Fixed. Attached is the working patch. Please review it.
>>>
>>
>> Thanks. Here's an update to the patch which makes the floating window a
>> Qt Form for ease of maintenance, as well as making a few other tweaks.
>>
>
> I have applied the patch and found below issues:
>
>- Slonik icon is not visible, I have remove the QPixmap and apply the
>style sheet in ui file, it works for me.
>
> I'll bet it was because I told it to use a local file, which it included
without a path. I've seen Qt mess that up before.

>
>- Window is resizable, to fix that i have set the fixed size.
>
> OK.


> Please refer "*pgAdmin4_Floating_Window.png*"
>
>>
>> I really dislike the 30 second delay that's caused by the attempt to
>> initialise the tray icon. We need to do something about that;
>>
>
>Do we need to reduce the delay? Meanwhile I have added some action
> messages like "Checking for system tray..." onto the splash screen, so the
> user will be aware of the actions. Please refer "*Splash_With_Message.png*"
>
>

Yes - we cannot have the check for a system tray taking 30 seconds. People
get very annoyed when pgAdmin takes too long to start!

As a worst case scenario, we can add a command line switch that tells it to
not bother using the tray, which can then be used in the shortcut on the
menu. However, I really would like to make this fully automatic, and near
instantaneous if possible, so let's try to figure it out before falling
back to that hack.


>
>
>> can we start the splash screen and server before trying to create the
>> icon? That way the user can be up and running immediately; they just won't
>> see the tray icon or floating window for a short while.
>>
>
> Logic to show splash screen is already there and it is before
> initializing the tray icon, but for some reason it is not visible. It is
> visible only when app.exec() will be called. To fix that I'll have to add
> sleep of 1 second before calling processEvents() (googled it).
>

We shouldn't need a sleep - simply processing events should be enough.


>
> Starting the server before trying to create tray icon shouldn't be a
> good idea, because in case of some error in starting the server, use

Re: Regarding RM #3316 Pgadmin4 No Tray Crash

2018-07-12 Thread Dave Page
On Thu, Jul 12, 2018 at 4:40 PM, Dave Page  wrote:

>
>
> On Thu, Jul 12, 2018 at 11:17 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>>
>>
>> On Wed, Jul 11, 2018 at 8:18 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, Jul 11, 2018 at 11:05 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Dave

 On Wed, Jul 11, 2018 at 1:31 PM, Dave Page  wrote:

>
>
> On Wed, Jul 11, 2018 at 8:03 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi
>>
>> On Tue, Jul 10, 2018 at 9:16 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Tue, Jul 10, 2018 at 4:05 PM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>


 On Tue, 10 Jul 2018, 18:32 Dave Page,  wrote:

> Hi
>
> On Tue, Jul 10, 2018 at 11:20 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Hackers,
>>
>> I have implemented the fix for RM #3316 "Pgadmin4 No Tray Crash".
>> I have implemented it as follows:
>>
>>- Check the availability of System Tray for 30 seconds (no
>>changes made here).
>>- If System Tray not found create one Floating Window with
>>menu. (Refer attached screenshot).
>>- I have remove close(x) button of the floating window.
>>- Fedora have "Quit" menu for the applications, so I have
>>handle the close event and shutdown the python server.
>>
>> I have tested this on Fedora-28 (no system tray) and Ubuntu
>> 18.04 (with system tray).
>>
>> Please review the screenshot and suggest changes (if any). I'll
>> send the patch later.
>>
>
> What does the window look like without the menu? I'd suggest
> putting a Slonik image there, and maybe a note (or a button to 
> display a
> note) saying that installing a system tray plugin can be used to hide 
> the
> window.
>

  You mean instead of "pgAdmin4" menu we should add toolbar with
 button having slonik image and when click on there submenus will be 
 open.

>>>
>>> No - I assume that's a drop down menu over a blank window? I'm
>>> suggesting something to fill the blank space.
>>>
>>
>>Attached are the screenshot after adding 'Slonik' icon and 'Note'.
>>
>
> Looks good - though please fix the aspect ratio so it doesn't squish
> the logo. I may tweak the message in review.
>

 I have tried using "QPixmap", but not able to fix the aspect ratio.

>
>
>> Should we allow user to resize the floating window? Definitely not
>> maximize, because icon gets blurred.
>>
>
> No - but it should be minimisable.
>

Fixed. Attached is the working patch. Please review it.

>>>
>>> Thanks. Here's an update to the patch which makes the floating window a
>>> Qt Form for ease of maintenance, as well as making a few other tweaks.
>>>
>>
>> I have applied the patch and found below issues:
>>
>>- Slonik icon is not visible, I have remove the QPixmap and apply the
>>style sheet in ui file, it works for me.
>>
>> I'll bet it was because I told it to use a local file, which it included
> without a path. I've seen Qt mess that up before.
>
>>
>>- Window is resizable, to fix that i have set the fixed size.
>>
>> OK.
>
>
>> Please refer "*pgAdmin4_Floating_Window.png*"
>>
>>>
>>> I really dislike the 30 second delay that's caused by the attempt to
>>> initialise the tray icon. We need to do something about that;
>>>
>>
>>Do we need to reduce the delay? Meanwhile I have added some action
>> messages like "Checking for system tray..." onto the splash screen, so the
>> user will be aware of the actions. Please refer "
>> *Splash_With_Message.png*"
>>
>
> Yes - we cannot have the check for a system tray taking 30 seconds. People
> get very annoyed when pgAdmin takes too long to start!
>
> As a worst case scenario, we can add a command line switch that tells it
> to not bother using the tray, which can then be used in the shortcut on the
> menu. However, I really would like to make this fully automatic, and near
> instantaneous if possible, so let's try to figure it out before falling
> back to that hack.
>

I played some more. It looks like it's an easy fix - something like the
following seems to work for me on Fedora 28 (no tray) and macOS, with no
noticeable delay on either:

if (!QSystemTrayIcon::isSystemTrayAvailable() || !trayicon->Init())

{

// Delete Tray Icon object

delete trayicon;

trayicon = NULL;


splash->showMessage(QString(QWidget::tr("System tray not
found, creating floating window...")), Qt::AlignBottom |
Qt::AlignCenter);


Of course, if we call QSystemTrayIcon

Re: Regarding RM #3316 Pgadmin4 No Tray Crash

2018-07-12 Thread Akshay Joshi
On Thu, Jul 12, 2018 at 9:38 PM, Dave Page  wrote:

>
>
> On Thu, Jul 12, 2018 at 4:40 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jul 12, 2018 at 11:17 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>>
>>>
>>> On Wed, Jul 11, 2018 at 8:18 PM, Dave Page  wrote:
>>>


 On Wed, Jul 11, 2018 at 11:05 AM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

> Hi Dave
>
> On Wed, Jul 11, 2018 at 1:31 PM, Dave Page  wrote:
>
>>
>>
>> On Wed, Jul 11, 2018 at 8:03 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi
>>>
>>> On Tue, Jul 10, 2018 at 9:16 PM, Dave Page 
>>> wrote:
>>>


 On Tue, Jul 10, 2018 at 4:05 PM, Akshay Joshi <
 akshay.jo...@enterprisedb.com> wrote:

>
>
> On Tue, 10 Jul 2018, 18:32 Dave Page,  wrote:
>
>> Hi
>>
>> On Tue, Jul 10, 2018 at 11:20 AM, Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Hackers,
>>>
>>> I have implemented the fix for RM #3316 "Pgadmin4 No Tray
>>> Crash". I have implemented it as follows:
>>>
>>>- Check the availability of System Tray for 30 seconds (no
>>>changes made here).
>>>- If System Tray not found create one Floating Window with
>>>menu. (Refer attached screenshot).
>>>- I have remove close(x) button of the floating window.
>>>- Fedora have "Quit" menu for the applications, so I have
>>>handle the close event and shutdown the python server.
>>>
>>> I have tested this on Fedora-28 (no system tray) and Ubuntu
>>> 18.04 (with system tray).
>>>
>>> Please review the screenshot and suggest changes (if any). I'll
>>> send the patch later.
>>>
>>
>> What does the window look like without the menu? I'd suggest
>> putting a Slonik image there, and maybe a note (or a button to 
>> display a
>> note) saying that installing a system tray plugin can be used to 
>> hide the
>> window.
>>
>
>  You mean instead of "pgAdmin4" menu we should add toolbar
> with button having slonik image and when click on there submenus will 
> be
> open.
>

 No - I assume that's a drop down menu over a blank window? I'm
 suggesting something to fill the blank space.

>>>
>>>Attached are the screenshot after adding 'Slonik' icon and
>>> 'Note'.
>>>
>>
>> Looks good - though please fix the aspect ratio so it doesn't squish
>> the logo. I may tweak the message in review.
>>
>
> I have tried using "QPixmap", but not able to fix the aspect
> ratio.
>
>>
>>
>>> Should we allow user to resize the floating window? Definitely not
>>> maximize, because icon gets blurred.
>>>
>>
>> No - but it should be minimisable.
>>
>
>Fixed. Attached is the working patch. Please review it.
>

 Thanks. Here's an update to the patch which makes the floating window a
 Qt Form for ease of maintenance, as well as making a few other tweaks.

>>>
>>> I have applied the patch and found below issues:
>>>
>>>- Slonik icon is not visible, I have remove the QPixmap and apply
>>>the style sheet in ui file, it works for me.
>>>
>>> I'll bet it was because I told it to use a local file, which it included
>> without a path. I've seen Qt mess that up before.
>>
>>>
>>>- Window is resizable, to fix that i have set the fixed size.
>>>
>>> OK.
>>
>>
>>> Please refer "*pgAdmin4_Floating_Window.png*"
>>>

 I really dislike the 30 second delay that's caused by the attempt to
 initialise the tray icon. We need to do something about that;

>>>
>>>Do we need to reduce the delay? Meanwhile I have added some action
>>> messages like "Checking for system tray..." onto the splash screen, so the
>>> user will be aware of the actions. Please refer "
>>> *Splash_With_Message.png*"
>>>
>>
>> Yes - we cannot have the check for a system tray taking 30 seconds.
>> People get very annoyed when pgAdmin takes too long to start!
>>
>> As a worst case scenario, we can add a command line switch that tells it
>> to not bother using the tray, which can then be used in the shortcut on the
>> menu. However, I really would like to make this fully automatic, and near
>> instantaneous if possible, so let's try to figure it out before falling
>> back to that hack.
>>
>
> I played some more. It looks like it's an easy fix - something like the
> following seems to work for me on Fedora 28 (no tray) and macOS, with no
> noticeable delay on either:
>
> if (!QSystemTrayIcon::isSystemTrayAvailable() || !trayicon->Init())
>
> {
>
> // Delete Tray

Re: Regarding RM #3316 Pgadmin4 No Tray Crash

2018-07-12 Thread Akshay Joshi
Attached is the refactored patch.

On Fri, Jul 13, 2018 at 11:19 AM, Akshay Joshi <
akshay.jo...@enterprisedb.com> wrote:

>
>
> On Thu, Jul 12, 2018 at 9:38 PM, Dave Page  wrote:
>
>>
>>
>> On Thu, Jul 12, 2018 at 4:40 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Thu, Jul 12, 2018 at 11:17 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>


 On Wed, Jul 11, 2018 at 8:18 PM, Dave Page  wrote:

>
>
> On Wed, Jul 11, 2018 at 11:05 AM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>> Hi Dave
>>
>> On Wed, Jul 11, 2018 at 1:31 PM, Dave Page  wrote:
>>
>>>
>>>
>>> On Wed, Jul 11, 2018 at 8:03 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi

 On Tue, Jul 10, 2018 at 9:16 PM, Dave Page 
 wrote:

>
>
> On Tue, Jul 10, 2018 at 4:05 PM, Akshay Joshi <
> akshay.jo...@enterprisedb.com> wrote:
>
>>
>>
>> On Tue, 10 Jul 2018, 18:32 Dave Page,  wrote:
>>
>>> Hi
>>>
>>> On Tue, Jul 10, 2018 at 11:20 AM, Akshay Joshi <
>>> akshay.jo...@enterprisedb.com> wrote:
>>>
 Hi Hackers,

 I have implemented the fix for RM #3316 "Pgadmin4 No Tray
 Crash". I have implemented it as follows:

- Check the availability of System Tray for 30 seconds (no
changes made here).
- If System Tray not found create one Floating Window with
menu. (Refer attached screenshot).
- I have remove close(x) button of the floating window.
- Fedora have "Quit" menu for the applications, so I have
handle the close event and shutdown the python server.

 I have tested this on Fedora-28 (no system tray) and Ubuntu
 18.04 (with system tray).

 Please review the screenshot and suggest changes (if any). I'll
 send the patch later.

>>>
>>> What does the window look like without the menu? I'd suggest
>>> putting a Slonik image there, and maybe a note (or a button to 
>>> display a
>>> note) saying that installing a system tray plugin can be used to 
>>> hide the
>>> window.
>>>
>>
>>  You mean instead of "pgAdmin4" menu we should add toolbar
>> with button having slonik image and when click on there submenus 
>> will be
>> open.
>>
>
> No - I assume that's a drop down menu over a blank window? I'm
> suggesting something to fill the blank space.
>

Attached are the screenshot after adding 'Slonik' icon and
 'Note'.

>>>
>>> Looks good - though please fix the aspect ratio so it doesn't squish
>>> the logo. I may tweak the message in review.
>>>
>>
>> I have tried using "QPixmap", but not able to fix the aspect
>> ratio.
>>
>>>
>>>
 Should we allow user to resize the floating window? Definitely not
 maximize, because icon gets blurred.

>>>
>>> No - but it should be minimisable.
>>>
>>
>>Fixed. Attached is the working patch. Please review it.
>>
>
> Thanks. Here's an update to the patch which makes the floating window
> a Qt Form for ease of maintenance, as well as making a few other tweaks.
>

 I have applied the patch and found below issues:

- Slonik icon is not visible, I have remove the QPixmap and apply
the style sheet in ui file, it works for me.

 I'll bet it was because I told it to use a local file, which it
>>> included without a path. I've seen Qt mess that up before.
>>>

- Window is resizable, to fix that i have set the fixed size.

 OK.
>>>
>>>
 Please refer "*pgAdmin4_Floating_Window.png*"

>
> I really dislike the 30 second delay that's caused by the attempt to
> initialise the tray icon. We need to do something about that;
>

Do we need to reduce the delay? Meanwhile I have added some action
 messages like "Checking for system tray..." onto the splash screen, so the
 user will be aware of the actions. Please refer "
 *Splash_With_Message.png*"

>>>
>>> Yes - we cannot have the check for a system tray taking 30 seconds.
>>> People get very annoyed when pgAdmin takes too long to start!
>>>
>>> As a worst case scenario, we can add a command line switch that tells it
>>> to not bother using the tray, which can then be used in the shortcut on the
>>> menu. However, I really would like to make this fully automatic, and near
>>> instantaneous if possible, so let's try to figure it out before falling
>>> back to that hack.
>>>
>>
>> I played s