Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electrum-1.9.8: crash on startup with GTK UI #673

Closed
alexmat opened this issue Apr 30, 2014 · 4 comments
Closed

electrum-1.9.8: crash on startup with GTK UI #673

alexmat opened this issue Apr 30, 2014 · 4 comments

Comments

@alexmat
Copy link

alexmat commented Apr 30, 2014

Steps to Reproduce:

  1. electrum -g gtk

Actual Results:
Traceback (most recent call last):
File "/usr/lib/python-exec/python2.7/electrum", line 204, in
gui.main(url)
File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1310, in main
action = self.restore_or_create()
File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 1351, in restore_or_create
return restore_create_dialog()
File "/usr/lib64/python2.7/site-packages/electrum_gui/gtk.py", line 90, in restore_create_dialog
flags=Gtk.DialogFlags.MODAL|Gtk.DialogFlags.NO_SEPARATOR,
AttributeError: type object 'GtkDialogFlags' has no attribute 'NO_SEPARATOR'

Expected Results:
GTK UI appears

@ecdsa
Copy link
Member

ecdsa commented Apr 30, 2014

it works for me.
the gtk ui has recently been rewritten for gtk3: 9facf26
that might be the reason

@ecdsa ecdsa closed this as completed in 42a5454 Apr 30, 2014
@alexmat
Copy link
Author

alexmat commented Apr 30, 2014

After some discussion on the gentoo bug tracker, I believe the issue is as follows:

"In gtk2 GtkDialog has “has-separator” property, in gtk3 that property has been removed.
The proper fix is to remove 'Gtk.DialogFlags.NO_SEPARATOR'."

Source: https://bugs.gentoo.org/show_bug.cgi?id=509028

I am able to run 1.9.7 without issue. If I install 1.9.8, python compains about not being able to import gi module. I fix that by installing pyobject and get the "NO_SEPERATOR" error.

Looks like gtk3 removed that attribute according to this:

"-/* GtkDialog /
-/
GTK 2.22 deprecated dialog separators and 3.0 removed them

  • * We keep those however in case 2.16 has separators by default /
    -#if GTK_CHECK_VERSION(3, 0, 0)
    -# define gtk_dialog_set_has_separator(dialog, setting) /
    nothing */
    -# define GTK_DIALOG_NO_SEPARATOR"

Source: https://www.mail-archive.com/devel@lists.geany.org/msg00579.html

Please let me know if there is anything I can do to help get this fixed.

@alexmat
Copy link
Author

alexmat commented Apr 30, 2014

Here's the official porting doc explanation: https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html#id-1.6.3.3.4

It looks like gtk.py is still relying on Gtk.DialogFlags.NO_SEPARATOR on line 90 in gtk.py, I think this is what's causing the issue.

@ecdsa
Copy link
Member

ecdsa commented May 1, 2014

I already fixed this, see comment above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants