Bug 1420091 - caja terminal not shown
Summary: caja terminal not shown
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: caja-terminal
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Wolfgang Ulbrich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-07 18:44 UTC by Monem
Modified: 2017-03-10 15:20 UTC (History)
2 users (show)

Fixed In Version: caja-terminal-0.9.1-3.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-10 15:20:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Monem 2017-02-07 18:44:26 UTC
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

Comment 1 Wolfgang Ulbrich 2017-02-07 21:22:11 UTC
caja-terminal needs porting to gtk3 by upstream.
https://github.com/yselkowitz/caja-terminal

Comment 2 Monem 2017-02-09 18:43:14 UTC
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?

Comment 3 Wolfgang Ulbrich 2017-02-09 20:02:25 UTC
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.

Comment 4 Monem 2017-02-09 20:47:51 UTC
---
 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)
 
-
--

Comment 5 Wolfgang Ulbrich 2017-02-10 08:06:32 UTC
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.

Comment 6 Wolfgang Ulbrich 2017-02-10 08:27:26 UTC
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

Comment 7 Monem 2017-02-10 12:18:53 UTC
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.

Comment 8 Wolfgang Ulbrich 2017-02-21 17:13:48 UTC
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.

Comment 9 Monem 2017-02-23 06:15:48 UTC
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.

Comment 10 Wolfgang Ulbrich 2017-02-23 06:45:13 UTC
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

Comment 11 Monem 2017-02-23 07:40:22 UTC
I just built the rpm and installed/tested it and it works correctly without warnings even after playing with the preferences, colors, etc.

Comment 12 Fedora Update System 2017-02-23 08:25:32 UTC
caja-terminal-0.9.1-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d2d528355

Comment 13 Wolfgang Ulbrich 2017-02-23 08:33:08 UTC
PS: thanks a lot for your help to fixes the issue :-)

Comment 14 Monem 2017-02-23 08:39:17 UTC
Thanks to all.

by the way I added my own karma at bohdi ;-)

Comment 15 Fedora Update System 2017-02-23 23:21:30 UTC
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

Comment 16 Monem 2017-02-25 09:21:51 UTC
Installed it from the updates-testing repo and it is fine

Comment 17 Fedora Update System 2017-03-02 09:47:30 UTC
caja-terminal-0.9.1-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4d2d528355

Comment 18 Fedora Update System 2017-03-03 04:52:20 UTC
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

Comment 19 Fedora Update System 2017-03-10 15:20:11 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.