[beast: 4/8] BSE: use __func__ as first arg to push_undo() which is good blurb in most cases
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 4/8] BSE: use __func__ as first arg to push_undo() which is good blurb in most cases
- Date: Wed, 23 Sep 2015 09:07:06 +0000 (UTC)
commit 51dea575927bedc9e35bf270cb38169b17887e02
Author: Tim Janik <timj gnu org>
Date: Thu Sep 17 13:12:26 2015 +0200
BSE: use __func__ as first arg to push_undo() which is good blurb in most cases
bse/bsebus.cc | 10 +++++-----
bse/bsepart.cc | 4 ++--
bse/bsesong.cc | 14 +++++++-------
bse/bsetrack.cc | 4 ++--
4 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/bse/bsebus.cc b/bse/bsebus.cc
index 209b7be..4d64342 100644
--- a/bse/bsebus.cc
+++ b/bse/bsebus.cc
@@ -953,7 +953,7 @@ BusImpl::ensure_output ()
BusImpl &bus = master.undo_resolve (bus_descriptor);
return master.disconnect_bus (bus);
};
- master.push_undo ("Ensure Output", master, lambda);
+ master.push_undo (__func__, master, lambda);
}
}
}
@@ -976,7 +976,7 @@ BusImpl::connect_bus (BusIface &busi)
auto lambda = [bus_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
return self.disconnect_bus (self.undo_resolve (bus_descriptor));
};
- push_undo ("Connect Bus", *this, lambda);
+ push_undo (__func__, *this, lambda);
}
return error;
}
@@ -997,7 +997,7 @@ BusImpl::connect_track (TrackIface &tracki)
auto lambda = [track_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
return self.disconnect_track (self.undo_resolve (track_descriptor));
};
- push_undo ("Connect Track", *this, lambda);
+ push_undo (__func__, *this, lambda);
}
return error;
}
@@ -1015,7 +1015,7 @@ BusImpl::disconnect_bus (BusIface &busi)
auto lambda = [bus_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
return self.connect_bus (self.undo_resolve (bus_descriptor));
};
- push_undo ("Remove Bus", *this, lambda);
+ push_undo (__func__, *this, lambda);
}
return error;
}
@@ -1033,7 +1033,7 @@ BusImpl::disconnect_track (TrackIface &tracki)
auto lambda = [track_descriptor] (BusImpl &self, BseUndoStack *ustack) -> ErrorType {
return self.connect_track (self.undo_resolve (track_descriptor));
};
- push_undo ("Remove Track", *this, lambda);
+ push_undo (__func__, *this, lambda);
}
return error;
}
diff --git a/bse/bsepart.cc b/bse/bsepart.cc
index 7760610..1f2a657 100644
--- a/bse/bsepart.cc
+++ b/bse/bsepart.cc
@@ -2236,7 +2236,7 @@ PartImpl::change_note (int id, int tick, int duration, int note, int fine_tune,
{
success = bse_part_change_note (self, id, ~0, tick, duration, note, fine_tune, velocity);
if (success)
- push_undo ("Change Note", *this, &PartImpl::change_note, id, equery.tick, equery.duration,
+ push_undo (__func__, *this, &PartImpl::change_note, id, equery.tick, equery.duration,
equery.note, equery.fine_tune, equery.velocity);
}
else
@@ -2362,7 +2362,7 @@ PartImpl::insert_note (int channel, int tick, int duration, int note, int fine_t
BsePart *self = as<BsePart*>();
uint id = bse_part_insert_note (self, channel, tick, duration, note, fine_tune, velocity);
if (id)
- push_undo ("Insert Note", *this, &PartImpl::delete_event, id);
+ push_undo (__func__, *this, &PartImpl::delete_event, id);
return id;
}
diff --git a/bse/bsesong.cc b/bse/bsesong.cc
index f67f71c..4febe81 100644
--- a/bse/bsesong.cc
+++ b/bse/bsesong.cc
@@ -630,7 +630,7 @@ bse_song_ensure_master (BseSong *self)
self.remove_bus (bus);
return Bse::ERROR_NONE;
};
- this_->push_undo ("Create Master", *this_, lambda);
+ this_->push_undo (__func__, *this_, lambda);
bse_item_undo_close (ustack);
}
return child;
@@ -817,7 +817,7 @@ SongImpl::create_bus ()
self.remove_bus (bus);
return ERROR_NONE;
};
- push_undo ("Create Bus", *this, lambda);
+ push_undo (__func__, *this, lambda);
return bus->as<BusIfaceP>();
}
@@ -842,7 +842,7 @@ SongImpl::remove_bus (BusIface &bus_iface)
self.remove_bus (bus);
return ERROR_NONE;
};
- push_undo_to_redo ("Remove Bus", *this, lambda);
+ push_undo_to_redo (__func__, *this, lambda);
// backup and remove (without redo queueing)
bse_container_remove_backedup (BSE_CONTAINER (self), child, ustack);
// done
@@ -861,7 +861,7 @@ SongImpl::create_part ()
self.remove_part (part);
return ERROR_NONE;
};
- push_undo ("Create Part", *this, lambda);
+ push_undo (__func__, *this, lambda);
return part->as<PartIfaceP>();
}
@@ -884,7 +884,7 @@ SongImpl::remove_part (PartIface &part_iface)
self.remove_part (part);
return ERROR_NONE;
};
- push_undo_to_redo ("Remove Part", *this, lambda);
+ push_undo_to_redo (__func__, *this, lambda);
// remove (without redo queueing)
bse_container_remove_backedup (BSE_CONTAINER (self), child, ustack);
// done
@@ -904,7 +904,7 @@ SongImpl::create_track ()
self.remove_track (track);
return ERROR_NONE;
};
- push_undo ("Create Track", *this, lambda);
+ push_undo (__func__, *this, lambda);
return track->as<TrackIfaceP>();
}
@@ -927,7 +927,7 @@ SongImpl::remove_track (TrackIface &track_iface)
self.remove_track (track);
return ERROR_NONE;
};
- push_undo_to_redo ("Remove Track", *this, lambda);
+ push_undo_to_redo (__func__, *this, lambda);
// remove (without redo queueing)
bse_container_remove_backedup (BSE_CONTAINER (self), child, ustack);
// done
diff --git a/bse/bsetrack.cc b/bse/bsetrack.cc
index fdbbabd..5db77ba 100644
--- a/bse/bsetrack.cc
+++ b/bse/bsetrack.cc
@@ -1090,7 +1090,7 @@ TrackImpl::insert_part (int tick, PartIface &parti)
if (id)
{
// can't use remove_link() here, since id will have changed after undo
- push_undo ("Insert Part", *this, &TrackImpl::remove_tick, tick);
+ push_undo (__func__, *this, &TrackImpl::remove_tick, tick);
}
return id;
}
@@ -1111,7 +1111,7 @@ TrackImpl::remove_tick (int tick)
return id ? ERROR_NONE : ERROR_INVALID_OVERLAP;
};
bse_track_remove_tick (self, tick);
- push_undo ("Remove Tick", *this, lambda);
+ push_undo (__func__, *this, lambda);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]