diff options
author | Paweł Forysiuk <tuxator@o2.pl> | 2013-07-04 21:57:07 +0200 |
---|---|---|
committer | Paweł Forysiuk <tuxator@o2.pl> | 2013-07-04 21:57:07 +0200 |
commit | bc4a355f591f0c6b3185a7d7da4702549c57cdaa (patch) | |
tree | 7321438ac48e7391a06b2e9ce6fc2a94f65c5db9 /midori/sokoke.c | |
parent | 491549a11ab6474282632bc635a80cf960179c44 (diff) | |
download | midori-bc4a355f591f0c6b3185a7d7da4702549c57cdaa.tar.gz |
Don't needlessly recompute filename from launcher title
Diffstat (limited to 'midori/sokoke.c')
-rw-r--r-- | midori/sokoke.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/midori/sokoke.c b/midori/sokoke.c index a64c8e37..25e78337 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -1155,26 +1155,24 @@ sokoke_search_entry_new (const gchar* placeholder_text) #ifdef G_OS_WIN32 gchar* -sokoke_get_win32_desktop_lnk_path_from_title (gchar* title) +sokoke_get_win32_desktop_lnk_path_for_filename (gchar* filename) { const gchar* desktop_dir; - gchar* filename, *lnk_path, *lnk_file; + gchar* lnk_path, *lnk_file; /* CSIDL_PROGRAMS for "start menu -> programs" instead - needs saner/shorter filename */ desktop_dir = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP); - filename = midori_download_clean_filename (title); lnk_file = g_strconcat (filename, ".lnk", NULL); lnk_path = g_build_filename (desktop_dir, lnk_file, NULL); - g_free (filename); g_free (lnk_file); return lnk_path; } void -sokoke_create_win32_desktop_lnk (gchar* prefix, gchar* title, gchar* uri) +sokoke_create_win32_desktop_lnk (gchar* prefix, gchar* filename, gchar* uri) { WCHAR w[MAX_PATH]; @@ -1202,7 +1200,7 @@ sokoke_create_win32_desktop_lnk (gchar* prefix, gchar* title, gchar* uri) /* pShellLink->lpVtbl->SetIconLocation (pShellLink, icon_path, icon_index); */ /* Save link */ - lnk_path = sokoke_get_win32_desktop_lnk_path_from_title (title); + lnk_path = sokoke_get_win32_desktop_lnk_path_for_filename (filename); pShellLink->lpVtbl->QueryInterface (pShellLink, &IID_IPersistFile, (LPVOID *)&pPersistFile); MultiByteToWideChar (CP_UTF8, 0, lnk_path, -1, w, MAX_PATH); pPersistFile->lpVtbl->Save (pPersistFile, w, TRUE); |