by
Changes to 23 files · Browse files at 85194acab29a Showing diff from parent 1e3719600bfc 85ad42406750 Diff from another changeset...
@@ -28,3 +28,4 @@ glob:win32/shellext/x64
glob:win32/shellext/shellext.vcproj.*
glob:win32/shellext/Release/
+glob:.DS_Store
|
@@ -20,3 +20,4 @@ ef5ab6bccf5ee5356a0d5f42987f55af0f75330f 0.7.4
a88261eec1f43d37786bfdb492322bddd94dcf8d 0.7.5
525469f83de5473ab3d00fd5111ee91020251e62 0.7.6
+ecf6fc1b0c9fd11e8ffe314c68ee75752371ac5f 0.8
|
@@ -2,3 +2,4 @@ include contrib/_hgtk
include contrib/nautilus-thg.py
include COPYING.txt ReleaseNotes.txt
+recursive-include locale *.mo
|
@@ -12,6 +12,7 @@ # current executable to find our package data.
import os
+import sys
import win32api, win32process
proc = win32api.GetCurrentProcess()
@@ -25,3 +26,10 @@license_path = os.path.join(bin_path, 'COPYING.txt')
locale_path = os.path.join(bin_path, 'locale')
icon_path = os.path.join(bin_path, 'icons')
+
+enc = sys.getfilesystemencoding()
+if enc:
+ bin_path = bin_path.encode(enc)
+ license_path = license_path.encode(enc)
+ locale_path = locale_path.encode(enc)
+ icon_path = icon_path.encode(enc)
|
@@ -379,7 +379,7 @@ self.ui.pushbuffer()
try:
command()
- except util.Abort, inst:
+ except (util.Abort, IOError, OSError), inst:
Prompt(title + _(' Aborted'), str(inst), self).run()
return False, ''
finally:
|
@@ -541,7 +541,7 @@ self.hgthread = hgthread.HgThread(cmdline, parent=self)
self.hgthread.start()
self.stbar.begin()
- self.stbar.set_status_text('hg ' + ' '.join(cmd + [remote_path]))
+ self.stbar.set_status_text('hg ' + ' '.join(cmd))
self.add_src_to_recent(remote_path)
|
@@ -649,7 +649,7 @@ _('Path testing cannot work without a repository'))
return
model, path = selection.get_selected()
- testpath = hglib.fromutf(model[path][1])
+ testpath = hglib.fromutf(model[path][2])
if not testpath:
return
if testpath[0] == '~':
@@ -786,6 +786,7 @@ scrolledwindow = gtk.ScrolledWindow()
scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
scrolledwindow.add(desctext)
+ scrolledwindow.set_border_width(4)
descframe.add(scrolledwindow)
vbox = gtk.VBox()
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\changeset.py:147
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -8,13 +8,13 @@ "Project-Id-Version: tortoisehg\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-06-28 05:54+0000\n"
-"PO-Revision-Date: 2009-05-23 11:04+0000\n"
-"Last-Translator: Yoan Blanc <Unknown>\n"
+"PO-Revision-Date: 2009-06-29 15:37+0000\n"
+"Last-Translator: simohe <Unknown>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\hgthread.py:84
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -8,13 +8,13 @@ "Project-Id-Version: tortoisehg\n"
"Report-Msgid-Bugs-To: Alil Adamov <diagiman@gmail.com>\n"
"POT-Creation-Date: 2009-06-28 05:54+0000\n"
-"PO-Revision-Date: 2009-06-27 05:23+0000\n"
+"PO-Revision-Date: 2009-07-01 10:03+0000\n"
"Last-Translator: Alil Adamov <diagiman@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
@@ -81,7 +81,7 @@
#: hggtk\bugreport.py:23
msgid "TortoiseHg Bug Report"
-msgstr "TortoiseHg Отчет Об Ошибке"
+msgstr "Отчет об ошибке TortoiseHg"
#: hggtk\bugreport.py:48
msgid ""
@@ -102,7 +102,7 @@
#: hggtk\changeset.py:104
msgid "[All Files]"
-msgstr "[Все Файлы]"
+msgstr "[Все файлы]"
#: hggtk\changeset.py:147
msgid "changeset:"
@@ -130,7 +130,7 @@
#: hggtk\changeset.py:197
msgid " %s is larger than the specified max diff size"
-msgstr " %s больше, чем указанный максимальный размер файла различий"
+msgstr " %s превышает указанный максимальный размер файла различий"
#: hggtk\changeset.py:292
msgid "_visual diff"
@@ -178,7 +178,7 @@
#: hggtk\changeset.py:548
msgid "Revert %s to contents at revision %d?"
-msgstr "Возвратить содержимое %s к ревизии %d?"
+msgstr "Вернуть содержимое %s к ревизии %d?"
#: hggtk\changeset.py:560 hggtk\synch.py:635
msgid "Toggle _Wordwrap"
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\about.py:52
|
@@ -14,7 +14,7 @@ "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Launchpad-Export-Date: 2009-06-29 04:32+0000\n"
+"X-Launchpad-Export-Date: 2009-07-01 19:32+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#: hggtk\gdialog.py:492
|
|
|
|
@@ -0,0 +1,190 @@ + <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ id="svg2183"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docbase="D:\Development\SVN\TortoiseSVN\src\Resources\svg\Overlays"
+ sodipodi:docname="refresh_overlays.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ inkscape:export-filename="E:\src\mercurial\thg\thg-icons\icons\tortoise\refresh_overlays.ico.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs2185">
+ <linearGradient
+ id="linearGradient3608">
+ <stop
+ id="stop3610"
+ offset="0"
+ style="stop-color:#2c7cbf;stop-opacity:0" />
+ <stop
+ id="stop3612"
+ offset="1"
+ style="stop-color:#173561;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3592">
+ <stop
+ style="stop-color:#2c7cbf;stop-opacity:1;"
+ offset="0"
+ id="stop3594" />
+ <stop
+ style="stop-color:#173561;stop-opacity:1;"
+ offset="1"
+ id="stop3596" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 128 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="256 : 128 : 1"
+ inkscape:persp3d-origin="128 : 85.333333 : 1"
+ id="perspective2780" />
+ <linearGradient
+ id="linearGradient4154">
+ <stop
+ style="stop-color:#20f500;stop-opacity:0.56470591;"
+ offset="0"
+ id="stop4156" />
+ <stop
+ style="stop-color:#207e00;stop-opacity:1;"
+ offset="1"
+ id="stop4158" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4154"
+ id="radialGradient2814"
+ gradientUnits="userSpaceOnUse"
+ cx="47.119026"
+ cy="208.49529"
+ fx="47.119026"
+ fy="208.49529"
+ r="47.490459" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3592"
+ id="linearGradient3598"
+ x1="3"
+ y1="2"
+ x2="13"
+ y2="14"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3592"
+ id="linearGradient3616"
+ x1="4"
+ y1="1"
+ x2="8"
+ y2="3"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="38.125"
+ inkscape:cx="8"
+ inkscape:cy="8.0862674"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:document-units="px"
+ inkscape:grid-bbox="true"
+ width="256px"
+ height="256px"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:window-width="1058"
+ inkscape:window-height="809"
+ inkscape:window-x="334"
+ inkscape:window-y="32"
+ inkscape:snap-bbox="true"
+ gridtolerance="21">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2782"
+ visible="true"
+ enabled="true"
+ spacingx="0.5px"
+ spacingy="0.5px"
+ empspacing="2" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata2188">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Refresh Overlay Icons</dc:title>
+ <dc:date>2009-05-31</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Peer Sommerlund</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:description>TortoiseHg menu icon for refreshing overlay icons</dc:description>
+ <cc:license
+ rdf:resource="" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <g
+ id="g2810"
+ transform="translate(2.9687137,-2.9698314)">
+ <path
+ transform="matrix(0.1064046,0,0,0.1064046,1.7606244e-2,-11.215025)"
+ d="M 94.109486,208.49529 A 46.990459,46.990459 0 1 1 0.12856674,208.49529 A 46.990459,46.990459 0 1 1 94.109486,208.49529 z"
+ sodipodi:ry="46.990459"
+ sodipodi:rx="46.990459"
+ sodipodi:cy="208.49529"
+ sodipodi:cx="47.119026"
+ id="path3183"
+ style="fill:url(#radialGradient2814);fill-opacity:1;stroke:none;stroke-opacity:0.76394851"
+ sodipodi:type="arc" />
+ <path
+ sodipodi:nodetypes="cccccc"
+ id="path4164"
+ d="M 1.5640694,11.714511 L 0.91706738,12.484433 C 1.5304267,13.567543 2.0001634,14.263755 3.2721548,15.005818 C 5.5252665,13.185393 7.136925,10.367866 8.4611106,7.7818781 C 7.6319875,7.8904219 5.4428114,11.474402 3.1427545,13.094874 C 2.7117009,13.470142 1.9030483,12.586926 1.5640694,11.714511 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.10192677px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient3598);stroke-width:1;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.11828219999999990;stroke-opacity:1"
+ id="path2816"
+ sodipodi:cx="8"
+ sodipodi:cy="8"
+ sodipodi:rx="7"
+ sodipodi:ry="7"
+ d="M 10.36215,1.4105957 A 7,7 0 1 1 6.416358,1.1814901"
+ sodipodi:start="5.0565956"
+ sodipodi:end="10.767364"
+ sodipodi:open="true" />
+ <path
+ style="fill:#729fcf;fill-rule:evenodd;stroke:url(#linearGradient3616);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 4,1 C 6,1 6,1 7,1 C 6,2 6,2 5,3"
+ id="path3588"
+ sodipodi:nodetypes="ccc" />
+ </g>
+</svg>
|
|
@@ -64,7 +64,7 @@ "general.ico", 0},
{"thgstatus", "Update Icons",
"Update icons for this repository",
- "menumerge.ico", 0},
+ "refresh_overlays.ico", 0},
{"userconf", "Global Settings",
"Configure user wide settings",
"settings_user.ico", 0},
@@ -456,35 +456,59 @@ UINT_PTR idCmd, UINT uFlags, UINT FAR *reserved,
LPSTR pszName, UINT cchMax)
{
- *pszName = 0;
- char *psz;
+ const char *psz = "";
TDEBUG_TRACE(
"CShellExt::GetCommandString: idCmd = " << idCmd
<< ", uFlags = " << uFlags
);
+
MenuIdCmdMap::iterator iter = MenuIdMap.find(static_cast<UINT>(idCmd));
if (iter != MenuIdMap.end())
{
TDEBUG_TRACE(
"CShellExt::GetCommandString: name = " << iter->second.name);
- psz = (char*)iter->second.helpText.c_str();
+ psz = iter->second.helpText.c_str();
}
else
{
TDEBUG_TRACE(
"CShellExt::GetCommandString: can't find idCmd " << idCmd);
- psz = "";
}
+ bool copied = false;
+ size_t size = 0;
+
if (uFlags & GCS_UNICODE)
{
- wcscpy((wchar_t*)pszName, _WCSTR(psz));
+ wchar_t* const dest = reinterpret_cast<wchar_t*>(pszName);
+ *dest = 0;
+ const wchar_t* const src = _WCSTR(psz);
+ size = wcslen(src);
+ if (size < cchMax)
+ {
+ wcscpy(dest, src);
+ copied = true;
+ }
}
else
{
- strcpy((char*)pszName, psz);
+ *pszName = 0;
+ size = strlen(psz);
+ if (size < cchMax)
+ {
+ strcpy(pszName, psz);
+ copied = true;
+ }
}
+
+ if (!copied)
+ {
+ TDEBUG_TRACE(
+ "CShellExt::GetCommandString: error: source string length ("
+ << size << ") exceeds target buffer size (" << cchMax << ")");
+ }
+
return NOERROR;
}
@@ -584,17 +608,24 @@ cwd = IsDirectory(myFiles[0])? myFiles[0] : DirName(myFiles[0]);
const std::string tempfile = GetTemporaryFile();
- SECURITY_ATTRIBUTES sa;
- memset(&sa, 0, sizeof(sa));
- sa.nLength = sizeof(sa);
- sa.bInheritHandle = TRUE;
+ if (tempfile.empty())
+ {
+ TDEBUG_TRACE("DoHgtk: error: GetTemporaryFile returned empty string");
+ return;
+ }
TDEBUG_TRACE("DoHgtk: temp file = " << tempfile);
HANDLE tempfileHandle = CreateFileA(
tempfile.c_str(), GENERIC_WRITE,
- FILE_SHARE_READ, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0
+ FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0
);
+ if (tempfileHandle == INVALID_HANDLE_VALUE)
+ {
+ TDEBUG_TRACE("DoHgtk: error: failed to create file " << tempfile);
+ return;
+ }
+
typedef std::vector<std::string>::size_type ST;
for (ST i = 0; i < myFiles.size(); i++)
{
|
Loading...