Description of problem: caja-terminal-0.9.1-1.fc25.x86_64 is installed but it it is not working in any caja file manager window. How reproducible: Always Reproducible in all F25 machines I have Steps to Reproduce: 1. dnf install caja-terminal 2. restart caja or reboot 3. Open any Caja file manager window 4. Caja terminal does not show Actual results: - Caja terminal does not show Expected results: - Caja terminal should appear
caja-terminal needs porting to gtk3 by upstream. https://github.com/yselkowitz/caja-terminal
I am not python programmer but I made some change from the upstream and the terminal is barely working with some (not important???) warnings. How should I share these changes so that it can be used in public? Should I fork the upstream github repo or make changes as a patch to be applied while building the rpm from the spec file?
Great, can you please fork the githup repo and do a pull request by upstream? This should go in upstream first. You can also attach a patch here, than i can test it too.
--- code/caja-terminal.py | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/code/caja-terminal.py b/code/caja-terminal.py index a0140e2..eb70bca 100755 --- a/code/caja-terminal.py +++ b/code/caja-terminal.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python2 # -*- coding: UTF-8 -*- ######################################################################### @@ -33,7 +33,7 @@ ## ## ############################################################################ ## ## -## WEB SITE : https://github.com/yselkowitz/caja-terminal ## +## WEB SITE : https://github.com/NiceandGently/caja-terminal ## ## ## ######################################################################### @@ -705,10 +705,10 @@ class CajaTerminal(GObject.GObject, Caja.LocationWidgetProvider): terminal.show() sclwinTerm.add(terminal) #scrollbar - terminal.set_scroll_adjustments( - gui.get_object("adjH"), - gui.get_object("adjV"), - ) +# terminal.set_scroll_adjustments( +# gui.get_object("adjH"), +# gui.get_object("adjV"), +# ) if CONF['general_showscrollbar']: vpolicy = Gtk.PolicyType.ALWAYS else: @@ -758,9 +758,9 @@ class CajaTerminal(GObject.GObject, Caja.LocationWidgetProvider): terminal.connect("focus", self.on_terminal_need_child, window, terminal, sclwinTerm, path, ) - terminal.connect("expose-event", self.on_terminal_need_child, - window, terminal, sclwinTerm, path, - ) +# terminal.connect("expose-event", self.on_terminal_need_child, +# window, terminal, sclwinTerm, path, +# ) terminal.connect("button-press-event", self.on_terminal_need_child, window, terminal, sclwinTerm, path, ) @@ -771,13 +771,13 @@ class CajaTerminal(GObject.GObject, Caja.LocationWidgetProvider): #DnD if Gtk._version != '2.0': # Missing from Gtk-2.0 introspection - terminal.drag_dest_set( - Gtk.DestDefaults.MOTION | - Gtk.DestDefaults.HIGHLIGHT | - Gtk.DestDefaults.DROP, - [('text/uri-list', 0, 80)], - Gdk.DragAction.COPY, - ) +# terminal.drag_dest_set( +# Gtk.DestDefaults.MOTION | +# Gtk.DestDefaults.HIGHLIGHT | +# Gtk.DestDefaults.DROP, +# [('text/uri-list', 0, 80)], +# Gdk.DragAction.COPY, +# ) terminal.connect("drag_motion", self.on_terminal_drag_motion) terminal.connect("drag_drop", self.on_terminal_drag_drop) terminal.connect("drag_data_received", self.on_terminal_drag_data_received) @@ -822,7 +822,7 @@ class CajaTerminal(GObject.GObject, Caja.LocationWidgetProvider): #Size rwidget.set_size_request(-1, window.nt_termheight) #fork - window.nt_lastpid = terminal.fork_command_full(Vte.PtyFlags.DEFAULT, + window.nt_lastpid = terminal.spawn_sync(Vte.PtyFlags.DEFAULT, None, [CONF['general_command']], None, GLib.SpawnFlags.SEARCH_PATH, None, None)[1] terminal.feed("\033[2K\033[1G") @@ -956,11 +956,15 @@ class CajaTerminal(GObject.GObject, Caja.LocationWidgetProvider): colors = CONF['color_palette'] else: colors = PREDEF_PALETTE['Tango'] - fg = Gdk.color_parse(CONF['color_text']) - bg = Gdk.color_parse(CONF['color_background']) + fg = Gdk.RGBA() + bg = Gdk.RGBA() + fg.parse(CONF['color_text']) + bg.parse(CONF['color_background']) palette = [] for color in colors: - palette.append(Gdk.color_parse(color)) + c = Gdk.RGBA() + c.parse(color) + palette.append(c) terminal.set_colors(fg, bg, palette) #Font font = Pango.FontDescription(CONF['font_name']) @@ -991,4 +995,3 @@ def match_path(path, path_list): CONF = Conf(CONF_FILE) - --
That works but preferences gui is broken and i see a lot of warnining in xsession-errors Traceback (most recent call last): File "/usr/share/caja-python/extensions/caja-terminal.py", line 929, in on_evResize_enter_notify_event widget.window.set_cursor(cursor) AttributeError: 'EventBox' object has no attribute 'window' Traceback (most recent call last): File "/usr/share/caja-python/extensions/caja-terminal.py", line 933, in on_evResize_leave_notify_event widget.window.set_cursor(cursor) AttributeError: 'EventBox' object has no attribute 'window' Traceback (most recent call last): File "/usr/share/caja-python/extensions/caja-terminal.py", line 842, in preferences CajaTerminalPref(self._set_terminal, terminal) File "/usr/share/caja-python/extensions/caja-terminal.py", line 347, in __init__ self.gui.add_from_file(PREF_GUI_FILE) GLib.Error: gtk-builder-error-quark: /usr/share/caja-terminal/caja-terminal-preferences.glade:983:37 Invalid property: GtkAboutDialog.has_separator (11) Btw. actual upstream is https://github.com/yselkowitz/caja-terminal I think it is really helpful to work there on the issue.
Ok removing those lines with <property name="has_separator">False</property> from glade file let's start the preferences dialog, but than there are more warnings. Traceback (most recent call last): File "/usr/share/caja-python/extensions/caja-terminal.py", line 929, in on_evResize_enter_notify_event widget.window.set_cursor(cursor) AttributeError: 'EventBox' object has no attribute 'window' Traceback (most recent call last): File "/usr/share/caja-python/extensions/caja-terminal.py", line 933, in on_evResize_leave_notify_event widget.window.set_cursor(cursor) AttributeError: 'EventBox' object has no attribute 'window' Traceback (most recent call last): File "/usr/share/caja-python/extensions/caja-terminal.py", line 489, in on_comboboxPalette_changed self._set_palette(self._conf['color_palettename']) File "/usr/share/caja-python/extensions/caja-terminal.py", line 610, in _set_palette self.demoTerm.set_colors(fg, bg, palette) TypeError: argument foreground: Expected Gdk.RGBA, but got gi.overrides.Gdk.Color Traceback (most recent call last): File "/usr/share/caja-python/extensions/caja-terminal.py", line 842, in preferences CajaTerminalPref(self._set_terminal, terminal) File "/usr/share/caja-python/extensions/caja-terminal.py", line 435, in __init__ self._put_opt() File "/usr/share/caja-python/extensions/caja-terminal.py", line 577, in _put_opt self._set_palette(self._conf['color_palettename']) File "/usr/share/caja-python/extensions/caja-terminal.py", line 610, in _set_palette self.demoTerm.set_colors(fg, bg, palette) TypeError: argument foreground: Expected Gdk.RGBA, but got gi.overrides.Gdk.Color
I fixed all the warnings I saw and done what you said about the glade file (thank you) I have created a pull request but I done't know if there will be any response from the author.
I did a scratch build for testing https://koji.fedoraproject.org/koji/taskinfo?taskID=17977486 With gtk3 patch from other PR and one of your commits and a patch for ui files from me. If it works for you i will push that quickly to repos.
Thanks for the effort but I don't know where to find the rpm of your build. All what I found on koji is your old builds only.
No, this is the new build at koji Here is the srpm of it, compare which patches are used in spec file. https://dl.dropboxusercontent.com/u/49862637/Mate-desktop/SOURCE/caja-terminal-0.9.1-2.fc25.src.rpm
I just built the rpm and installed/tested it and it works correctly without warnings even after playing with the preferences, colors, etc.
caja-terminal-0.9.1-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d2d528355
PS: thanks a lot for your help to fixes the issue :-)
Thanks to all. by the way I added my own karma at bohdi ;-)
caja-terminal-0.9.1-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d2d528355
Installed it from the updates-testing repo and it is fine
caja-terminal-0.9.1-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d2d528355
caja-terminal-0.9.1-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d2d528355
caja-terminal-0.9.1-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.