gui : Add the current folder in the title area

This commit is contained in:
Edouard Dupin 2011-09-05 10:02:17 +02:00
parent 1de1f787e7
commit e48c75df72
2 changed files with 11 additions and 1 deletions

View File

@ -116,7 +116,8 @@ MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)
gtk_widget_modify_base(m_MenuBar.GetWidget(), tmpppppp, &color);
// Add title
m_internalTitleLabel = gtk_label_new("Edn");
gtk_box_pack_start( GTK_BOX (hboxMenu), m_internalTitleLabel, FALSE, FALSE, 0);
#endif
// **********************************************************
// * Horizontal ELEMENTS : *
@ -164,12 +165,20 @@ void MainWindows::SetTitle(Edn::File &fileName, bool isModify)
}
tmp += "Edn";
gtk_window_set_title(GTK_WINDOW(m_mainWindow), tmp.c_str());
if (fileName.GetShortFilename() != "") {
tmp = fileName.GetFolder();
} else {
tmp = "Edn";
}
gtk_label_set_text(GTK_LABEL(m_internalTitleLabel), tmp.c_str());
}
void MainWindows::SetNoTitle(void)
{
Edn::String tmp = "Edn";
gtk_window_set_title(GTK_WINDOW(m_mainWindow), tmp.c_str());
gtk_label_set_text(GTK_LABEL(m_internalTitleLabel), tmp.c_str());
}
void MainWindows::OnMessage(int32_t id, int32_t dataID)

View File

@ -58,6 +58,7 @@ class MainWindows: public Singleton<MainWindows>, public MsgBroadcast
void SetNoTitle(void);
// main windows widget :
GtkWidget * m_mainWindow;
GtkWidget * m_internalTitleLabel;
BufferView m_BufferView;
CodeView m_CodeView;
MenuBar m_MenuBar;