gui : Add the current folder in the title area
This commit is contained in:
parent
1de1f787e7
commit
e48c75df72
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user