From 9a4d6d236bcd294d77884441494c2e32f3817b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCmann?= Date: Thu, 10 Apr 2014 23:34:27 +0000 Subject: SendSS: * improved GetFileName() to also handle Unix paths (Utils) !* improved and fixed dialog, caused graphical issues before, also improved tab order (UMainForm, resource) * improved resource.rc a bit. Now use defines for UInfoButtonClass styles * replaced some mir_freeAndNil() calls with mir_free() where appreciated (UMainForm, UAboutForm) * minor update to Dropbox support. no real change git-svn-id: http://svn.miranda-ng.org/main/trunk@8939 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SendScreenshotPlus/src/Utils.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugins/SendScreenshotPlus/src/Utils.cpp') diff --git a/plugins/SendScreenshotPlus/src/Utils.cpp b/plugins/SendScreenshotPlus/src/Utils.cpp index 1da14993b2..19071611a8 100644 --- a/plugins/SendScreenshotPlus/src/Utils.cpp +++ b/plugins/SendScreenshotPlus/src/Utils.cpp @@ -329,28 +329,30 @@ TCHAR* SaveImage(FREE_IMAGE_FORMAT fif, FIBITMAP* dib, TCHAR* pszFilename, TCHAR //--------------------------------------------------------------------------- TCHAR* GetFileNameW(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('\\')); + TCHAR* slash=_tcsrchr(pszPath,_T('\\')); + if(!slash) slash=_tcsrchr(pszPath,_T('/')); if(slash) return mir_t2u(slash+1); else return mir_t2u(pszPath); } TCHAR* GetFileExtW(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('.')); + TCHAR* slash=_tcsrchr(pszPath,_T('.')); if(slash) return mir_t2u(slash); return NULL; } char* GetFileNameA(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('\\')); + TCHAR* slash=_tcsrchr(pszPath,_T('\\')); + if(!slash) slash=_tcsrchr(pszPath,_T('/')); if(slash) return mir_t2a(slash+1); else return mir_t2a(pszPath); } char* GetFileExtA(TCHAR* pszPath) { - TCHAR* slash = _tcsrchr(pszPath,_T('.')); + TCHAR* slash=_tcsrchr(pszPath,_T('.')); if(slash) return mir_t2a(slash); return NULL; -- cgit v1.2.3