summaryrefslogtreecommitdiff
path: root/tubes
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2012-03-23 11:31:26 +0000
committerMatúš Kukan <matus.kukan@gmail.com>2012-07-17 16:39:47 +0200
commit68a1609ea835e61326ae03352ae23969344d5b90 (patch)
tree7ffe498906ebed1e5edb1518d0a576ca9d574a91 /tubes
parent5372069443044e67f5035e4804267a706ef16377 (diff)
Use a slightly nicer filename
Diffstat (limited to 'tubes')
-rw-r--r--tubes/qa/test_manager.cxx2
-rw-r--r--tubes/source/manager.cxx8
2 files changed, 8 insertions, 2 deletions
diff --git a/tubes/qa/test_manager.cxx b/tubes/qa/test_manager.cxx
index 8ca3b9fb9b72..a7e690fae1f6 100644
--- a/tubes/qa/test_manager.cxx
+++ b/tubes/qa/test_manager.cxx
@@ -331,7 +331,7 @@ void TestTeleTubes::testSendFile()
CPPUNIT_ASSERT( maFileSentSuccess);
CPPUNIT_ASSERT_MESSAGE(
OUStringToOString( maFileReceivedUri, RTL_TEXTENCODING_UTF8).getStr(),
- maFileReceivedUri == "file:///tmp/fixme.ods");
+ maFileReceivedUri == "file:///tmp/LibreOffice-collab-test-config.ini");
}
void TestTeleTubes::testFlushLoops()
diff --git a/tubes/source/manager.cxx b/tubes/source/manager.cxx
index cccd62cd6a59..25f879dd47b4 100644
--- a/tubes/source/manager.cxx
+++ b/tubes/source/manager.cxx
@@ -212,7 +212,13 @@ TeleManager_IncomingHandlerReady (
return;
}
- GFile *pDestination = g_file_new_for_uri( "file:///tmp/fixme.ods");
+ /* The filename suggested by the sender, which in our case is the last bit
+ * of whatever URI got passed to ::sendFile()
+ */
+ const char* pFileName = empathy_ft_handler_get_filename( pHandler);
+ char* pLocalUri = g_strdup_printf( "file:///tmp/LibreOffice-collab-%s", pFileName);
+ GFile *pDestination = g_file_new_for_uri( pLocalUri);
+ g_free( pLocalUri);
empathy_ft_handler_incoming_set_destination( pHandler, pDestination);
g_object_unref( pDestination);