fix two poorly-formed uses of Glib::DateTime
This commit is contained in:
parent
3d6eaf8e69
commit
4b40243f2b
@ -962,9 +962,7 @@ ARDOUR_UI::archive_session ()
|
||||
return;
|
||||
}
|
||||
|
||||
time_t n;
|
||||
time (&n);
|
||||
Glib::DateTime gdt (Glib::DateTime::create_now_local (n));
|
||||
Glib::DateTime gdt (Glib::DateTime::create_now_local ());
|
||||
|
||||
SessionArchiveDialog sad;
|
||||
sad.set_name (_session->name() + gdt.format ("_%F_%H%M%S"));
|
||||
@ -987,8 +985,8 @@ ARDOUR_UI::quick_snapshot_session (bool switch_to_it)
|
||||
if (switch_to_it && _session->dirty ()) {
|
||||
save_state_canfail ("");
|
||||
}
|
||||
Glib::DateTime tm (g_date_time_new_now_local ());
|
||||
save_state (tm.format ("%FT%H.%M.%S"), switch_to_it);
|
||||
|
||||
save_state (Glib::DateTime::create_now_local().format ("%FT%H.%M.%S"), switch_to_it);
|
||||
}
|
||||
|
||||
|
||||
|
@ -541,12 +541,7 @@ SessionDialog::open_button_pressed (GdkEventButton* ev)
|
||||
void
|
||||
SessionDialog::setup_untitled_session ()
|
||||
{
|
||||
time_t n;
|
||||
time (&n);
|
||||
struct tm* now = localtime (&n);
|
||||
Glib::DateTime tm (Glib::DateTime::create_now_local (mktime (now)));
|
||||
|
||||
new_name_entry.set_text (string_compose (_("Untitled-%1"), tm.format ("%F-%H-%M-%S")));
|
||||
new_name_entry.set_text (string_compose (_("Untitled-%1"), Glib::DateTime::create_now_local().format ("%F-%H-%M-%S")));
|
||||
new_name_entry.select_region (0, -1);
|
||||
new_name_was_edited = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user