diff libgui/src/m-editor/file-editor-tab.cc @ 15984:1eb3c67139f6

Add full-length-name tool tip to editor file tab when name is not full length. * file-editor-tab.cc (file_editor_tab::update_window_title): Add and construct tooltip variable then signal file_name_changed() with second input string. * file-editor-tab.h (file_editor_tab::file_name_changed): Add second input string to accommodate tool tip. * file-editor.cc, file-editor.h (file_editor::handle_file_name_changed): Add second input string and set tool tip via Qt setTabToolTip() member function.
author Daniel J Sebald <daniel.sebald@ieee.org>
date Sun, 27 Jan 2013 18:44:53 -0600
parents 131d40cd805b
children 38348a6c3db0
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Mon Jan 28 18:57:36 2013 +0100
+++ b/libgui/src/m-editor/file-editor-tab.cc	Sun Jan 27 18:44:53 2013 -0600
@@ -658,6 +658,7 @@
 file_editor_tab::update_window_title (bool modified)
 {
   QString title ("");
+  QString tooltip ("");
   if (_file_name.isEmpty () || _file_name.at (_file_name.count () - 1) == '/')
     title = tr("<unnamed>");
   else
@@ -668,15 +669,16 @@
         {
           QFileInfo file(_file_name);
           title = file.fileName();
+          tooltip = _file_name;
         }
     }
 
   if ( modified )
     {
-      emit file_name_changed (title.prepend("* "));
+      emit file_name_changed (title.prepend("* "), tooltip);
     }
   else
-    emit file_name_changed (title);
+    emit file_name_changed (title, tooltip);
 }
 
 void