1
From: Matthieu Baerts <matttbe@gmail.com>
2
Subject: dnd2share: UbuntuOne backend: wait for the end of the sync before publishing the link (to avoid a crash of u1sdtool)
3
Origin: upstream, http://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-plug-ins/2.3.x/revision/1939
4
Bug: http://www.glx-dock.org/tt_task.php?p=2&t=187
7
Index: cairo-dock-plug-ins/CMakeLists.txt
8
===================================================================
9
--- cairo-dock-plug-ins.orig/CMakeLists.txt 2011-05-21 01:52:06.786633847 +0200
10
+++ cairo-dock-plug-ins/CMakeLists.txt 2011-05-21 01:52:49.006695762 +0200
13
############# DND2SHARE #################
14
set (GETTEXT_DND2SHARE ${GETTEXT_PLUGINS})
15
-set (VERSION_DND2SHARE "1.0.5")
16
+set (VERSION_DND2SHARE "1.0.6")
17
set (PACKAGE_DND2SHARE "cd-dnd2share")
18
set (dnd2sharedatadir "${pluginsdatadir}/dnd2share")
19
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/dnd2share/data/dnd2share.conf.in ${CMAKE_CURRENT_BINARY_DIR}/dnd2share/data/dnd2share.conf)
20
Index: cairo-dock-plug-ins/dnd2share/src/applet-backend-ubuntuone.c
21
===================================================================
22
--- cairo-dock-plug-ins.orig/dnd2share/src/applet-backend-ubuntuone.c 2011-05-21 01:52:06.806633864 +0200
23
+++ cairo-dock-plug-ins/dnd2share/src/applet-backend-ubuntuone.c 2011-05-21 01:52:49.006695762 +0200
28
- // On recupere l'URL (dispo tout de suite, sinon il faudra boucler en testant 'dropbox status' jusqu'a avoir 'Idle').
29
- cCommand= g_strdup_printf ("u1sdtool --publish-file \"%s\"", cLocalFilePath);
30
+ // We wait for the end of the sync
31
+ cairo_dock_launch_command_sync ("u1sdtool --wait");
32
+ // We publish the file and we read the output message
33
+ cCommand = g_strdup_printf ("u1sdtool --publish-file \"%s\"", cLocalFilePath);
34
cd_debug ("commande u2 : %s", cCommand);
35
gchar *cResult = cairo_dock_launch_command_sync (cCommand);