Gecko uses the 'm' prefix on variables if they are member variables, but these
are local variables, so please rename mDBusConnection and mDBusProxy to something without the prefix, but still starting with a lower-case letter.
The initialization is unnecessary here, but this is C++ code, so these can be
declared when they are first set, and that is Gecko style. e.g.
Comment on attachment 826479 g-Folder- doesn-t- highlight- .patch
0001-Bug-417952-Open-Containin
Thanks. This is good. Just some minor things:
>+ DBusGConnection* mDBusConnection = nullptr;
>+ DBusConnection* dbusConnection = nullptr;
>+ DBusGProxy* mDBusProxy = nullptr;
>+ gboolean rv_dbus_call;
Gecko uses the 'm' prefix on variables if they are member variables, but these
are local variables, so please rename mDBusConnection and mDBusProxy to something without the prefix, but still starting with a lower-case letter.
The initialization is unnecessary here, but this is C++ code, so these can be
declared when they are first set, and that is Gecko style. e.g.
DBusGConnection* mDBusConnection = dbus_g_ bus_get( DBUS_BUS_ SESSION, &error);
Initializing out parameters, as you have with |error|, is often good
(and may be necessary even - I haven't checked).
>+ nsAutoCString uri("file://");
>+ uri.Append(aUri);
Please use g_filename_ to_uri( aPath, nullptr, nullptr) to do any necessary
escaping.
>+ const char *uris[2] = { (const char*) uri.get(), NULL };
The (const char*) can be removed now, I assume.
Also, please use nullptr instead of NULL as nullptr provides more type safety
than a plain 0.
>+ } else if (giovfs && giovfs- >OrgFreedesktop FileManager1Sho wItems( mPath) == NS_OK) {
Gecko style is usually to write
NS_SUCCEEDED (giovfs- >OrgFreedesktop FileManager1Sho wItems( mPath))
> [noscript] void showURIForInput(in ACString uri); .FileManager1 interface */ ileManager1Show Items(in ACString uri);
>+
>+ /* Open uri in file manager using org.freedesktop
>+ [noscript] void orgFreedesktopF
showURIForInput set a bad precedent here because the parameter is a path, not a
uri.
Please name the parameter for the new method "path", and update the comment.
I assume that is easier than changing the caller to pass a uri.