Bug 835736 - Fails to set file dialog as transient to the main window if saving/exporting from context menu
Summary: Fails to set file dialog as transient to the main window if saving/exporting ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gimp
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-27 01:52 UTC by William Bader
Modified: 2012-11-23 08:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-23 02:56:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description William Bader 2012-06-27 01:52:34 UTC
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 16:36:05 UTC
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 21:25:05 UTC
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 09:45:04 UTC
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 15:51:42 UTC
I've just pushed a fix to upstream GIMP git master:

commit 1a4087bd5f1c79859fbfc417eff58f8e7783f335
Author:     Nils Philippsen <nils>
AuthorDate: Wed Nov 14 16:42:05 2012 +0100
Commit:     Nils Philippsen <nils>
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 21:47:35 UTC
Thanks!

Comment 6 Fedora Update System 2012-11-15 09:26:59 UTC
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 09:27:12 UTC
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 19:58:11 UTC
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-23 02:56:42 UTC
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 08:06:25 UTC
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.