After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763750 - Glade allows users to use CSD in dialogs
Glade allows users to use CSD in dialogs
Status: RESOLVED OBSOLETE
Product: glade
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-16 12:45 UTC by Tristan Van Berkom
Modified: 2018-03-26 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test ui file (1.38 KB, application/x-designer)
2017-02-19 12:32 UTC, Lukas
Details
test python script to run the ui file (397 bytes, text/x-python)
2017-02-19 12:32 UTC, Lukas
Details

Description Tristan Van Berkom 2016-03-16 12:45:39 UTC
I current Glade master, Glade's inherited editor (from GtkWindow editor) allows the user to enable client side window decorations for a GtkDialog.

This is however incorrect, as GTK+ "owns" the client side window decorations slot (i.e. the window's titlebar, gtk_window_set_titlebar()) for a GtkDialog class.

Glade needs to remove access to this for GtkDialog.
Comment 1 Lukas 2017-02-18 13:23:16 UTC
Apart from, that Glade doesn't support the 'action' child of GtkDialog and the "use-header-bar" property.

My ideas on how to fix "use-header-bar" and "use-csd": Add the "use-header-bar" property to the window editor and only show it when the window actually is a dialog (and vice-versa for the "use-csd" property).

No idea on how to deal with the action child, since it isn't an actual (i.e. embedded in the dialog) child and the order matters, so we can't just have something like the image widgets of buttons.
Comment 2 Tristan Van Berkom 2017-02-19 07:13:40 UTC
Right.

The dialog situation has been a bit of a mess since CSD was introduced, quite possibly the API contract has changed more than once.

I think before we can even start to address this in Glade, we need to know for sure:

  o Can a Dialog be designed in such a way that the same .ui file can
    be used with or without CSD

    I.e. can I use the same layout on one desktop where CSD is inappropriate
    and another where it is expected ?

  o At one point action area widgets were being shoved into the header
    area, resulting in a backwards UX where dialogs read with the answer
    buttons *preceding* the question.

    Can we be sure this will never happen again ?

We could at least have a plan if we know the answers to these. If it's the case that CSD layouts are exclusive (cant reuse same dialog on non-CSD), then it may just make sense to have Glade provide 2 separate dialog UIs completely, or else Glade will have to provide an undo-able UX when the user is designing a dialog with action button or widgets in the action area, and later decides to toggle the CSD switch.
Comment 3 Lukas 2017-02-19 12:32:21 UTC
Created attachment 346182 [details]
test ui file
Comment 4 Lukas 2017-02-19 12:32:39 UTC
Created attachment 346183 [details]
test python script to run the ui file
Comment 5 Lukas 2017-02-19 12:36:26 UTC
By changing <property name="use-header-bar">-1</property> to 1 or 0, the dialog can have header bars.

> I think before we can even start to address this in Glade, we need to know
> for sure:
> 
>   o Can a Dialog be designed in such a way that the same .ui file can
>     be used with or without CSD
Yes, see the attaches files.
 
>   o At one point action area widgets were being shoved into the header
>     area, resulting in a backwards UX where dialogs read with the answer
>     buttons *preceding* the question.
Uh, oh, isn't that always the case with CSD-style dialogs?
Comment 6 GNOME Infrastructure Team 2018-03-26 15:53:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/233.