[gnome-commander] advrename profiles: set default template string to "$N" in copy()
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander] advrename profiles: set default template string to "$N" in copy()
- Date: Tue, 28 Apr 2009 11:28:19 -0400 (EDT)
commit d940d63e3c8cb2424ff41cce83062fd142759979
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Apr 28 17:27:50 2009 +0200
advrename profiles: set default template string to "$N" in copy()
---
ChangeLog | 5 +++++
src/gnome-cmd-profile-component.cc | 8 ++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 80e4b1d..3ba8597 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-28 Piotr Eljasiak <epiotr use pl>
+
+ * src/tags/gnome-cmd-profile-component.cc:
+ advrename profiles: set default template string to "$N" in copy()
+
2009-04-25 Piotr Eljasiak <epiotr use pl>
* src/tags/gnome-cmd-profile-component.cc:
diff --git a/src/gnome-cmd-profile-component.cc b/src/gnome-cmd-profile-component.cc
index 96b041f..f26e3df 100644
--- a/src/gnome-cmd-profile-component.cc
+++ b/src/gnome-cmd-profile-component.cc
@@ -1152,14 +1152,18 @@ GtkTreeModel *GnomeCmdProfileComponent::get_regex_model() const
void GnomeCmdProfileComponent::copy()
{
- profile.template_string = get_template_entry();
+ const char *template_entry = get_template_entry();
+
+ profile.template_string = template_entry && *template_entry ? template_entry : "$N";
copy_regex_model(priv->regex_model, COL_REGEX, profile.regexes);
}
void GnomeCmdProfileComponent::copy(GnomeCmdData::AdvrenameConfig::Profile &p)
{
- p.template_string = get_template_entry();
+ const char *template_entry = get_template_entry();
+
+ profile.template_string = template_entry && *template_entry ? template_entry : "$N";
copy_regex_model(priv->regex_model, COL_REGEX, p.regexes);
if (&p==&profile)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]