- /* No hide button is shown (no decoration on the window),
- so being hidden is equivalent to the Escape key or any other
- method of cancelling the edit.
- */
+ entry.remove_modal_grab ();
+
+ /* No hide button is shown (no decoration on the window),
+ * so being hidden is equivalent to the Escape key or any other
+ * method of cancelling the edit.
+ *
+ * This is also used during disconect_signals() before calling
+ * use_text (). see note below.
+ *
+ * If signals are already disconnected, idle-delete must be
+ * in progress already.
+ */
+ if (!_connections.empty ()) {
+ idle_delete_self ();
+ }
+ Gtk::Window::on_hide ();
+}
+
+void
+FloatingTextEntry::disconect_signals ()
+{
+ for (std::list<sigc::connection>::iterator i = _connections.begin(); i != _connections.end(); ++i) {
+ i->disconnect ();
+ }
+ _connections.clear ();
+ /* the entry is floating on-top, emitting use_text()
+ * may result in another dialog being shown (cannot rename track)
+ * which would
+ * - be stacked below the floating text entry
+ * - return focus to the entry when closedA
+ * so we hide the entry here.
+ */
+ hide ();
+}