Given the existence of this cmdline option, the approach the
transparency patch takes here (locating a terminal window) is broken by
design.

One possibility would be to no longer rely on the transient parent (and
not set that property either), but instead figure out the value of
background-darkness without having access to a terminal window.

The last time I looked at GTK+'s API, it seemed pretty easy to build up
an imaginary node with imaginary widgets of certain CSS classes/names
along its path, and query its style. I've never done it, though.

Another, probably simpler and cleaner solution would be to redesign the
Preferences UI not to require knowing this value.

Gnome-terminal's Preferences UI had several changes throughout the
years, and they went in the direction of simplification, and squeezing
into a simple line the features that really don't require two lines.
E.g. it used to have

  [x] Use the system fixed with font
  Font: [Monospace 9]

and now it has

  [x] Custom font: [Monospace 9]

Transparency also occupies two lines:

  [x] Use transparent background:  none --o----- full
  [x] Use transparency from system theme

The second one is only shown if the system theme defines a level of
transparency, as for example Ubuntu's default Ambiance does, while
GTK+'s default Adwaita doesn't. Detecting this is what causes the crash,
so would be nice not to require knowing. (On a side note, the first
option is insensitive if the second one is checked, which means the two
lines should really be swapped.)

My recommendation, in the spirit of Font's simplification on the UI:

  [x] Custom transparency:  none --o----- full

When unchecked, the transparency defined by the theme would be used
(which may be translucent, or may be fully opaque). When checked, the
slider becomes sensitive and its setting is used instead of the theme's.
There's no need for an explicit checkbox to disable/enable transparency,
disabling it can simply be achieved by sliding the slider all the way to
the left.

This would also require reducing the number of dconf options from 3 to
2, which is again IMHO a nice simplification (although ideally a one-
shot migration should be performed).

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gnome-terminal in Ubuntu.
https://bugs.launchpad.net/bugs/1745825

Title:
  Crash in "gnome-terminal --preferences" due to downstream patch

Status in gnome-terminal package in Ubuntu:
  New

Bug description:
  When gnome-terminal is _not_ running, execute the command

    gnome-terminal --preferences

  Select the Profiles tab, and click on Edit to edit whichever profile.

  gnome-terminal crashes.

  The main idea behind "gnome-terminal --preferences" is that if someone
  screws up their gnome-terminal configuration big time (e.g. set a
  custom command that fails), they can fix it. This crash makes it
  impossible using this convenient approach.

  The crash is not present in upstream gnome-terminal, it is caused by
  the transparency patch. 0001-Restore-transparency.patch adds this
  snippet to src/profile-editor.c:

    gtk_widget_style_get (GTK_WIDGET (
                terminal_window_get_active (TERMINAL_WINDOW 
(transient_parent))),
                          "background-darkness", &style_darkness,
                          NULL);

  transient_parent is NULL in this case, and
  terminal_window_get_active() is not prepared for that.

  Crash is present in Artful (3.24.2-0ubuntu4) as well as current Bionic
  (3.26.2-3ubuntu1). Xenial is not affected because the cmdline option
  --preferences didn't exist back then.

  ProblemType: Bug
  DistroRelease: Ubuntu 17.10
  Package: gnome-terminal 3.24.2-0ubuntu4
  ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
  Uname: Linux 4.13.0-32-generic x86_64
  ApportVersion: 2.20.7-0ubuntu3.7
  Architecture: amd64
  CurrentDesktop: Unity:Unity7:ubuntu
  Date: Sun Jan 28 11:51:23 2018
  InstallationDate: Installed on 2016-11-09 (444 days ago)
  InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
  SourcePackage: gnome-terminal
  UpgradeStatus: Upgraded to artful on 2017-09-21 (128 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/1745825/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to