'quick open' and 'file browser panel' conflict

Bug #879632 reported by dave moore
46
This bug affects 13 people
Affects Status Importance Assigned to Milestone
gedit-plugins
Fix Released
Medium
gedit-plugins (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

in gedit
Given 'quick open' and 'file browser panel' are both enabled
When I press ctrl+alt+o
Then the console reports
Traceback (most recent call last):
   File "/usr/lib/gedit/plugins/quickopen/__init__.py", line 179, in on_quick_open_activate
     self._create_popup() File "/usr/lib/gedit/plugins/quickopen/__init__.py", line 96, in _create_popup
     msg = bus.send_sync('/plugins/filebrowser', 'get_root')
AttributeError: 'MessageBus' object has no attribute 'send_sync'

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gedit-plugins 3.2.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Fri Oct 21 13:26:13 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gedit-plugins
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
dave moore (davlv) wrote :
Revision history for this message
Ryan Murphy (rdmurphy) wrote :

I encountered the same issue and found a decent solution. For anyone else having the same issue it's easy to patch yourself for now.

First I tried changing the QuickOpen code to use the bus.send_message_sync function, since the convenience function send_sync disappeared in this version. I had a create a Message object for that. But it looks like Filebrowser doesn't us the new Message/MessageBus API either (based on errors and guessing only) and so that was a dead end.

Finally, I found this function at https://github.com/gmate/gmate. It avoid the use of the message bus completely.
    def get_filebrowser_root(self):
        base = u'org.gnome.gedit.plugins.filebrowser'

        settings = Gio.Settings.new(base)
        root = settings.get_string('virtual-root')

        if root is not None:
            filter_mode = settings.get_strv('filter-mode')

            if 'hide-hidden' in filter_mode:
                self._show_hidden = False
            else:
                self._show_hidden = True

            return root

Then I commented out the failing bus/msg code (all the way from getting the bus to using the msg) and replaced it with this. Most of this is from the same github repo.
    fbroot = self.get_filebrowser_root()
    if fbroot != "" and fbroot is not None:
        paths.append(Gio.file_new_for_uri(fbroot))

And it worked!

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gedit-plugins (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Toscano (robert-l-toscano) wrote :

Looking at gedit(3.2) code, it should have the send_sync function:

http://git.gnome.org/browse/gedit/tree/gedit/Gedit.py?h=gnome-3-2

Maybe Gedit.py is not being loaded or something. Does anyone know if there is a separate bug in the gnome project for this?

Revision history for this message
David Wilkie (dwilkie) wrote :

I added a bug here on 2011-10-15 10:37:49 UTC:

https://bugzilla.gnome.org/show_bug.cgi?id=661836

Someone said it was resolved but I still get the same error with Gedit 3.2.1 and I can't find the commit that fixes it.

Sam_ (and-sam)
tags: added: amd64
Revision history for this message
Sam_ (and-sam) wrote :

Still the case with Precise.
gedit-plugins:
  Installed: 3.3.1-0ubuntu1
  Candidate: 3.3.1-0ubuntu1
  Version table:
 *** 3.3.1-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

.xsession-errors says:
Gtk-CRITICAL **: gtk_list_store_set_column_types: assertion `priv->columns_dirty == 0' failed
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/quickopen/__init__.py", line 179, in on_quick_open_activate
    self._create_popup()
  File "/usr/lib/gedit/plugins/quickopen/__init__.py", line 96, in _create_popup
    msg = bus.send_sync('/plugins/filebrowser', 'get_root')
AttributeError: 'MessageBus' object has no attribute 'send_sync'

tags: added: precise unity
Changed in gedit-plugins:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Luciano Panepucci (lpanebr) wrote :

Sorry, where is the fix?

Revision history for this message
Doug McMahon (mc3man) wrote :

Luciano -
It was fixed, (here) in 12.04 by this gedit release -
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/953957

Revision history for this message
Vadim Rutkovsky (roignac) wrote :

I guess, we can mark this as Fix Released in Precise. Is this still reproducible?

Changed in gedit-plugins (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Luciano Panepucci (lpanebr) wrote :

Thanks Doug, so I need to upgrade to 12.04 or is there a way to fix it in my 11.10 installed system?

Revision history for this message
Doug McMahon (mc3man) wrote :

Luciano -
IF I were you I'd ck. out 12.04 when it releases, overall vastly superior to 11.10 though as usual there were a few 'take aways'

Otherwise maybe they will fix 11.10, there's no reason it shouldn't have worked, 'Gedit.py' is in 11.10's gedit source, it just isn't installed with the 11.10 package

You could easily build 11.10's gedit source (or 3.2.6) & install, it would then work. It's also likely you could build 11.10's gedit source & just copy the Gedit.py files to the appropriate places.

I use 12.04 but booted to a live 11.10 session & did both of the above, (installed, copied), after a logout both ways worked, which is better ??, I likely do a build & install

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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