git and hg plugins work together, but the dropbox plugin prevents the icons from showing up in a git repo.
Do you have the git repo in the Dropbox directory or somewhere else?
Both cases work for me. (Tested with https://git.reviewboard.kde.org/r/114812/)
that one isn’t yet in 4.12, is it? or do dolphin’s plugins have GetHotNewStuff?
if so, i’ll try it once i get home, else i’ll patiently wait for 4.13
> that one isn’t yet in 4.12, is it?
Nope is not in 4.12
> or do dolphin’s plugins have GetHotNewStuff?
Dolphin does select the best suitable plugin automatically. So we need to find the special case (Please answer my question in comment # 2) were Dolphin does only use the Dropbox plugin and no other plugins, even if git is available.
> Please answer my question in comment # 2
Nope, no repo of any kind anywhere in my dropbox.
But, as you know from the review request, my ~/Dropbox is a symlink to another HD, so the old plugin doesn’t even work. Still it prevents the git plugin from working in my git repos. (Which live in ~/Dev/**)
It would be great if you can test this patch, because I can't reproduce this bug on my machine.
shouldn’t we wait until https://git.reviewboard.kde.org/r/114812 is there and look if it’s fixed there?
and if not, how do i compile and add such a plugin to dolphin?
PS: much thanks, of course!
> shouldn’t we wait until https://git.reviewboard.kde.org/r/114812 is there and look if it’s fixed there?
This bug has nothing in common with the plugin implementation, the problem is in Dolphin itself.
Dolphin only selects one version control plugin for a given directory. The current implementation depends on the order of available/loaded plugins, so it doesn't always select the best one. (e.g. ["dropbox", "git"] prefers dropbox over git)
The patched version tries to find the best one in all different cases, see the comments in the code if you are interested ;)
> and if not, how do i compile and add such a plugin to dolphin?
This isn't a plugin, this is a patch for Dolphin itself.
You have to clone the kde-baseapps repo, download and apply the patch of review request 114812 and then compile it.
Maybe it's easier if we include it into the next Dolphin version (after I have a ship it), then you can easily test it and if you can still reproduce this bug, you can reopen this report. ;)
> PS: much thanks, of course!
(In reply to comment #8)
> > and if not, how do i compile and add such a plugin to dolphin?
> This isn't a plugin, this is a patch for Dolphin itself.
Aah, OK. Didn’t realize that.
> You have to clone the kde-baseapps repo, download and apply the patch of
> review request 114812 and then compile it.
Can do that. I’m a Kate Dev ;)
done. it works!
Thanks for testing! Always great to get fast feedback from users/devs :)
ugh, and i now understand why there’s even a bug.
FileViewDropboxPlugin::fileName() returns ".dropbox"
– which is idiotic, because that isn’t only a file in dropbox-synced directories, but also config directory in ~. This of course means that dolphin chooses the dropbox plugin for *everything in ~*.
Your patch fixes that the dropbox plugin is always chosen for systems where it is earlier in the list than other plugins (i guess it’s simply later in the list for you, which is why you can’t reproduce it). It also makes everything more robust.
I also propose that we add a “fileIsDirectory()” method to KVersionControlPlugin2, which will be checked in addition to “fileName()” (or sth. more powerful, which allows more sophisticated checks if the file truly means we’re in a repo)
Yes exactly ;)
> I also propose that we add a “fileIsDirectory()” method to KVersionControlPlugin2
This will result in KVersionControlPlugin3
Yes we definitely need smth. better in future. - I already have some ideas, how we can make a much more powerful and future proof version control plugin system - I'll write it down when we plan the future roadmap of Dolphin.
Git commit 2a6a1f5acd6d1d8810bbf45e784c85fa9561922f by Emmanuel Pescosta.
Committed on 25/02/2014 at 18:38.
Pushed by emmanuelp into branch 'KDE/4.12'.
Fix Bug 330605 - Dropbox plugin prevents git plugin from working
Use scoring to find the best matching plugin for the given directory.
Thanks to Phil Schaf for testing this patch!
M +16 -3 dolphin/src/views/versioncontrol/versioncontrolobserver.cpp
I noticed that my git plugin was not working at all (in any directory)
so I tried with another account (i.e., without dropbox) and.. it worked!
So I ended up to see this bug and it seems that the issue is still there
or at least I don't know how to configure Dolphin so that it recognize
directories with a ".git" folder and triggers the Git plugin.
My Dolphin version (and plugins) = 21.12.3 on Ubuntu 22.04
After selecting both Dropbox and Git, I had in .config/dolphinrc
so after reading the comments here I also tried:
but it did not change the behavior: my $HOME/Dropbox directory
is still taken into account and my git folders are still not.