← Back to team overview

desktop-packages team mailing list archive

[Bug 879632] Re: 'quick open' and 'file browser panel' conflict

 

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!

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gedit-plugins in Ubuntu.
https://bugs.launchpad.net/bugs/879632

Title:
  'quick open' and  'file browser panel' conflict

Status in “gedit-plugins” package in Ubuntu:
  Confirmed

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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gedit-plugins/+bug/879632/+subscriptions


References