Pressing about twice doesn't show aboutdialog correctly

Bug #437752 reported by Ivan
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Olifant
Fix Committed
Undecided
Unassigned

Bug Description

If you press about button twice, or more, shows an aboutdialog deformed, a 1x1 window.

glnew.py:59: GtkWarning: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed
  aboutdialog.run()
glnew.py:59: GtkWarning: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed
  aboutdialog.run()
glnew.py:59: GtkWarning: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed
  aboutdialog.run()
glnew.py:59: GtkWarning: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed
  aboutdialog.run()
glnew.py:59: GtkWarning: gtk_container_foreach: assertion `GTK_IS_CONTAINER (container)' failed
  aboutdialog.run()

Revision: http://bazaar.launchpad.net/~olifanteam/olifant/latest-dev/revision/14

Changed in olifant:
status: New → Confirmed
assignee: nobody → Ivan (inovembri)
status: Confirmed → In Progress
Revision history for this message
Ahmed El-Mahdawy (propeng) wrote :

I think destroy() is destroying every control in the window, and must be initialized again.
A possible fix is to move the initialization code (everything between # About Dialog and # tray icon) to show_about, so it looks like this:

def show_about(widget, data=None):
 aboutdialog = gtk.AboutDialog()
 aboutdialog.set_name('Olifant')
 ...
 aboutdialog.set_logo(gtk.gdk.pixbuf_new_from_file('pixmaps/icon.png'))
 aboutdialog.run()
 aboutdialog.destroy()

Revision history for this message
Ivan (inovembri-deactivatedaccount) wrote :

yes, I made something similar and I moved the creation of the about window to utils.

I'm going to upload changes in the latest-dev.

Revision history for this message
Ivan (inovembri-deactivatedaccount) wrote :
Changed in olifant:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.