Repository navigation
Conversation
|
sounds 🆒 😎 |
|
The reason to do that is that the new placeholder change might want to add entries in this menu, and so it would be much easier if we can change easily the entries without having to modify every shell extension. So far I only did the change to nautilus and dolphin. Waiting for feedback before doing the rest. The filter parametter is a regexp to on the whole filename. And the filename is made to ends with '/' for directories. Also i just tought perhaps there should be a way to set the icon |
|
@SamuAlfageme Yes, this would help for all these issue. There are some issues about graying out the menu for files that can be shared and so on. So I need to brainstorm with @ckamm on smarter filter. We also need to encode in the filter if we should disable or remove the options. |
|
@SamuAlfageme @ogoffart To make it easier to think about this, here's a list of behaviors we want:
I did not fully get whether #4608 and #6252 are related too. It seems 1. and 2. can be done with the filters @ogoffart added. For 3. we'd need to be able to control menus on a per-sync-folder level. Number 4 is hard, it means the shell integration needs to know about "is sharable" status of each file? For 5. and 6. the client would need to report connectivity per sync folder. Number 7 is done with this patch |
By making it dynamic. So far only the dolphin shell extension have been ported
Previously no menu would ever be shown if more than one file is selected. Now the GET_MENU_ITEMS command is sent with all selected files as an argument - similar to what is done for the dolphin integration.
| return {}; | ||
| } | ||
| socket.SendMsg(L"GET_STRINGS\n"); | ||
| socket.SendMsg(L"GET_STRINGS:CONTEXT_MENU_TITLE\n"); |
There was a problem hiding this comment.
I don't think you can request a particular string only right now.
There was a problem hiding this comment.
See the change in SocketApi::command_GET_STRINGS
| return false; | ||
| } | ||
|
|
||
| auto thirdCollon = source.find(L':', statusEnd + 1); |
| return false; | ||
| } | ||
|
|
||
| auto thirdCollon = source.find(L':', statusEnd + 1); |
| listener->sendMessage(QString("GET_STRINGS:BEGIN")); | ||
| for (auto key_value : strings) { | ||
| listener->sendMessage(QString("STRING:%1:%2").arg(key_value.first, key_value.second)); | ||
| if (argument.isEmpty() || argument == QLatin1String(key_value.first)) { |
There was a problem hiding this comment.
@ckamm: This change allow to request a special string.
| return {}; | ||
| } | ||
| socket.SendMsg(L"GET_STRINGS\n"); | ||
| socket.SendMsg(L"GET_STRINGS:CONTEXT_MENU_TITLE\n"); |
There was a problem hiding this comment.
See the change in SocketApi::command_GET_STRINGS
| void SocketApi::command_GET_MENU_ITEMS(const QString &argument, OCC::SocketListener *listener) | ||
| { | ||
| listener->sendMessage(QString("GET_MENU_ITEMS:BEGIN")); | ||
| bool hasSeveralFiles = argument.contains(QLatin1Char('\x1e')); // Record Separator |
There was a problem hiding this comment.
The placeholder branch does.
There was a problem hiding this comment.
Yep, you can ask to download multiple placeholders at once with this functionality :)
By making it dynamic.
So far only the nautilus and dolphin shell extension have been ported