Error showing url: Operation not supported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LinuxDC++ |
New
|
Undecided
|
Unassigned |
Bug Description
When links are posted in chat, clicking them or right clicking and selecting "Open link in default application" results in the error (reported to terminal) "Error showing url: Operation not supported". I'm not sure why this started happening, but it used to work fine. It may be because a related lib package was updated and no longer handles the call the same. Using linuxdcpp 1.0.3-1 from Debian repository. Also tried with launchpad 1.0.3 source compiled with `scons -j 4 release=true`.
Compiled the current bzr branch lp:linuxdcpp (LinuxDC++ version: 1.0.3+bzr Core version: 0.7091) with same scons options and it gives me "Failed to open URI: Operation not supported" (slightly different error message).
Side note: There should be instructions for checking out the latest code with bzr on this launchpad site somewhere instead of only on ubuntu forums.
Found the source of the problem. Even though I was passing true for:
#if GTK_CHECK_ VERSION( 2, 14, 0)
(line 220 of linux/WulforUtil.cc of latest bzr)
(I'm using libgtk 2.14.7-5, which I just updated to yesterday) it seems that gtk_show_uri still requires gvfs to operate, which is weird because I thought that Gnome was trying to get rid of gvfs (at least by the time of gtk+ 3.0).
Perhaps should make gvfs a dependency of ldcpp, or perhaps make your nested ifs go something like (starting at line 220):
#if GTK_CHECK_ VERSION( 2, 14, 0) async(NULL, argv, NULL, G_SPAWN_ SEARCH_ PATH, NULL, NULL, NULL, &error);
gtk_show_uri(NULL, (gchar *)uri.c_str(), GDK_CURRENT_TIME, &error);
#if error /* Woops, no gvfs */
gchar *argv[3];
argv[0] = (gchar *)"xdg-open";
argv[1] = (gchar *)uri.c_str();
argv[2] = NULL;
g_spawn_
#endif
#else
gchar *argv[3];
and continue the checks for OS and etc as how it was.