Rename set_display_filename() to set_titlebar_for_capture_file(), as

it affects more than just the file name, it also affects whatever "you
have unsaved changes" indicator the UI provides.

Put a comment in the Qt code as a reminder of how to set the "you have
unsaved changes" indicator.

svn path=/trunk/; revision=48680
This commit is contained in:
Guy Harris 2013-03-31 22:17:43 +00:00
parent 1f74d7a1b2
commit 78ab71cc9d
3 changed files with 6 additions and 5 deletions

View File

@ -1344,7 +1344,7 @@ resolv_update_cb(gpointer data _U_)
/* Set main_window_name and its icon title to the capture filename */
static void
set_display_filename(capture_file *cf)
set_titlebar_for_capture_file(capture_file *cf)
{
gchar *display_name;
gchar *window_name;
@ -1368,7 +1368,7 @@ set_display_filename(capture_file *cf)
void
main_update_for_unsaved_changes(capture_file *cf)
{
set_display_filename(cf);
set_titlebar_for_capture_file(cf);
set_menus_for_capture_file(cf);
set_toolbar_for_capture_file(cf);
}
@ -1664,7 +1664,7 @@ main_capture_cb_capture_fixed_finished(capture_options *capture_opts _U_)
/* The capture isn't stopping any more - it's stopped. */
capture_stopping = FALSE;
/*set_display_filename(cf);*/
/*set_titlebar_for_capture_file(cf);*/
/* Enable menu items that make sense if you're not currently running
a capture. */

View File

@ -1259,7 +1259,8 @@ void MainWindow::setMenusForFileSet(bool enable_list_files) {
}
void MainWindow::updateForUnsavedChanges() {
// set_display_filename(cf);
// set_titlebar_for_capture_file(cf);
// this->setWindowModified(cf->unsaved_changes);
setMenusForCaptureFile();
// set_toolbar_for_capture_file(cf);

View File

@ -313,7 +313,7 @@ void MainWindow::captureFileReadFinished(const capture_file *cf) {
// wsApp->setLastOpenDir(dir_path);
// g_free(dir_path);
// }
// set_display_filename(cf);
// set_titlebar_for_capture_file(cf);
/* Update the appropriate parts of the main window. */
updateForUnsavedChanges();