Обсуждение: ]GTK 3

Поиск
Список
Период
Сортировка

]GTK 3

От
Björn Harrtell
Дата:
Hi devs,

Have anyone investigated compiling pgadmin using wxWidgets > 2.9.4 and GTK+ 3 which can be enabled with configure option --with-gtk=3?

I'm putting an effort into it now and will share results here, but will appreciate information from anyone with existing experience.

/Björn

Re: ]GTK 3

От
Timon
Дата:
I've tried to build under fedora 23

./configure CXXFLAGS="-W./configure --with-wx-version=3.0 CXXFLAGS="-Wno-deprecated-declarations -Wl,-z,lazy -fPIC -pie" CFLAGS="-fPIC -pie"
make -j 10

but it failed on linking stage with errors like

pgAdmin3.o: In function `wxCreateApp()':
pgAdmin3.cpp:(.text+0x16): undefined reference to `wxAppConsole::CheckBuildOptions(char const*, char const*)'
pgAdmin3.o: In function `frmDlgTest::frmDlgTest()':
pgAdmin3.cpp:(.text+0x381): undefined reference to `wxDir::~wxDir()'
pgAdmin3.cpp:(.text+0x423): undefined reference to `wxDir::~wxDir()'
pgAdmin3.o: In function `pgAdmin3::OnInit()':
.....

2015-12-18 14:35 GMT+03:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
Hi devs,

Have anyone investigated compiling pgadmin using wxWidgets > 2.9.4 and GTK+ 3 which can be enabled with configure option --with-gtk=3?

I'm putting an effort into it now and will share results here, but will appreciate information from anyone with existing experience.

/Björn



--
All bugs reserved

Re: ]GTK 3

От
Björn Harrtell
Дата:
Thanks,

I'm on Debian testing and have just managed to compile wxWindows 3.0.2 against GTK 3.18, then pgadmin3 against that.

I'm surprised to report that it compiles and runs fine! I'm impressed by the API compatibility of wxWindows.

However, my initial reason for exploring this was that the standard pgadmin3 compiled against GTK 2 wasn't themed to my GNOME 3 desktop which I thought would be resolved by using GTK 3 but it does not. Some elements works as expected, like for instance the GTK 3 file browser is opened, but other issues remain. The most glaring example is that the browser tree items have a white background regardless of theme (applies to both GTK 2 and 3), and will be unreadable if using dark themes (that have light colored text).

/Björn

2015-12-18 14:04 GMT+01:00 Timon <timosha@gmail.com>:
I've tried to build under fedora 23

./configure CXXFLAGS="-W./configure --with-wx-version=3.0 CXXFLAGS="-Wno-deprecated-declarations -Wl,-z,lazy -fPIC -pie" CFLAGS="-fPIC -pie"
make -j 10

but it failed on linking stage with errors like

pgAdmin3.o: In function `wxCreateApp()':
pgAdmin3.cpp:(.text+0x16): undefined reference to `wxAppConsole::CheckBuildOptions(char const*, char const*)'
pgAdmin3.o: In function `frmDlgTest::frmDlgTest()':
pgAdmin3.cpp:(.text+0x381): undefined reference to `wxDir::~wxDir()'
pgAdmin3.cpp:(.text+0x423): undefined reference to `wxDir::~wxDir()'
pgAdmin3.o: In function `pgAdmin3::OnInit()':
.....

2015-12-18 14:35 GMT+03:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
Hi devs,

Have anyone investigated compiling pgadmin using wxWidgets > 2.9.4 and GTK+ 3 which can be enabled with configure option --with-gtk=3?

I'm putting an effort into it now and will share results here, but will appreciate information from anyone with existing experience.

/Björn



--
All bugs reserved

Re: ]GTK 3

От
Björn Harrtell
Дата:
Found the theme color issue.

Server node color is customizable and new server nodes are created with background from window and saved in .pgadmin3. 

I don't see the usefulness of this feature so I've attached patch that removes it.

I see there is alot of work to be done to modernize the usage of wxWidgets to take advantage of new widgets for trees, lists and toolbar and perhaps even the grid. Any interest in contributions towards this?

/Björn

PS. Dug alot into the code base to finally discover the above and noticed there is *alot* of work to do to properly go to wxWidgets 3.0+.

2015-12-18 14:35 GMT+01:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
Thanks,

I'm on Debian testing and have just managed to compile wxWindows 3.0.2 against GTK 3.18, then pgadmin3 against that.

I'm surprised to report that it compiles and runs fine! I'm impressed by the API compatibility of wxWindows.

However, my initial reason for exploring this was that the standard pgadmin3 compiled against GTK 2 wasn't themed to my GNOME 3 desktop which I thought would be resolved by using GTK 3 but it does not. Some elements works as expected, like for instance the GTK 3 file browser is opened, but other issues remain. The most glaring example is that the browser tree items have a white background regardless of theme (applies to both GTK 2 and 3), and will be unreadable if using dark themes (that have light colored text).

/Björn

2015-12-18 14:04 GMT+01:00 Timon <timosha@gmail.com>:
I've tried to build under fedora 23

./configure CXXFLAGS="-W./configure --with-wx-version=3.0 CXXFLAGS="-Wno-deprecated-declarations -Wl,-z,lazy -fPIC -pie" CFLAGS="-fPIC -pie"
make -j 10

but it failed on linking stage with errors like

pgAdmin3.o: In function `wxCreateApp()':
pgAdmin3.cpp:(.text+0x16): undefined reference to `wxAppConsole::CheckBuildOptions(char const*, char const*)'
pgAdmin3.o: In function `frmDlgTest::frmDlgTest()':
pgAdmin3.cpp:(.text+0x381): undefined reference to `wxDir::~wxDir()'
pgAdmin3.cpp:(.text+0x423): undefined reference to `wxDir::~wxDir()'
pgAdmin3.o: In function `pgAdmin3::OnInit()':
.....

2015-12-18 14:35 GMT+03:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
Hi devs,

Have anyone investigated compiling pgadmin using wxWidgets > 2.9.4 and GTK+ 3 which can be enabled with configure option --with-gtk=3?

I'm putting an effort into it now and will share results here, but will appreciate information from anyone with existing experience.

/Björn



--
All bugs reserved


Вложения

Re: ]GTK 3

От
Guillaume Lelarge
Дата:
2016-01-05 23:54 GMT+01:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
Found the theme color issue.

Server node color is customizable and new server nodes are created with background from window and saved in .pgadmin3. 

I don't see the usefulness of this feature so I've attached patch that removes it.


-1

I didn't see either when it was commited, but I know many users who are really fond of the feature. It helps them track which kind of servers they're connected to (production, testing, dev, etc).
 
I see there is alot of work to be done to modernize the usage of wxWidgets to take advantage of new widgets for trees, lists and toolbar and perhaps even the grid. Any interest in contributions towards this?


I would say yes, but be aware that the next major release of pgAdmin (as in pgAdmin IV) won't use wxwidgets.
 
/Björn

PS. Dug alot into the code base to finally discover the above and noticed there is *alot* of work to do to properly go to wxWidgets 3.0+.


Sure as well.
 
2015-12-18 14:35 GMT+01:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
Thanks,

I'm on Debian testing and have just managed to compile wxWindows 3.0.2 against GTK 3.18, then pgadmin3 against that.

I'm surprised to report that it compiles and runs fine! I'm impressed by the API compatibility of wxWindows.

However, my initial reason for exploring this was that the standard pgadmin3 compiled against GTK 2 wasn't themed to my GNOME 3 desktop which I thought would be resolved by using GTK 3 but it does not. Some elements works as expected, like for instance the GTK 3 file browser is opened, but other issues remain. The most glaring example is that the browser tree items have a white background regardless of theme (applies to both GTK 2 and 3), and will be unreadable if using dark themes (that have light colored text).

/Björn

2015-12-18 14:04 GMT+01:00 Timon <timosha@gmail.com>:
I've tried to build under fedora 23

./configure CXXFLAGS="-W./configure --with-wx-version=3.0 CXXFLAGS="-Wno-deprecated-declarations -Wl,-z,lazy -fPIC -pie" CFLAGS="-fPIC -pie"
make -j 10

but it failed on linking stage with errors like

pgAdmin3.o: In function `wxCreateApp()':
pgAdmin3.cpp:(.text+0x16): undefined reference to `wxAppConsole::CheckBuildOptions(char const*, char const*)'
pgAdmin3.o: In function `frmDlgTest::frmDlgTest()':
pgAdmin3.cpp:(.text+0x381): undefined reference to `wxDir::~wxDir()'
pgAdmin3.cpp:(.text+0x423): undefined reference to `wxDir::~wxDir()'
pgAdmin3.o: In function `pgAdmin3::OnInit()':
.....

2015-12-18 14:35 GMT+03:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
Hi devs,

Have anyone investigated compiling pgadmin using wxWidgets > 2.9.4 and GTK+ 3 which can be enabled with configure option --with-gtk=3?

I'm putting an effort into it now and will share results here, but will appreciate information from anyone with existing experience.

/Björn



--
All bugs reserved




--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers




--

Re: ]GTK 3

От
Dave Page
Дата:
On Wed, Jan 6, 2016 at 8:54 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> 2016-01-05 23:54 GMT+01:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
>>
>> Found the theme color issue.
>>
>> Server node color is customizable and new server nodes are created with
>> background from window and saved in .pgadmin3.
>>
>> I don't see the usefulness of this feature so I've attached patch that
>> removes it.
>>
>
> -1
>
> I didn't see either when it was commited, but I know many users who are
> really fond of the feature. It helps them track which kind of servers
> they're connected to (production, testing, dev, etc).

Right - we're not removing functionality because it doesn't work
properly (yet) in wx3. FYI, I wrote and committed that feature at
PGCon one year.

>> I see there is alot of work to be done to modernize the usage of wxWidgets
>> to take advantage of new widgets for trees, lists and toolbar and perhaps
>> even the grid. Any interest in contributions towards this?
>>
>
> I would say yes, but be aware that the next major release of pgAdmin (as in
> pgAdmin IV) won't use wxwidgets.

Correct.

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

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


Re: ]GTK 3

От
Björn Harrtell
Дата:
Yes, sorry, I made both the comments and the patch too hastily and agree that it should not be removed based on my findings.

It should be noted though that wx3 or GTK3 by themselves is not to blame here, I'm guessing it should affect wx2 and GTK2 too because it's more of a logical problem in where a user created the server node in a light theme which will save a white color for the background... then if the user switches to a dark theme, the saved white color is problematic.

I noticed work on pgadmin4 too and while interesting, I want to see pgadmin3 shine on linux desktops in the life it has left which might be quite some time (?). I see several distinct areas of work that I'd like to contribute efforts with:

1. Upgrade to latest stable wx
2. Compile with GTK+ 3.x as default on Linux (not sure it's ready for this, needs research and collaboration with dist packaging)
3. Evaluate which controls that can/need replacement (i.e replace with wxTreeListCtrl, wxDataViewCtrl and perhaps wxToolBar)
4. Refactor existing code to use the controls that pass evaulation

Feedback and guidance on how to proceed is much appreciated!

/Björn

2016-01-06 10:48 GMT+01:00 Dave Page <dpage@pgadmin.org>:
On Wed, Jan 6, 2016 at 8:54 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> 2016-01-05 23:54 GMT+01:00 Björn Harrtell <bjorn.harrtell@gmail.com>:
>>
>> Found the theme color issue.
>>
>> Server node color is customizable and new server nodes are created with
>> background from window and saved in .pgadmin3.
>>
>> I don't see the usefulness of this feature so I've attached patch that
>> removes it.
>>
>
> -1
>
> I didn't see either when it was commited, but I know many users who are
> really fond of the feature. It helps them track which kind of servers
> they're connected to (production, testing, dev, etc).

Right - we're not removing functionality because it doesn't work
properly (yet) in wx3. FYI, I wrote and committed that feature at
PGCon one year.

>> I see there is alot of work to be done to modernize the usage of wxWidgets
>> to take advantage of new widgets for trees, lists and toolbar and perhaps
>> even the grid. Any interest in contributions towards this?
>>
>
> I would say yes, but be aware that the next major release of pgAdmin (as in
> pgAdmin IV) won't use wxwidgets.

Correct.

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

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

Re: ]GTK 3

От
Dave Page
Дата:
On Thu, Jan 7, 2016 at 7:47 AM, Björn Harrtell <bjorn.harrtell@gmail.com> wrote:
> Yes, sorry, I made both the comments and the patch too hastily and agree
> that it should not be removed based on my findings.
>
> It should be noted though that wx3 or GTK3 by themselves is not to blame
> here, I'm guessing it should affect wx2 and GTK2 too because it's more of a
> logical problem in where a user created the server node in a light theme
> which will save a white color for the background... then if the user
> switches to a dark theme, the saved white color is problematic.

Well the same applies in a more default theme if you use a dark
background. I guess the answer is to say "don't do that then" - I'd
certainly prefer not to have pgAdmin try to second guess what colours
might work against whatever the theme has for the current text colour.

> I noticed work on pgadmin4 too and while interesting, I want to see pgadmin3
> shine on linux desktops in the life it has left which might be quite some
> time (?). I see several distinct areas of work that I'd like to contribute
> efforts with:
>
> 1. Upgrade to latest stable wx

That should be largely done, at least as far as compilation/linking is
concerned. As far as I know the only outstanding issue is with
resource generation when creating a Mac package.

> 2. Compile with GTK+ 3.x as default on Linux (not sure it's ready for this,
> needs research and collaboration with dist packaging)

OK.

> 3. Evaluate which controls that can/need replacement (i.e replace with
> wxTreeListCtrl, wxDataViewCtrl and perhaps wxToolBar)

I think we'd want compelling reasons to use different controls with
wx3 - and they'd need to be compelling enough to warrant additional
code complexity that would be added to continue to support wx2.

> 4. Refactor existing code to use the controls that pass evaulation
>
> Feedback and guidance on how to proceed is much appreciated!

Propose changes here, and justify why they're needed essentially. If
consensus is that a change is warranted, then work can start on a
patch.

Please do bear in mind though that I have something like 10 people
working almost exclusively on pgAdmin 4 right now, pushing us to an
alpha state by the end of Q1 - and whilst I expect pgAdmin 3 to be
around for a while yet, my, and my teams focus will be primarily on
that work.

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

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


Re: ]GTK 3

От
Björn Harrtell
Дата:
2016-01-07 12:10 GMT+01:00 Dave Page <dpage@pgadmin.org>:
On Thu, Jan 7, 2016 at 7:47 AM, Björn Harrtell <bjorn.harrtell@gmail.com> wrote:
> Yes, sorry, I made both the comments and the patch too hastily and agree
> that it should not be removed based on my findings.
>
> It should be noted though that wx3 or GTK3 by themselves is not to blame
> here, I'm guessing it should affect wx2 and GTK2 too because it's more of a
> logical problem in where a user created the server node in a light theme
> which will save a white color for the background... then if the user
> switches to a dark theme, the saved white color is problematic.

Well the same applies in a more default theme if you use a dark
background. I guess the answer is to say "don't do that then" - I'd
certainly prefer not to have pgAdmin try to second guess what colours
might work against whatever the theme has for the current text colour.

Agreed. But what about saving the color only when making an active choice so that the current system window background color is used until the user have customized the color?

> I noticed work on pgadmin4 too and while interesting, I want to see pgadmin3
> shine on linux desktops in the life it has left which might be quite some
> time (?). I see several distinct areas of work that I'd like to contribute
> efforts with:
>
> 1. Upgrade to latest stable wx

That should be largely done, at least as far as compilation/linking is
concerned. As far as I know the only outstanding issue is with
resource generation when creating a Mac package.

Great. Just upgrading will be beneficial. Looking forward especially to get an updated wxStyledTextCtrl for the query editor. Unfortunately I cannot help with Mac-issues.
 

> 2. Compile with GTK+ 3.x as default on Linux (not sure it's ready for this,
> needs research and collaboration with dist packaging)

OK.

> 3. Evaluate which controls that can/need replacement (i.e replace with
> wxTreeListCtrl, wxDataViewCtrl and perhaps wxToolBar)

I think we'd want compelling reasons to use different controls with
wx3 - and they'd need to be compelling enough to warrant additional
code complexity that would be added to continue to support wx2.

Agreed. If the changes required are very large and/or invasive it is probably not worth it, that's what I'm planning to look into. The main benefit as I see it is that the new controls are backed by native controls for the GTK and Mac versions of wx.
 

> 4. Refactor existing code to use the controls that pass evaulation
>
> Feedback and guidance on how to proceed is much appreciated!

Propose changes here, and justify why they're needed essentially. If
consensus is that a change is warranted, then work can start on a
patch.

Please do bear in mind though that I have something like 10 people
working almost exclusively on pgAdmin 4 right now, pushing us to an
alpha state by the end of Q1 - and whilst I expect pgAdmin 3 to be
around for a while yet, my, and my teams focus will be primarily on
that work.

Understandable. I look forward to be able to try out that alpha, and to hopefully contribute to that project instead in the future.
 

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

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

Re: ]GTK 3

От
Dave Page
Дата:
On Thu, Jan 7, 2016 at 11:56 AM, Björn Harrtell
<bjorn.harrtell@gmail.com> wrote:
> 2016-01-07 12:10 GMT+01:00 Dave Page <dpage@pgadmin.org>:
>>
>> On Thu, Jan 7, 2016 at 7:47 AM, Björn Harrtell <bjorn.harrtell@gmail.com>
>> wrote:
>> > Yes, sorry, I made both the comments and the patch too hastily and agree
>> > that it should not be removed based on my findings.
>> >
>> > It should be noted though that wx3 or GTK3 by themselves is not to blame
>> > here, I'm guessing it should affect wx2 and GTK2 too because it's more
>> > of a
>> > logical problem in where a user created the server node in a light theme
>> > which will save a white color for the background... then if the user
>> > switches to a dark theme, the saved white color is problematic.
>>
>> Well the same applies in a more default theme if you use a dark
>> background. I guess the answer is to say "don't do that then" - I'd
>> certainly prefer not to have pgAdmin try to second guess what colours
>> might work against whatever the theme has for the current text colour.
>
>
> Agreed. But what about saving the color only when making an active choice so
> that the current system window background color is used until the user have
> customized the color?

That seems perfectly reasonable.

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

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


Re: ]GTK 3

От
Björn Harrtell
Дата:
2016-01-07 12:58 GMT+01:00 Dave Page <dpage@pgadmin.org>:
On Thu, Jan 7, 2016 at 11:56 AM, Björn Harrtell
<bjorn.harrtell@gmail.com> wrote:
> 2016-01-07 12:10 GMT+01:00 Dave Page <dpage@pgadmin.org>:
>>
>> On Thu, Jan 7, 2016 at 7:47 AM, Björn Harrtell <bjorn.harrtell@gmail.com>
>> wrote:
>> > Yes, sorry, I made both the comments and the patch too hastily and agree
>> > that it should not be removed based on my findings.
>> >
>> > It should be noted though that wx3 or GTK3 by themselves is not to blame
>> > here, I'm guessing it should affect wx2 and GTK2 too because it's more
>> > of a
>> > logical problem in where a user created the server node in a light theme
>> > which will save a white color for the background... then if the user
>> > switches to a dark theme, the saved white color is problematic.
>>
>> Well the same applies in a more default theme if you use a dark
>> background. I guess the answer is to say "don't do that then" - I'd
>> certainly prefer not to have pgAdmin try to second guess what colours
>> might work against whatever the theme has for the current text colour.
>
>
> Agreed. But what about saving the color only when making an active choice so
> that the current system window background color is used until the user have
> customized the color?

That seems perfectly reasonable.

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

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

To follow up, it seems it will be quite a long road before mainstream distributions can use wx3 with GTK3. Longer explanation available here:

So it seems in short term the only thing worth doing is upgrading to wx3, built against GTK2 as usual for the Linux build. Please let me know if there is anything I can do to make that happen.

/Björn