Changeset 6eef44e8de0bbc7a63172c7ad06877a8dda58917 for src/window.cpp
- Timestamp:
- 04/12/08 16:58:39 (5 years ago)
- Parents:
- b464e34a10c0c8d04d40e60feccf21292deff7af
- Children:
- 36fa5fe45a5f19487d82bff9bb2c33e39175041a
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2008-04-12T16:58:39Z+0200
- Files:
-
- 1 modified
-
src/window.cpp (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/window.cpp
rb464e34 r6eef44e 57 57 InfXmlConnection* sync_connection) 58 58 { 59 Gtk TextBuffer* textbuffer = gtk_text_buffer_new(NULL);59 GtkSourceBuffer* textbuffer = gtk_source_buffer_new(NULL); 60 60 InfUserTable* user_table = inf_user_table_new(); 61 61 InfTextGtkBuffer* buffer = 62 inf_text_gtk_buffer_new(textbuffer, user_table); 62 inf_text_gtk_buffer_new(GTK_TEXT_BUFFER(textbuffer), 63 user_table); 63 64 InfTextSession* session = 64 65 inf_text_session_new_with_user_table( … … 82 83 m_document_settings(*this), 83 84 m_header(m_preferences, m_lang_manager), 84 m_folder(m_ header, m_preferences, m_lang_manager),85 m_folder(m_preferences, m_lang_manager), 85 86 m_statusbar(m_folder), 86 87 m_browser(*this, &TEXT_PLUGIN, m_statusbar, m_preferences) … … 138 139 m_browser.show(); 139 140 141 #if 0 140 142 // Folder 141 143 m_folder.document_add_event().connect( … … 147 149 m_folder.tab_switched_event().connect( 148 150 sigc::mem_fun(*this, &Window::on_folder_tab_switched) ); 149 151 #endif 150 152 // Settings 151 153 m_document_settings.document_insert_event().connect( … … 317 319 318 320 // Delegate start of obby session 319 m_folder.obby_start(*m_buffer);320 321 m_document_settings.obby_start(*m_buffer); 321 322 … … 390 391 391 392 // Tell GUI components that the session ended 392 m_folder.obby_end();393 393 m_document_settings.obby_end(); 394 394 … … 539 539 } 540 540 541 #if 0 541 542 void Gobby::Window::on_folder_document_add(DocWindow& window) 542 543 { … … 600 601 update_title_bar(); 601 602 } 603 #endif 602 604 603 605 void Gobby::Window::on_settings_document_insert(LocalDocumentInfo& info) … … 703 705 ); 704 706 } 705 707 #if 0 706 708 // Is there already a path for this document? 707 709 std::string path = m_document_settings.get_path(doc->get_info() ); … … 723 725 return handle_document_save_as(); 724 726 } 727 #endif 725 728 } 726 729 … … 749 752 ); 750 753 754 #if 0 751 755 // TODO: Preselect document's encoding 752 756 dlg.get_selector().set_encoding( … … 794 798 } 795 799 return false; 800 #endif 796 801 } 797 802 … … 983 988 { 984 989 // Tell user join to components 985 m_folder.obby_user_join(user);990 //m_folder.obby_user_join(user); 986 991 } 987 992 … … 989 994 { 990 995 // Tell user part to components 991 m_folder.obby_user_part(user);996 //m_folder.obby_user_part(user); 992 997 } 993 998 994 999 void Gobby::Window::on_obby_user_colour(const obby::user& user) 995 1000 { 996 m_folder.obby_user_colour(user);1001 //m_folder.obby_user_colour(user); 997 1002 } 998 1003 … … 1007 1012 dynamic_cast<LocalDocumentInfo&>(document); 1008 1013 1009 m_folder.obby_document_insert(local_doc);1014 //m_folder.obby_document_insert(local_doc); 1010 1015 } 1011 1016 … … 1015 1020 dynamic_cast<LocalDocumentInfo&>(document); 1016 1021 1017 m_folder.obby_document_remove(local_doc);1022 //m_folder.obby_document_remove(local_doc); 1018 1023 } 1019 1024 … … 1069 1074 const DocWindow& window = *get_current_document(); 1070 1075 // Get title of current document 1071 const Glib::ustring& file = window.get_ info().get_suffixed_title();1076 const Glib::ustring& file = window.get_title(); 1072 1077 // Get path of current document 1073 Glib::ustring path = m_document_settings.get_path(window.get_info() );1078 Glib::ustring path;// = m_document_settings.get_path(window.get_info() ); 1074 1079 1075 1080 // Show path in title, if we know it … … 1082 1087 1083 1088 // Set title with file and path 1084 obby::format_string title_str("%0% (%1%) - Gobby");1089 obby::format_string title_str("%0% (%1%)"); 1085 1090 title_str << file << Glib::path_get_dirname(path); 1086 1091 set_title(title_str.str() ); … … 1089 1094 { 1090 1095 // Path not known: Set title with file only 1091 obby::format_string title_str("%0% - Gobby");1096 obby::format_string title_str("%0%"); 1092 1097 title_str << file; 1093 1098 set_title(title_str.str() ); … … 1303 1308 const std::string& encoding) 1304 1309 { 1310 #if 0 1305 1311 try 1306 1312 { … … 1345 1351 display_error(e.what() ); 1346 1352 } 1353 #endif 1347 1354 } 1348 1355 … … 1351 1358 const std::string& encoding) 1352 1359 { 1360 #if 0 1353 1361 try 1354 1362 { … … 1381 1389 // Unset modifified flag 1382 1390 gtk_text_buffer_set_modified( 1383 GTK_TEXT_BUFFER(doc.get_ document().get_buffer()),1391 GTK_TEXT_BUFFER(doc.get_text_buffer()), 1384 1392 FALSE); 1385 1393 } … … 1392 1400 display_error(e.what() ); 1393 1401 } 1402 #endif 1394 1403 } 1395 1404 1396 1405 void Gobby::Window::close_document(DocWindow& window) 1397 1406 { 1407 #if 0 1398 1408 /* Cannot unsubscribe when not subscribed (e.g. unsubscription request 1399 1409 * has already been sent. */ … … 1477 1487 1478 1488 window.get_info().unsubscribe(); 1489 #endif 1479 1490 } 1480 1491
