Re: [Lazarus] Missing components in component palette

2014-12-26 Thread Juha Manninen
On Fri, Dec 26, 2014 at 7:59 AM, leledumbo leledumbo_c...@yahoo.co.id wrote:
 There's a cute section in my environmenoptions.xml that might be responsible
 for this:
 component-palette-options.png
 http://free-pascal-lazarus.989080.n3.nabble.com/file/n4039904/component-palette-options.png
 Removing the whole section fixes it.

Yes, removing it was the right choice but how did this configuration
happen? There should never be visible tabs without components. A tab
without components is hidden.
Did you test the reordering while a DataModule was active? It is not
recommended because then the filtering is active. Maybe this must be
changed in the configuration GUI later, now it is kind of a feature.

The only know bug in palette reordering is related to LCL-QT. See the
mail thread Alternative component palette layout for details.
Can you import the modern layout without problems?

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Missing components in component palette

2014-12-26 Thread leledumbo
 Yes, removing it was the right choice but how did this configuration 
happen? There should never be visible tabs without components. A tab 
without components is hidden.

I really have no idea... probably a left over from... I don't know, before
this update, my component palette was fully displayed.

 Did you test the reordering while a DataModule was active?

Nope, I didn't reorder the components at all. I let the IDE does that.

 Can you import the modern layout without problems?

Umm... I can't see the import button... 
tools-options-environment-componentpalette.png
http://free-pascal-lazarus.989080.n3.nabble.com/file/n4039906/tools-options-environment-componentpalette.png
  



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Missing-components-in-component-palette-tp4039903p4039906.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Missing components in component palette

2014-12-26 Thread Giuliano Colla


Il 26/12/2014 10:43, leledumbo ha scritto:

[...]
Umm... I can't see the import button...
tools-options-environment-componentpalette.png
http://free-pascal-lazarus.989080.n3.nabble.com/file/n4039906/tools-options-environment-componentpalette.png



Did you try widening the window (making it higher)?
The import and export buttons are below the add and restore 
buttons which are the last visible buttons in your image.


Giuliano


--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Missing components in component palette

2014-12-26 Thread leledumbo
 Did you try widening the window (making it higher)? 
The import and export buttons are below the add and restore 
buttons which are the last visible buttons in your image. 

Yes, even full screen:  tools-options-componentpalette-fullscreen.png
http://free-pascal-lazarus.989080.n3.nabble.com/file/n4039908/tools-options-componentpalette-fullscreen.png
  
This is on a standard 1366x768 notebook screen, widgetset is Qt.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Missing-components-in-component-palette-tp4039903p4039908.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Alternative component palette layout

2014-12-26 Thread Giuliano Colla


Il 22/12/2014 10:05, zeljko ha scritto:

On 12/22/2014 12:29 AM, Juha Manninen wrote:

On Sun, Dec 21, 2014 at 5:27 PM, zeljko zel...@holobit.net wrote:

What could be exact bug with Qt ? Any example project ?
What is exactly affected ?


My main suspect now is line :
   TabControl.Pages.Move(TabIndex, Pal.fVisiblePageIndex);
in TComponentPage.InsertVisiblePage. It moves an exising tab to its
new position.
I noticed that the missing tabs are always the ones that existed
before doing import. Thus they are not inserted but moved.
New tabs are inserted :
   TabControl.Pages.Insert(Pal.fVisiblePageIndex, PageName);
but it apparently causes no problems.


hmm...it works fine here, but anyway, I've changed tabMove a bit, 
patch is attached, so pls test if it's ok now.




The patch has no effect, but I suspect that the problem is elsewhere, 
because in my tests the TabControl.Pages.Move() is never called.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Missing components in component palette

2014-12-26 Thread Juha Manninen
On Fri, Dec 26, 2014 at 12:34 PM, Giuliano Colla
giuliano.co...@fastwebnet.it wrote:
 Did you try widening the window (making it higher)?
 The import and export buttons are below the add and restore buttons
 which are the last visible buttons in your image.

No Giuliano, the anchors are working correctly, I tested it.
Only the Pages ListBox is resized, the buttons move together with the
window's bottom edge.
A clean rebuild may help. If it doesn't then I have no ideas.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Alternative component palette layout

2014-12-26 Thread Giuliano Colla


Il 22/12/2014 10:05, zeljko ha scritto:

On 12/22/2014 12:29 AM, Juha Manninen wrote:

On Sun, Dec 21, 2014 at 5:27 PM, zeljko zel...@holobit.net wrote:

What could be exact bug with Qt ? Any example project ?
What is exactly affected ?


My main suspect now is line :
   TabControl.Pages.Move(TabIndex, Pal.fVisiblePageIndex);
in TComponentPage.InsertVisiblePage. It moves an exising tab to its
new position.
I noticed that the missing tabs are always the ones that existed
before doing import. Thus they are not inserted but moved.
New tabs are inserted :
   TabControl.Pages.Insert(Pal.fVisiblePageIndex, PageName);
but it apparently causes no problems.




I've added some more Debugln's and made some more tests.
I've painfully rebuilt from scratch the Modern layout, for my current 
palette setup.

Import works just fine, but what fails is restoring the default layout.

The debug lines, after restore defaults tell:

TComponentPalette.UpdateNoteBookButtons: FPageCount before=14
TComponentPalette.UpdateNoteBookButtons: FPageCount after=14 PageCount=19
TComponentPalette.InsertVisiblePage: Inserting Page=Standard, at index=0
TComponentPalette.UpdateNoteBookButtons: PageIndex=0 PageName=Standard
TComponentPalette.InsertVisiblePage: Inserting Page=Additional, at 
index=1

TComponentPalette.UpdateNoteBookButtons: PageIndex=1 PageName=Additional
TComponentPalette.InsertVisiblePage: Inserting Page=Common Controls, 
at index=2
TComponentPalette.UpdateNoteBookButtons: PageIndex=2 PageName=Common 
Controls
Pages Dialog, Data Control Data Access and System appear to be already 
in their position and are not moved (which is wrong):


TComponentPalette.InsertVisiblePage: Start moving Page=Dialogs from 3 
to 3

TComponentPalette.UpdateNoteBookButtons: PageIndex=3 PageName=Dialogs
TComponentPalette.InsertVisiblePage: Start moving Page=Data Controls 
from 4 to 4
TComponentPalette.UpdateNoteBookButtons: PageIndex=4 PageName=Data 
Controls
TComponentPalette.InsertVisiblePage: Start moving Page=Data Access 
from 5 to 5

TComponentPalette.UpdateNoteBookButtons: PageIndex=5 PageName=Data Access
TComponentPalette.InsertVisiblePage: Start moving Page=System from 6 to 6
TComponentPalette.UpdateNoteBookButtons: PageIndex=6 PageName=System
Now page Misc should be added at index 7, but actually it is inserted in 
position 3, while the content is the one of the actual page 3 (i.e. 
Dialogs). The rest is inconsistent accordingly. Pages which should be 
moved aren't moved, and the content is inconsistent.

TComponentPalette.InsertVisiblePage: Inserting Page=Misc, at index=7
TComponentPalette.UpdateNoteBookButtons: PageIndex=7 PageName=Misc
TComponentPalette.InsertVisiblePage: Start moving Page=LazControls 
from 8 to 8

TComponentPalette.UpdateNoteBookButtons: PageIndex=8 PageName=LazControls
TComponentPalette.InsertVisiblePage: Start moving Page=Cairo from 9 to 9
TComponentPalette.UpdateNoteBookButtons: PageIndex=9 PageName=Cairo
TComponentPalette.InsertVisiblePage: Start moving Page=Extra from 10 
to 10

TComponentPalette.UpdateNoteBookButtons: PageIndex=10 PageName=Extra
TComponentPalette.InsertVisiblePage: Inserting Page=MultiLog, at index=11
TComponentPalette.UpdateNoteBookButtons: PageIndex=11 PageName=MultiLog
TComponentPalette.InsertVisiblePage: Start moving Page=Pascal Script 
from 12 to 12
TComponentPalette.UpdateNoteBookButtons: PageIndex=12 PageName=Pascal 
Script

TComponentPalette.InsertVisiblePage: Start moving Page=RTTI from 13 to 13
TComponentPalette.UpdateNoteBookButtons: PageIndex=13 PageName=RTTI
TComponentPalette.InsertVisiblePage: Start moving Page=SQLdb from 14 
to 14

TComponentPalette.UpdateNoteBookButtons: PageIndex=14 PageName=SQLdb
TComponentPalette.InsertVisiblePage: Start moving Page=SynEdit from 15 
to 15

TComponentPalette.UpdateNoteBookButtons: PageIndex=15 PageName=SynEdit
TComponentPalette.InsertVisiblePage: Start moving Page=Chart from 16 
to 16

TComponentPalette.UpdateNoteBookButtons: PageIndex=16 PageName=Chart
TComponentPalette.InsertVisiblePage: Start moving Page=IPro from 17 to 17
TComponentPalette.UpdateNoteBookButtons: PageIndex=17 PageName=IPro
TComponentPalette.InsertVisiblePage: Start moving Page=fpWeb from 18 
to 18
TComponentPalette.UpdateNoteBookButtons: PageIndex=18 PageName=fpWeb 


Does this trace tell something to someone who wrote the code?

Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Alternative component palette layout

2014-12-26 Thread Giuliano Colla


Il 26/12/2014 13:23, Giuliano Colla ha scritto:


Il 22/12/2014 10:05, zeljko ha scritto:

On 12/22/2014 12:29 AM, Juha Manninen wrote:

On Sun, Dec 21, 2014 at 5:27 PM, zeljko zel...@holobit.net wrote:

What could be exact bug with Qt ? Any example project ?
What is exactly affected ?


My main suspect now is line :
   TabControl.Pages.Move(TabIndex, Pal.fVisiblePageIndex);
in TComponentPage.InsertVisiblePage. It moves an exising tab to its
new position.
I noticed that the missing tabs are always the ones that existed
before doing import. Thus they are not inserted but moved.
New tabs are inserted :
   TabControl.Pages.Insert(Pal.fVisiblePageIndex, PageName);
but it apparently causes no problems.




I've added some more Debugln's and made some more tests.
I've painfully rebuilt from scratch the Modern layout, for my current 
palette setup.

Import works just fine, but what fails is restoring the default layout.
[...]

More tests. The move is performed in CreatePagesFromUserOrder():

TComponentPalette.Update, calling UpdateNoteBookButtons, 
fUpdatingPageControl=False, fNoteBookNeedsUpdate=False
TComponentPalette.CreatePagesFromUserOrder, move Standard from 8 to 0
TComponentPalette.CreatePagesFromUserOrder, move Additional from 9 to 1
TComponentPalette.CreatePagesFromUserOrder, move Common Controls from 10 to 2
TComponentPalette.CreatePagesFromUserOrder, move Dialogs from 11 to 3
TComponentPalette.CreatePagesFromUserOrder HideControls=False aVisibleCompCnt=14
TComponentPalette.CreatePagesFromUserOrder, move Data Controls from 12 to 4
TComponentPalette.CreatePagesFromUserOrder, move Data Access from 13 to 5
TComponentPalette.CreatePagesFromUserOrder, move System from 14 to 6
TComponentPalette.CreatePagesFromUserOrder, move Misc from 15 to 7
TComponentPalette.CreatePagesFromUserOrder, move LazControls from 16 to 8
TComponentPalette.CreatePagesFromUserOrder, move Cairo from 17 to 9
TComponentPalette.CreatePagesFromUserOrder, move Extra from 18 to 10
TComponentPalette.CreatePagesFromUserOrder, move MultiLog from 19 to 11
TComponentPalette.CreatePagesFromUserOrder, move Pascal Script from 20 to 12
TComponentPalette.CreatePagesFromUserOrder, move RTTI from 21 to 13
TComponentPalette.CreatePagesFromUserOrder, move SQLdb from 22 to 14
TComponentPalette.CreatePagesFromUserOrder, move SynEdit from 23 to 15
TComponentPalette.CreatePagesFromUserOrder, move Chart from 24 to 16
TComponentPalette.CreatePagesFromUserOrder, move IPro from 25 to 17
TComponentPalette.CreatePagesFromUserOrder, move fpWeb from 26 to 18
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=App 
non-visual, Index=26
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=Other 
visual, Index=25
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=Graphic, 
Index=24
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=Bars, 
Index=23
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=Containers, 
Index=22
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=Multi-line 
Edits, Index=21
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=Edits, 
Index=20
TComponentPalette.CreatePagesFromUserOrder: Deleting left-over page=Buttons, 
Index=19

Then InsertVisiblePage() works fine for the first three tabs, which are 
inserted, but it fails for the Page Dialogs, which should just be left 
untouched. It's instead mixed up with the first page which should get 
inserted at index 7.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Missing components in component palette

2014-12-26 Thread leledumbo
 A clean rebuild may help. If it doesn't then I have no ideas. 

Sorry, I was on 47056 because I thought it was a regression in 47247. Now it
appears after svn up again.

For Giuliano, yes it works. I don't test thoroughly, but at least switching
tabs work, no components seem missing. Restore default also works.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Missing-components-in-component-palette-tp4039903p4039913.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Alternative component palette layout

2014-12-26 Thread zeljko

On 12/26/2014 01:04 PM, Giuliano Colla wrote:


Il 22/12/2014 10:05, zeljko ha scritto:

On 12/22/2014 12:29 AM, Juha Manninen wrote:

On Sun, Dec 21, 2014 at 5:27 PM, zeljko zel...@holobit.net wrote:

What could be exact bug with Qt ? Any example project ?
What is exactly affected ?


My main suspect now is line :
   TabControl.Pages.Move(TabIndex, Pal.fVisiblePageIndex);
in TComponentPage.InsertVisiblePage. It moves an exising tab to its
new position.
I noticed that the missing tabs are always the ones that existed
before doing import. Thus they are not inserted but moved.
New tabs are inserted :
   TabControl.Pages.Insert(Pal.fVisiblePageIndex, PageName);
but it apparently causes no problems.


hmm...it works fine here, but anyway, I've changed tabMove a bit,
patch is attached, so pls test if it's ok now.



The patch has no effect, but I suspect that the problem is elsewhere,
because in my tests the TabControl.Pages.Move() is never called.


pretty strange that such bug is shown only with qt widgetset. Patch is 
more friendly for TabControl.Move() and better than current 
implementation IMO. Don't know how custom pages works or how it is 
coded, but setting tabs while config is loading is not good.
Is it conceptually working like this: load config,fill tabs, move tabs 
around, hide tabs which should be hidden ? Or it does it's job one by 
one tab ?


z.



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus