914 |
); |
); |
915 |
menuMacro->append(*item); |
menuMacro->append(*item); |
916 |
item->set_accel_path("<Macros>/macro_" + ToString(iMacro)); |
item->set_accel_path("<Macros>/macro_" + ToString(iMacro)); |
917 |
|
Glib::ustring comment = macro.comment(); |
918 |
|
if (!comment.empty()) |
919 |
|
item->set_tooltip_text(comment); |
920 |
} |
} |
921 |
// if there are no macros configured at all, then show a dummy entry instead |
// if there are no macros configured at all, then show a dummy entry instead |
922 |
if (m_macros.empty()) { |
if (m_macros.empty()) { |
1204 |
// save the file as separate temporary file first, |
// save the file as separate temporary file first, |
1205 |
// then move the saved file over the old file |
// then move the saved file over the old file |
1206 |
// (may result in performance speedup during save) |
// (may result in performance speedup during save) |
1207 |
String tmpname = filename + ".TMP"; |
gig::String tmpname = filename + ".TMP"; |
1208 |
gig->Save(tmpname, &progress); |
gig->Save(tmpname, &progress); |
1209 |
#if defined(WIN32) |
#if defined(WIN32) |
1210 |
if (!DeleteFile(filename.c_str())) { |
if (!DeleteFile(filename.c_str())) { |
1212 |
} |
} |
1213 |
#else // POSIX ... |
#else // POSIX ... |
1214 |
if (unlink(filename.c_str())) { |
if (unlink(filename.c_str())) { |
1215 |
throw RIFF::Exception("Could not replace original file with temporary file (unable to remove original file): " + String(strerror(errno))); |
throw RIFF::Exception("Could not replace original file with temporary file (unable to remove original file): " + gig::String(strerror(errno))); |
1216 |
} |
} |
1217 |
#endif |
#endif |
1218 |
if (rename(tmpname.c_str(), filename.c_str())) { |
if (rename(tmpname.c_str(), filename.c_str())) { |
1219 |
#if defined(WIN32) |
#if defined(WIN32) |
1220 |
throw RIFF::Exception("Could not replace original file with temporary file (unable to rename temp file)."); |
throw RIFF::Exception("Could not replace original file with temporary file (unable to rename temp file)."); |
1221 |
#else |
#else |
1222 |
throw RIFF::Exception("Could not replace original file with temporary file (unable to rename temp file): " + String(strerror(errno))); |
throw RIFF::Exception("Could not replace original file with temporary file (unable to rename temp file): " + gig::String(strerror(errno))); |
1223 |
#endif |
#endif |
1224 |
} |
} |
1225 |
} |
} |
3923 |
itDimReg != dimreg_edit.dimregs.end(); ++itDimReg) |
itDimReg != dimreg_edit.dimregs.end(); ++itDimReg) |
3924 |
{ |
{ |
3925 |
gig::DimensionRegion* pDimRgn = *itDimReg; |
gig::DimensionRegion* pDimRgn = *itDimReg; |
3926 |
dimreg_to_be_changed_signal.emit(pDimRgn); |
DimRegionChangeGuard(this, pDimRgn); |
3927 |
macro.deserialize(pDimRgn); |
macro.deserialize(pDimRgn); |
|
dimreg_changed_signal.emit(pDimRgn); |
|
3928 |
} |
} |
3929 |
//region_changed() |
//region_changed() |
3930 |
file_changed(); |
file_changed(); |