Xfce Wiki

Sub domains

Appfinder panel plugin

README (from repo):

Application Finder Panel Applet (appfinder)

Appfinder is an extension for the Xfce Panel. It enables users to add a button
to the panel, which, when pressed, pops up an appfinder widget
(same as the one displayed by running an xfce4-appfinder command).
The differences between this panel and having a simple launcher on the panel
that starts xfce4-appfinder are:
- the button is configurable, i.e.:
  * it can have an icon, a label, or both,
  * it can occupy the whole width of the panel.
- the configuration dialog is available by right-clicking on the button
  and the appfinder window isn't cluttered with buttons such as "preferences",
  "close" or "launch".
- pressing the button toggles the appfinder window on/off rather than starting
  several instances of xfce4-appfinder.


Pending issues:

  1. no plugin preferences
  2. no keyboard focus – using a GTK_WINDOW_POPUP (like menu) but it needs additional code to handle focus.
  3. “ if I click outside the widget, I'd like it to close - this isn't the case atm” – Related to 2?
    • I've hit a serious problem here - in order to implement this feature I had to “grab” the pointer (gdk_pointer_grab), which seems to be incompatible with GtkSocket/GtkPlug widgets. With gdk_pointer_grab active events don't reach the appfinder widget (and only it). Unless there is an obvious mistake somewhere, it might be necessary to rework the plugin using only DBus API (without widget embedding with GtkSocket/GtkPlug). Bummer. — Andrzej 2012/02/18 15:04
  4. GTK_WINDOW_POPUP makes direct window resizing impossible (has to be done through a preference dialog). Is it possible to make a toplevel window without title bar but with resizing frames?
  5. will (probably) have to disable collapsed mode – other possibilities: set size requisition in the widget (doesn't allow scaling the window down (?)) or add a DBUS signal for mode changes.
  6. strange behaviour of mouse clicks – fixed in repo
  7. for some reason the widget looks a bit different when used in xfce4-appfinder and in the plugin
  8. “I would rename the “Open” D-Bus methods to “Create…” or “Show…”, as open is a term rarely used for windows in APIs.” – what about API compatibility?
  9. “Also, perhaps rename XfceAppfinderWidget to XfceAppfinderView, widget is just so generic, I mean, everything is a widget.” – good point, BTW calling it “widget” created some name clashes with widgets, I'll gladly rework it.
  10. “ The .desktop.in file i missing” – added in repo
  11. “a –daemon option but […] doesn't work well. Each time I ask the daemon to open a window/widget it loads all the icons, which takes time.”
  12. no remote xfce4-popup-appmenu script – fixed in repo

Pending design decisions:

  2. How to implement –daemon option so that it (pre-)caches icons instead of loading them every time a widget is open (issue 10)
  3. (in the future) what should we use instead of GtkSocket/GtkPlug?