Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nautilus extension support #575

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

add nautilus extension support #575

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented May 15, 2015

WIP:

  • make it work and load by nautilus
  • show sync status column
  • show overlay icons
  • handle the seaf-daemon's down more gracefully
  • update repos regularly
  • teach cmake to learn how to install extension
  • update overlay icon when status changes
  • fix broken emblem refresh issue
  • clean up the unsynced repos' icons
  • readonly state
  • lock state support
  • add a menu item to share link
  • add a menu item to lock/unlock file

Closes haiwen/seafile#1233.

@ghost ghost added the platform-linux label May 15, 2015
@ghost
Copy link
Author

ghost commented May 15, 2015

screenshot from 2015-05-16 02 51 32

@ghost ghost force-pushed the nautilus_extension branch 3 times, most recently from 60cfd42 to dcfb29d Compare May 16, 2015 09:32
@ghost
Copy link
Author

ghost commented May 16, 2015

Most part of it should work now. Please visit https://github.com/haiwen/seafile-client/tree/nautilus_extension/nautilus-seafile for how to install on your system!

@ghost ghost force-pushed the nautilus_extension branch from a990004 to ae3d7f4 Compare May 16, 2015 09:53
@ghost ghost force-pushed the nautilus_extension branch from d76df68 to b0bd47d Compare June 8, 2015 03:16
@dakira
Copy link

dakira commented Jun 9, 2015

add a menu item to share link (N/A)

Hey @Chilledheart, does this mean there's not going to be a context menu to create a share link? I thought this was the point of the extension. ;)

@ghost
Copy link
Author

ghost commented Jun 9, 2015

@dakira I will do this part once I have enough time.

@bertvandepoel
Copy link

Might I suggest making this also available to Caja and other Nautilus forks. Caja is the file manager for MATE and extensions work exactly the same as Nautilus for 99% of all cases.

@dakira
Copy link

dakira commented Jun 15, 2015

@bertvandepoel There is no need. The Nautilus forks (and all other file managers) can just use the available code as a reference to build their own. That's how it worked with Dropbox. You should contact the MATE devs.

@bertvandepoel
Copy link

@dakira I'll contact them then ;)

@ghost ghost force-pushed the nautilus_extension branch from b0bd47d to d804779 Compare June 25, 2015 10:18
@ghost ghost force-pushed the nautilus_extension branch 5 times, most recently from eb3335a to 3488a80 Compare July 10, 2015 08:12
@ghost ghost added the PR-feature label Jul 10, 2015
Chilledheart added 3 commits July 10, 2015 17:09
Closes haiwen/seafile#1233.

- ci: add nautilus build
- improve client auotconnect handle
- autorefresh overlay icons
- cmake learns how to install and uninstall nautilus-seafile now
- support readonly state
- support locked/locked-by-me state
@ghost ghost force-pushed the nautilus_extension branch from 3488a80 to 7f68ef0 Compare July 10, 2015 09:59
@ricardoteixeiraduarte
Copy link

Will this be merged soon?
Also, what version of ccnet was used? "master" does not work.

@ghost
Copy link
Author

ghost commented Nov 9, 2015

cc @lins05

@ghost
Copy link
Author

ghost commented Nov 9, 2015

cc @killing

@killing
Copy link
Member

killing commented Nov 10, 2015

The code is not completely stable yet. We still need some time to improve it. Unfortunately we don't have much time to work on this recently.

@slyholborn
Copy link

I've got errors while trying to compile it on fedora 23 : is it the right place to check this out?

`./build.sh
which: no ninja in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/sylvain/.local/bin:/home/sylvain/bin)

  • set -e
    ++ dirname ./build.sh
  • CURRENT_PWD=.
    ++ uname -s
  • '[' Linux '!=' Linux ']'
  • pushd .
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile
  • CONFIG=Debug
  • '[' a '!=' adebug ']'
  • rm -rf CMakeCache.txt CMakeFiles
  • CONFIG=Release
  • cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=on
    -- The C compiler identification is GNU 5.3.1
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
    -- Checking for module 'glib-2.0>=2.15'
    -- Found glib-2.0, version 2.46.2
    -- Checking for module 'libnautilus-extension>=2.0'
    -- Found libnautilus-extension, version 3.18.5
    -- Checking for module 'libccnet>=1.3'
    -- Found libccnet, version 1.4.2
    -- Checking for module 'libsearpc>=1.0'
    -- Found libsearpc, version 3.0.7
    -- Checking for module 'libseafile>=1.7'
    -- Found libseafile, version 5.0.1
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile
  • make
    Scanning dependencies of target nautilus-seafile
    [ 25%] Building C object CMakeFiles/nautilus-seafile.dir/seafile-module.c.o
    In file included from /usr/include/glib-2.0/glib.h:62:0,
    from /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/nautilus-seafile.h:3,
    from /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c:2:
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c: Dans la fonction ‘nautilus_module_initialize’:
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c:8:16: attention : trop d'arguments pour le format [-Wformat-extra-args]
    g_message ("Initializing nautilus-seafile extension\n", NULL);
    ^
    /usr/include/glib-2.0/glib/gmessages.h:158:32: note: in definition of macro ‘g_message’
    VA_ARGS)
    ^
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c: Dans la fonction ‘nautilus_module_shutdown’:
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c:15:16: attention : trop d'arguments pour le format [-Wformat-extra-args]
    g_message ("Unloading nautilus-seafile extension\n", NULL);
    ^
    /usr/include/glib-2.0/glib/gmessages.h:158:32: note: in definition of macro ‘g_message’
    VA_ARGS)
    ^
    [ 50%] Building C object CMakeFiles/nautilus-seafile.dir/nautilus-seafile.c.o
    [ 75%] Building C object CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c: Dans la fonction ‘seafile_rpc_instance_connect’:
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c:42:9: erreur: too few arguments to function ‘ccnet_client_load_confdir’
    if (ccnet_client_load_confdir (sync_client_, ccnet_dir) < 0)
    ^
    In file included from /usr/include/ccnet.h:17:0,
    from /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c:5:
    /usr/include/ccnet/ccnet-client.h:125:5: note: declared here
    int ccnet_client_load_confdir (CcnetClient client, const char *central_config
    ^
    In file included from /usr/include/ccnet.h:12:0,
    from /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c:5:
    /home/sylvain/Téléchargements/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c: Hors de toute fonction :
    /usr/include/ccnet/message.h:76:13: attention : inline function ‘ccnet_message_body_dup’ declared but never defined
    inline void ccnet_message_body_dup (CcnetMessage *msg, char *body);
    ^
    /usr/include/ccnet/message.h:74:13: attention : inline function ‘ccnet_message_body_take’ declared but never defined
    inline void ccnet_message_body_take (CcnetMessage *msg, char *body);
    ^
    CMakeFiles/nautilus-seafile.dir/build.make:110: recipe for target 'CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o' failed
    make[2]: *_* [CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o] Error 1
    CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/nautilus-seafile.dir/all' failed
    make[1]: *** [CMakeFiles/nautilus-seafile.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error `2
    ``
    Thank you!

@shoeper
Copy link
Collaborator

shoeper commented Mar 20, 2016

Are there plans to finish this?

I got this error trying to install it.

Information about my system: Fedora 23 (Linux fedora 4.4.4-301.fc23.x86_64 #1 SMP Fri Mar 4 17:42:42 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux)
I did first follow http://manual.seafile.com/build_seafile/linux.html
Next I'd run sudo dnf install autogen nautilus-devel and then the following.

[shoeper@fedora nautilus-seafile]$ ./build.sh 
+ set -e
++ dirname ./build.sh
+ CURRENT_PWD=.
++ uname -s
+ '[' Linux '!=' Linux ']'
+ pushd .
~/Dokumente/Seafile/seafile-client/nautilus-seafile ~/Dokumente/Seafile/seafile-client/nautilus-seafile
+ CONFIG=Debug
+ '[' a '!=' adebug ']'
+ rm -rf CMakeCache.txt CMakeFiles
+ CONFIG=Release
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=on
-- The C compiler identification is GNU 5.3.1
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- Checking for module 'glib-2.0>=2.15'
--   Found glib-2.0, version 2.46.2
-- Checking for module 'libnautilus-extension>=2.0'
--   Found libnautilus-extension, version 3.18.5
-- Checking for module 'libccnet>=1.3'
--   Found libccnet, version 5.0.6
-- Checking for module 'libsearpc>=1.0'
--   Found libsearpc, version 3.0.7
-- Checking for module 'libseafile>=1.7'
--   Found libseafile, version 5.0.6
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shoeper/Dokumente/Seafile/seafile-client/nautilus-seafile
+ ninja
[3/4] Building C object CMakeFiles/n...s-seafile.dir/seafile-rpc-client.c.o
FAILED: /usr/bin/cc  -Dnautilus_seafile_EXPORTS -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nautilus -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/searpc -pedantic -Wall -Wextra -Wsign-compare -Wno-long-long -Wno-unused-parameter -std=gnu99 -fdiagnostics-color=always -O3 -DNDEBUG -fPIC -MMD -MT CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o -MF CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o.d -o CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o   -c seafile-rpc-client.c
seafile-rpc-client.c: In Funktion »seafile_rpc_instance_connect«:
seafile-rpc-client.c:42:9: Fehler: Zu wenige Argumente für Funktion »ccnet_client_load_confdir«
     if (ccnet_client_load_confdir (sync_client_, ccnet_dir) < 0)
         ^
In file included from /usr/include/ccnet.h:17:0,
                 from seafile-rpc-client.c:5:
/usr/include/ccnet/ccnet-client.h:125:5: Anmerkung: hier deklariert
 int ccnet_client_load_confdir (CcnetClient *client, const char *central_config_dir, const char *confdir);
     ^
In file included from /usr/include/ccnet.h:12:0,
                 from seafile-rpc-client.c:5:
seafile-rpc-client.c: Auf höchster Ebene:
/usr/include/ccnet/message.h:76:13: Warnung: Inline-Funktion »ccnet_message_body_dup« deklariert, aber nirgendwo definiert
 inline void ccnet_message_body_dup (CcnetMessage *msg, char *body);
             ^
/usr/include/ccnet/message.h:74:13: Warnung: Inline-Funktion »ccnet_message_body_take« deklariert, aber nirgendwo definiert
 inline void ccnet_message_body_take (CcnetMessage *msg, char *body);
             ^
[3/4] Building C object CMakeFiles/n...tilus-seafile.dir/seafile-module.c.o
In file included from /usr/include/glib-2.0/glib.h:62:0,
                 from nautilus-seafile.h:3,
                 from seafile-module.c:2:
seafile-module.c: In Funktion »nautilus_module_initialize«:
seafile-module.c:8:16: Warnung: zu viele Argumente für Format [-Wformat-extra-args]
     g_message ("Initializing nautilus-seafile extension\n", NULL);
                ^
/usr/include/glib-2.0/glib/gmessages.h:158:32: Anmerkung: in Definition des Makros »g_message«
                                __VA_ARGS__)
                                ^
seafile-module.c: In Funktion »nautilus_module_shutdown«:
seafile-module.c:15:16: Warnung: zu viele Argumente für Format [-Wformat-extra-args]
     g_message ("Unloading nautilus-seafile extension\n", NULL);
                ^
/usr/include/glib-2.0/glib/gmessages.h:158:32: Anmerkung: in Definition des Makros »g_message«
                                __VA_ARGS__)
                                ^
[3/4] Building C object CMakeFiles/n...lus-seafile.dir/nautilus-seafile.c.o
ninja: build stopped: subcommand failed.

@jhasse
Copy link

jhasse commented Nov 22, 2016

@shoeper Try jhasse@78082a8

@shoeper
Copy link
Collaborator

shoeper commented Nov 22, 2016

@jhasse thanks, works here.

@benruijl
Copy link

benruijl commented Apr 3, 2017

Are there any plans to continue development?

@shoeper
Copy link
Collaborator

shoeper commented Apr 4, 2017

Installing this still works here.

@benruijl
Copy link

benruijl commented Apr 4, 2017

I meant progress on actually merging the pull request, although it's good to know that the current version works.

@shoeper
Copy link
Collaborator

shoeper commented Apr 4, 2017

Afaik the dev submitting the PR is not working on Seafile anymore. As long as no one from the community makes it production ready I don't think something is going to happen.

@benruijl
Copy link

benruijl commented Apr 5, 2017

I've picked up development of the nautilus extension and added some fixes. You can find the latest version here: https://github.com/benruijl/seafile-client/tree/nautilus_extension
It's working quite nicely and I will make a package for Arch Linux soon.

I am considering to make seafile-nautilus into a separate package, just like the dropbox-nautilus package. Let me know what you think is best.

@killing
Copy link
Member

killing commented Apr 6, 2017

Hi @benruijl,

Thanks for that. We're very interested in your continued development on nautilus extension. We'll soon test your code and see whether we can make it into official client too.

@benruijl
Copy link

benruijl commented Apr 8, 2017

Hi @killing ,

I look forward to hearing from you. In the meantime I have made a package for Arch Linux, so that people can install the extension easily:

https://aur.archlinux.org/packages/nautilus-seafile/

@carlos22
Copy link

carlos22 commented Sep 5, 2017

@killing any progress on the integration into official client?

@dakira
Copy link

dakira commented Sep 5, 2017

@benruijl can you create a new pull request from your branch, so that this one can be closed? We can continue the discussion there, then!

@benruijl
Copy link

benruijl commented Sep 6, 2017

@dakira the following problem has not been resolved yet, which causes the plugin to crash: haiwen/seafile#1891

Somehow calling seafile_get_repo_list crashes when called from inside nautilus. Maybe it is a library version conflict (I strongly suspect openssl-1.1 vs openssl-1.0). If someone wants to study the problem, here is a very short piece of code that causes the crash: https://gist.github.com/benruijl/6e68d7e905c8f2a17e8462f74efc9b2a

@omkarnathsingh
Copy link

This addition looks so good for Ubuntu and other Linux users. Is it in priority?

@dbrandonjohnson
Copy link

I just complied this on Fedora 28. The extension causes nautilus to crash. I'll post more information when I get a chance to debug. I suspect it is a change in Nautilus 3.28.

Here is the stack trace that is getting dumped into journald:
Nautilus Stack Trace

@benruijl
Copy link

The extension has been broken for a very long time. You can see my last post for a minimal failing example. The problem lies outside my code.

@toger5
Copy link

toger5 commented Mar 2, 2019

What is the status nowadays?
Any chance i can get it working?

@dakira
Copy link

dakira commented Mar 15, 2019

Maybe @freeplant or @lins05 could have a look? The old comment by @benruijl seems to be a good hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Linux client should have a nautilus extension for sharing files