yselkowitz / caja-terminal

caja-terminal is a embedded terminal in caja
GNU General Public License v3.0
4 stars 5 forks source link

Rebased on the Gtk3 branch and squashed my commits #7

Closed mmonem closed 7 years ago

mmonem commented 7 years ago
  1. More use of Gdk.RGBA
  2. Commented 'expose-event' signal connection
  3. Commented the call of terminal.drag_dest_set()
  4. Commented the call of widget.window.set_cursor in on_evResize_enter_notify_event() and on_evResize_leave_notify_event
  5. Removed False from preferences glade file (thanks for Wolfgang Ulbrich)
raveit65 commented 7 years ago

I just tested the PR. Changing the fontcolor in preferences gives me this errors.

Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 498, in on_clbtnPalette_color_set
    self._set_palette(self._conf['color_palettename'])
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 605, in _set_palette
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(colors[i])))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 477, in on_clbtnFg_color_set
    self._set_palette(self._conf['color_palettename'])
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 605, in _set_palette
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(colors[i])))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
Traceback (most recent call last):
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 449, in on_btnOk_clicked
    self._callback(self._terminal)
  File "/usr/share/caja-python/extensions/caja-terminal.py", line 957, in _set_terminal
    palette.append(Gdk.RGBA().from_color(Gdk.color_parse(color)))
  File "/usr/lib64/python2.7/site-packages/gi/overrides/Gdk.py", line 117, in from_color
    return cls(color.red_float, color.green_float, color.blue_float)
AttributeError: 'NoneType' object has no attribute 'red_float'
mmonem commented 7 years ago

Please give it a try after fixing it. I couldn't reproduce next errors. May be they have gone after fixing the first one

raveit65 commented 7 years ago

Yeap, changing bg and font color works now, thanks. I get only those warnings in xsession-errors

sys:1: PyGIWarning: Caja was imported without specifying a version first. Use gi.require_version('Caja', '2.0') before import to ensure that the right version gets loaded.
TypeError: on_terminal_child_exited() takes exactly 3 arguments (4 given)

First one happens on start and second one on terminal exit, ie, if you set up showing the terminal only for home dir and you navigate to another dir.

mmonem commented 7 years ago

I had no luck fixing the first warning but I fixed the second.

I guess the first one is not blocking and we can live with it however it occurs only once

raveit65 commented 7 years ago

I can confirm that last warning is fixed :-)

mmonem commented 7 years ago

In my trials I removed the from gi.repository import Caja statement completely but that warning was still there. Looks like caja-terminal.py starts with Caja already imported in the context.

May be it is from python-caja package or something just before caja-terminal

raveit65 commented 7 years ago

see https://github.com/yselkowitz/caja-terminal/pull/8

mmonem commented 7 years ago

Yes I tested it and It is working and free of warnings.

I think we should not wait for a resolution for the import Caja issue because it is not not neither critical nor annoying nor clear to be resolved

raveit65 commented 7 years ago

The only point i see is do we really need gtk+-2 support now as all major distros switched MATE to gtk3 already? With gtk+-3 only code i can start fix deprecations in glade files.

mmonem commented 7 years ago

But we are working already on the gtk3 branch, don't we?

yselkowitz commented 7 years ago

I think we can drop gtk+2 compatibility in the gtk3 branch.

yselkowitz commented 7 years ago

I tried applying all the patches currently in Fedora, but caja crashes when pushing the button which should open the Preferences dialog. Was this tested?

raveit65 commented 7 years ago

Hmm, sure you're using this? http://pkgs.fedoraproject.org/cgit/rpms/caja-terminal.git/commit/?id=109517ce0c7e7e2306d553c813c99f202a59d56e This is for using with latest tarball. I just tested package from updates-testing again. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d2d528355 No crash if i press the preferences button. Of course i tested UI changes before i created the patch for the ui file.

mmonem commented 7 years ago

Same for me. Tested and no crashes.

raveit65 commented 7 years ago

Any news? or should i drop caja-terminal and python-caja in fedora if you don't have the time to maintain it?

yselkowitz commented 7 years ago

Pulled #8 instead, which included the "child-exited" commit from here.