Browse Source

Removed Notebook::set_tab_label and used g_signal_emit instead for updating notebook tab labels

merge-requests/365/head
eidheim 10 years ago
parent
commit
d901cca611
  1. 3
      src/directories.cc
  2. 4
      src/notebook.cc
  3. 1
      src/notebook.h

3
src/directories.cc

@ -243,7 +243,8 @@ Directories::Directories() : Gtk::TreeView(), stop_update_thread(false) {
}
else if(view->file_path==*source_path) {
view->file_path=target_path;
Notebook::get().set_tab_label(c, target_path.filename().string());
g_signal_emit_by_name(view->get_buffer()->gobj(), "modified_changed");
std::string old_language_id;
if(view->language)
old_language_id=view->language->get_id();

4
src/notebook.cc

@ -329,10 +329,6 @@ boost::filesystem::path Notebook::get_current_folder() {
return boost::filesystem::path();
}
void Notebook::set_tab_label(int page, const std::string &label) {
tab_labels.at(get_index(page))->label.set_text(label);
}
bool Notebook::save_modified_dialog(int page) {
Gtk::MessageDialog dialog((Gtk::Window&)(*get_toplevel()), "Save file!", false, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_YES_NO);
dialog.set_default_response(Gtk::RESPONSE_YES);

1
src/notebook.h

@ -36,7 +36,6 @@ public:
bool save_current();
void configure(int view_nr);
boost::filesystem::path get_current_folder();
void set_tab_label(int page, const std::string &label);
Gtk::Label info;
Gtk::Label status;

Loading…
Cancel
Save