Bug 835736 - Fails to set file dialog as transient to the main window if saving/exporting from context menu
Fails to set file dialog as transient to the main window if saving/exporting ...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: gimp (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Nils Philippsen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-26 21:52 EDT by William Bader
Modified: 2012-11-23 03:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-22 21:56:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description William Bader 2012-06-26 21:52:34 EDT
Description of problem:

Sometimes when I close gimp, I get the error messages below.

(gimp:4154): GLib-GObject-WARNING **: invalid cast from `GimpDisplayShell' to `GtkWindow'

(gimp:4154): Gtk-CRITICAL **: IA__gtk_window_set_transient_for: assertion `parent == NULL || GTK_IS_WINDOW (parent)' failed

(gimp:4154): GLib-GObject-WARNING **: invalid cast from `GimpDisplayShell' to `GtkWindow'

(gimp:4154): Gtk-CRITICAL **: IA__gtk_window_set_transient_for: assertion `parent == NULL || GTK_IS_WINDOW (parent)' failed


Version-Release number of selected component (if applicable):

~$ rpm -qa | grep gimp
gimp-libs-2.8.0-1.fc17.x86_64
gimp-resynthesizer-0.16-6.fc17.x86_64
gimp-help-browser-2.8.0-1.fc17.x86_64
gimp-data-extras-2.0.2-5.fc17.noarch
gimp-2.8.0-1.fc17.x86_64
xsane-gimp-0.998-10.fc17.x86_64
~$ uname -a
Linux sony.scs.com 3.4.3-1.fc17.x86_64 #1 SMP Mon Jun 18 19:53:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:

Happens sometimes.
It might have to do with closing the toolbox.

Steps to Reproduce:
1. not sure
2.
3.
  
Actual results:

gimp shows the error messages but seems to have worked.

Expected results:

No error messages.

Additional info:

I am running Fedora 17 with mate desktop.
Comment 1 Nils Philippsen 2012-11-13 11:36:05 EST
Sorry for taking so long to respond!

I can't reproduce this with up to date gimp packages (version 2.8.2) in GNOME Shell and with a test user using the MATE desktop. Can you still reproduce this issue?
Comment 2 William Bader 2012-11-13 16:25:05 EST
Hi,
I still get the message.
I can reproduce it:
Start gimp on a png file.
Right-click on the image.
Keeping the right mouse button down, select File -> Export...
When you release the mouse button, gimp opens the "Export Image" dialog and at the same time, writes the message below in my xterm.
I do not get the message if I select File -> Export... from the tool bar.
My desktop is mate 1.4.0.
Regards,
William

$ gimp cpag-adchart-13nov12.png 

(gimp:13863): GLib-GObject-WARNING **: invalid cast from `GimpDisplayShell' to `GtkWindow'

(gimp:13863): Gtk-CRITICAL **: IA__gtk_window_set_transient_for: assertion `parent == NULL || GTK_IS_WINDOW (parent)' failed
$ rpm -qa | grep gimp
gimp-resynthesizer-0.16-6.fc17.x86_64
xsane-gimp-0.998-12.fc17.x86_64
gimp-help-browser-2.8.2-1.fc17.x86_64
gimp-libs-2.8.2-1.fc17.x86_64
gimp-data-extras-2.0.2-5.fc17.noarch
gimp-2.8.2-1.fc17.x86_64
$ uname -a
Linux scslaptop37.scs.com 3.6.6-1.fc17.x86_64 #1 SMP Mon Nov 5 21:59:35 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Comment 3 Nils Philippsen 2012-11-14 04:45:04 EST
Thanks for the quick reply!

(In reply to comment #2)
> Keeping the right mouse button down, select File -> Export...
> When you release the mouse button, gimp opens the "Export Image" dialog and
> at the same time, writes the message below in my xterm.
> I do not get the message if I select File -> Export... from the tool bar.

This piece of information let me reproduce the issue here. It's unlikely that it's related to what kind of desktop you're running.
Comment 4 Nils Philippsen 2012-11-14 10:51:42 EST
I've just pushed a fix to upstream GIMP git master:

commit 1a4087bd5f1c79859fbfc417eff58f8e7783f335
Author:     Nils Philippsen <nils@redhat.com>
AuthorDate: Wed Nov 14 16:42:05 2012 +0100
Commit:     Nils Philippsen <nils@redhat.com>
CommitDate: Wed Nov 14 16:42:05 2012 +0100

    app: fix marking file dialogs as transient if opened from context menu
    
    GimpDisplayShell isn't a GtkWindow (anymore), therefore use
    gtk_widget_get_toplevel() to find the actual toplevel window.

I'll roll an update with this fix shortly.
Comment 5 William Bader 2012-11-14 16:47:35 EST
Thanks!
Comment 6 Fedora Update System 2012-11-15 04:26:59 EST
gimp-2.8.2-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/FEDORA-2012-18205/gimp-2.8.2-4.fc17
Comment 7 Fedora Update System 2012-11-15 04:27:12 EST
gimp-2.8.2-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/FEDORA-2012-18174/gimp-2.8.2-4.fc18
Comment 8 Fedora Update System 2012-11-15 14:58:11 EST
Package gimp-2.8.2-5.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gimp-2.8.2-5.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-18174/gimp-2.8.2-5.fc18
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2012-11-22 21:56:42 EST
gimp-2.8.2-6.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2012-11-23 03:06:25 EST
gimp-2.8.2-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.