View Issue Details

IDProjectCategoryView StatusLast Update
0032540LazarusWidgetsetpublic2019-04-07 10:53
ReporterSwen HeinigAssigned ToZeljan Rikalo 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSKubuntu x64OS Version17.04
Product Version1.9 (SVN)Product Build56035 
Target VersionFixed in Version 
Summary0032540: wrong button caption in TSavePictureDialog
DescriptionThe button to save a picture has the wrong caption: Open instead of Save.
TagsNo tags attached.
Fixed in Revision60861
LazTarget-
WidgetsetQT, QT5
Attached Files

Activities

Swen Heinig

2017-10-12 21:56

developer  

Juha Manninen

2017-10-13 13:26

developer   ~0103405

Last edited: 2017-10-13 13:33

View 3 revisions

Interesting. It works with GTK2 but I don't understand how.
There is :
  fCompStyle:=csSaveFileDialog;
but no decision is made based on "csSaveFileDialog" in the widgetset. Where does the caption come from? There is only:
  case AWinControl.fCompStyle of
    csForm,
    csFileDialog, csOpenFileDialog, csSaveFileDialog, csSelectDirectoryDialog,
    csPreviewFileDialog,
    csColorDialog,
    csFontDialog:
      if GtkWidgetIsA(p,gtk_window_get_type) then
        gtk_window_set_title(pGtkWindow(p),PLabel);

So, csOpenFileDialog and csSaveFileDialog are the same "case" branch.
...
Ok, the function TGtk2WSFileDialog.CreateHandle() has:
  if (FileDialog is TSaveDialog) or (FileDialog is TSavePictureDialog) then
  begin
    Action := GTK_FILE_CHOOSER_ACTION_SAVE;
    Button1 := GTK_STOCK_SAVE;
  end
I understand. Referring to global LCL classes in widgetset code is not ideal but works.

Zeljan Rikalo

2019-04-07 10:53

developer   ~0115302

Please test and close if ok.

Issue History

Date Modified Username Field Change
2017-10-12 21:56 Swen Heinig New Issue
2017-10-12 21:56 Swen Heinig File Added: Screenshot_20171012_214504.png
2017-10-13 13:03 Juha Manninen Widgetset QT5 => QT, QT5
2017-10-13 13:26 Juha Manninen Note Added: 0103405
2017-10-13 13:33 Juha Manninen Note Edited: 0103405 View Revisions
2017-10-13 13:33 Juha Manninen Note Edited: 0103405 View Revisions
2018-09-13 13:26 Juha Manninen Category IDE => Widgetset
2019-04-06 11:48 Zeljan Rikalo Assigned To => Zeljan Rikalo
2019-04-06 11:48 Zeljan Rikalo Status new => assigned
2019-04-07 10:53 Zeljan Rikalo Fixed in Revision => 60861
2019-04-07 10:53 Zeljan Rikalo Note Added: 0115302
2019-04-07 10:53 Zeljan Rikalo Status assigned => resolved
2019-04-07 10:53 Zeljan Rikalo Resolution open => fixed