View Issue Details

IDProjectCategoryView StatusLast Update
0028481LazarusPackagespublic2015-09-07 23:27
ReporterSalvatore CoppolaAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version1.5 (SVN)Product Build 
Target Version1.6Fixed in Version1.6 
Summary0028481: Hide ButtonsPanel when non need it (pacth)
DescriptionIn some cases (i.e. ShowMessage) we don't need ButtonsPanel. The attached pacth do this
TagsNo tags attached.
Fixed in Revisionr49759
LazTarget1.6
Widgetset
Attached Files
  • messagecomposerhidebuttonspanel.diff (997 bytes)
    Index: lazarus/components/messagecomposer/messagecomposer.pas
    ===================================================================
    --- lazarus/components/messagecomposer/messagecomposer.pas	(revisione 49570)
    +++ lazarus/components/messagecomposer/messagecomposer.pas	(copia locale)
    @@ -730,7 +730,14 @@
           CaseResultCheckGroup.Checked[0] := true;
         end;
       end;
    +
       ButtonsStringGrid.AutoAdjustColumns;
    +  ButtonsPanel.Visible:=not((KindMessageComboBox.ItemIndex = 7)or    //ShowMessage
    +                          (KindMessageComboBox.ItemIndex = 9)or      //ShowMessagePos
    +                          (KindMessageComboBox.ItemIndex = 10)or     //InputQuery
    +                          (KindMessageComboBox.ItemIndex = 11)or     //InputQuery
    +                          (KindMessageComboBox.ItemIndex = 12)or     //InputBox
    +                          (KindMessageComboBox.ItemIndex = 13))      //PasswordBox;
     end;
     
     procedure TFormMessagesComposer.MessagesInitExecute(Sender: TObject);
    

Activities

Salvatore Coppola

2015-08-06 14:01

reporter  

messagecomposerhidebuttonspanel.diff (997 bytes)
Index: lazarus/components/messagecomposer/messagecomposer.pas
===================================================================
--- lazarus/components/messagecomposer/messagecomposer.pas	(revisione 49570)
+++ lazarus/components/messagecomposer/messagecomposer.pas	(copia locale)
@@ -730,7 +730,14 @@
       CaseResultCheckGroup.Checked[0] := true;
     end;
   end;
+
   ButtonsStringGrid.AutoAdjustColumns;
+  ButtonsPanel.Visible:=not((KindMessageComboBox.ItemIndex = 7)or    //ShowMessage
+                          (KindMessageComboBox.ItemIndex = 9)or      //ShowMessagePos
+                          (KindMessageComboBox.ItemIndex = 10)or     //InputQuery
+                          (KindMessageComboBox.ItemIndex = 11)or     //InputQuery
+                          (KindMessageComboBox.ItemIndex = 12)or     //InputBox
+                          (KindMessageComboBox.ItemIndex = 13))      //PasswordBox;
 end;
 
 procedure TFormMessagesComposer.MessagesInitExecute(Sender: TObject);

Bart Broersma

2015-08-16 10:58

developer   ~0085391

Use a set maybe?
  not(KindMessageComboBox.ItemIndex in [7,9,10,11,12,13])

Juha Manninen

2015-08-17 11:00

developer   ~0085400

Bart, can you please take care of this. I have many things going on right now.

Bart Broersma

2015-08-17 11:43

developer   ~0085404

Serves me rigth for being a nitpicker ;-)

Salvatore Coppola

2015-08-19 16:32

reporter   ~0085444

Yes, with set code is better, but is less readable. BTW doesn't matter how, as long as it works

Bart Broersma

2015-08-19 17:02

developer   ~0085446

Where exactly is this component used (in the IDE?)?

Alexey Tor.

2015-08-19 18:05

reporter   ~0085447

Pls do not remove TButtonPanel in dialogs(or make an opt).

Bart Broersma

2015-08-19 22:57

developer   ~0085448

The suggestion was to remove the panel only from dialogs that don't need them (see the original patch).
I don't see the need for the buttonpanel in e.g. a ShowMessage?

Salvatore Coppola

2015-08-20 00:37

reporter   ~0085451

Bart, (if I well understand), is an addon that help the programmer to compose a message dialog in source just typing ctrl+M. Usefull for wrapping "case" and "if..."

Bart Broersma

2015-08-20 19:25

developer   ~0085463

OK, installed the package.
Needs some work.
Also gave me some SIGSEGV's

Will look into it when I have the time.

Bart Broersma

2015-09-05 17:46

developer   ~0085724

Please test and close if OK.

Issue History

Date Modified Username Field Change
2015-08-06 14:01 Salvatore Coppola New Issue
2015-08-06 14:01 Salvatore Coppola File Added: messagecomposerhidebuttonspanel.diff
2015-08-16 08:30 Juha Manninen Assigned To => Juha Manninen
2015-08-16 08:30 Juha Manninen Status new => assigned
2015-08-16 10:58 Bart Broersma Note Added: 0085391
2015-08-17 10:57 Juha Manninen Assigned To Juha Manninen => Bart Broersma
2015-08-17 11:00 Juha Manninen Note Added: 0085400
2015-08-17 11:43 Bart Broersma Note Added: 0085404
2015-08-19 16:32 Salvatore Coppola Note Added: 0085444
2015-08-19 17:02 Bart Broersma Note Added: 0085446
2015-08-19 18:05 Alexey Tor. Note Added: 0085447
2015-08-19 22:57 Bart Broersma Note Added: 0085448
2015-08-20 00:37 Salvatore Coppola Note Added: 0085451
2015-08-20 19:25 Bart Broersma Note Added: 0085463
2015-09-05 17:46 Bart Broersma Fixed in Revision => r49759
2015-09-05 17:46 Bart Broersma LazTarget => 1.6
2015-09-05 17:46 Bart Broersma Note Added: 0085724
2015-09-05 17:46 Bart Broersma Status assigned => resolved
2015-09-05 17:46 Bart Broersma Fixed in Version => 1.6
2015-09-05 17:46 Bart Broersma Resolution open => fixed
2015-09-05 17:46 Bart Broersma Target Version => 1.6
2015-09-07 23:27 Salvatore Coppola Status resolved => closed