Changeset 4a12852956b8c9d65420066459277f873f6247ee
- Timestamp:
- 09/21/10 21:41:04 (3 years ago)
- git-author:
- Armin Burgmeier <armin@arbur.net> / 2010-09-21T21:27:16Z+0200
- Parents:
- edf70bfbfed7be742f6fabb0740f88e7a83081d6
- Children:
- ecfdae11289287fec91513ba406f03d044dc56d9
- git-committer:
- Armin Burgmeier <armin@arbur.net> / 2010-09-21T21:41:04Z+0200
- Files:
-
- 7 modified
-
ChangeLog (modified) (1 diff)
-
code/core/preferences.cpp (modified) (2 diffs)
-
code/core/preferences.hpp (modified) (1 diff)
-
code/core/textsessionview.cpp (modified) (4 diffs)
-
code/core/textsessionview.hpp (modified) (1 diff)
-
code/dialogs/preferences-dialog.cpp (modified) (3 diffs)
-
code/dialogs/preferences-dialog.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r54f0ee1 r4a12852 1 2010-09-21 Armin Burgmeier <armin@arbur.net> 2 3 * code/core/preferences.hpp: 4 * code/core/preferences.cpp: Add preferences options for showing 5 remote cursors, selections, current lines and cursor positions in the 6 scrollbar. 7 8 * code/core/textsessionview.hpp: 9 * code/core/textsessionview.cpp: Apply the new settings on the 10 underlying objects. 11 12 * code/dialogs/preferences-dialog.hpp: 13 * code/dialogs/preferences-dialog.cpp: Add the new options to the 14 preferences dialog. 15 1 16 2010-06-04 Armin Burgmeier <armin@arbur.net> 2 17 -
code/core/preferences.cpp
r61cce2c r4a12852 26 26 hue(entry.get_value<double>("hue", Glib::Rand().get_double())), 27 27 host_directory(entry.get_value<std::string>("host-directory", 28 Glib::build_filename(Glib::get_home_dir(), ".infinote"))) 28 Glib::build_filename(Glib::get_home_dir(), ".infinote"))), 29 show_remote_cursors(entry.get_value<bool>( 30 "show-remote-users", true)), 31 show_remote_selections(entry.get_value<bool>( 32 "show-remote-selections", true)), 33 show_remote_current_lines(entry.get_value<bool>( 34 "show-remote-current-lines", true)), 35 show_remote_cursor_positions(entry.get_value<bool>( 36 "show-remote-cursor-positions", true)) 29 37 { 30 38 } … … 35 43 entry.set_value("hue", hue); 36 44 entry.set_value("host-directory", host_directory); 45 46 entry.set_value("show-remote-cursors", show_remote_cursors); 47 entry.set_value("show-remote-selections", show_remote_selections); 48 entry.set_value("show-remote-current-lines", show_remote_current_lines); 49 entry.set_value("show-remote-cursor-positions", 50 show_remote_cursor_positions); 37 51 } 38 52 -
code/core/preferences.hpp
r61cce2c r4a12852 106 106 Option<double> hue; 107 107 Option<std::string> host_directory; 108 109 Option<bool> show_remote_cursors; 110 Option<bool> show_remote_selections; 111 Option<bool> show_remote_current_lines; 112 Option<bool> show_remote_cursor_positions; 108 113 }; 109 114 -
code/core/textsessionview.cpp
r3aa7aa1 r4a12852 165 165 sigc::mem_fun( 166 166 *this, &TextSessionView::on_user_color_changed)); 167 m_preferences.user.show_remote_cursors.signal_changed().connect( 168 sigc::mem_fun( 169 *this, &TextSessionView::on_show_remote_cursors_changed)); 170 m_preferences.user.show_remote_selections.signal_changed().connect( 171 sigc::mem_fun( 172 *this, &TextSessionView::on_show_remote_selections_changed)); 173 m_preferences.user.show_remote_current_lines.signal_changed().connect( 174 sigc::mem_fun( 175 *this, &TextSessionView::on_show_remote_current_lines_changed)); 176 m_preferences.user.show_remote_cursor_positions.signal_changed().connect( 177 sigc::mem_fun( 178 *this, &TextSessionView::on_show_remote_cursor_positions_changed)); 167 179 m_preferences.editor.tab_width.signal_changed().connect( 168 180 sigc::mem_fun( … … 206 218 m_preferences.appearance.scheme_id.signal_changed().connect( 207 219 sigc::mem_fun(*this, &TextSessionView::on_scheme_changed)); 220 221 inf_text_gtk_view_set_show_remote_cursors( 222 m_infview, 223 m_preferences.user.show_remote_cursors 224 ); 225 inf_text_gtk_view_set_show_remote_selections( 226 m_infview, 227 m_preferences.user.show_remote_selections 228 ); 229 inf_text_gtk_view_set_show_remote_current_lines( 230 m_infview, 231 m_preferences.user.show_remote_current_lines 232 ); 233 208 234 gtk_source_view_set_tab_width(m_view, m_preferences.editor.tab_width); 209 235 gtk_source_view_set_insert_spaces_instead_of_tabs( … … 243 269 244 270 m_infviewport = inf_text_gtk_viewport_new(scroll->gobj(), user_table); 271 inf_text_gtk_viewport_set_show_user_markers( 272 m_infviewport, 273 m_preferences.user.show_remote_cursor_positions 274 ); 245 275 246 276 pack_start(*scroll, Gtk::PACK_EXPAND_WIDGET); … … 392 422 } 393 423 424 425 void Gobby::TextSessionView::on_show_remote_cursors_changed() 426 { 427 inf_text_gtk_view_set_show_remote_cursors( 428 m_infview, 429 m_preferences.user.show_remote_cursors 430 ); 431 } 432 433 void Gobby::TextSessionView::on_show_remote_selections_changed() 434 { 435 inf_text_gtk_view_set_show_remote_selections( 436 m_infview, 437 m_preferences.user.show_remote_selections 438 ); 439 } 440 441 void Gobby::TextSessionView::on_show_remote_current_lines_changed() 442 { 443 inf_text_gtk_view_set_show_remote_current_lines( 444 m_infview, 445 m_preferences.user.show_remote_current_lines 446 ); 447 } 448 449 void Gobby::TextSessionView::on_show_remote_cursor_positions_changed() 450 { 451 inf_text_gtk_viewport_set_show_user_markers( 452 m_infviewport, 453 m_preferences.user.show_remote_cursor_positions 454 ); 455 } 456 394 457 void Gobby::TextSessionView::on_tab_width_changed() 395 458 { -
code/core/textsessionview.hpp
r3aa7aa1 r4a12852 86 86 void on_user_color_changed(); 87 87 88 void on_show_remote_cursors_changed(); 89 void on_show_remote_selections_changed(); 90 void on_show_remote_current_lines_changed(); 91 void on_show_remote_cursor_positions_changed(); 92 88 93 void on_tab_width_changed(); 89 94 void on_tab_spaces_changed(); -
code/dialogs/preferences-dialog.cpp
r61cce2c r4a12852 232 232 m_group_settings(_("Settings")), 233 233 m_group_paths(_("Paths")), 234 m_group_remote(_("Remote Users")), 234 235 m_box_user_name(false, 6), 235 236 m_lbl_user_name(_("User name:"), Gtk::ALIGN_LEFT), … … 240 241 m_btn_path_host_directory(Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER), 241 242 m_lbl_path_host_directory(_("Host directory:")), 243 m_btn_remote_show_cursors(_("Show cursors of remote users")), 244 m_btn_remote_show_selections(_("Show selections of remote users")), 245 m_btn_remote_show_current_lines( 246 _("Highlight current line of remote users")), 247 m_btn_remote_show_cursor_positions( 248 _("Indicate remote users' cursor position in the scrollbar")), 242 249 m_size_group(Gtk::SizeGroup::create(Gtk::SIZE_GROUP_HORIZONTAL)) 243 250 { … … 293 300 // m_group_paths.show(); 294 301 302 m_btn_remote_show_cursors.set_active( 303 preferences.user.show_remote_cursors); 304 m_btn_remote_show_cursors.show(); 305 connect_option(m_btn_remote_show_cursors, 306 preferences.user.show_remote_cursors); 307 308 m_btn_remote_show_selections.set_active( 309 preferences.user.show_remote_selections); 310 m_btn_remote_show_selections.show(); 311 connect_option(m_btn_remote_show_selections, 312 preferences.user.show_remote_selections); 313 314 m_btn_remote_show_current_lines.set_active( 315 preferences.user.show_remote_current_lines); 316 m_btn_remote_show_current_lines.show(); 317 connect_option(m_btn_remote_show_current_lines, 318 preferences.user.show_remote_current_lines); 319 320 m_btn_remote_show_cursor_positions.set_active( 321 preferences.user.show_remote_cursor_positions); 322 m_btn_remote_show_cursor_positions.show(); 323 connect_option(m_btn_remote_show_cursor_positions, 324 preferences.user.show_remote_cursor_positions); 325 326 m_group_remote.add(m_btn_remote_show_cursors); 327 m_group_remote.add(m_btn_remote_show_selections); 328 m_group_remote.add(m_btn_remote_show_current_lines); 329 m_group_remote.add(m_btn_remote_show_cursor_positions); 330 m_group_remote.show(); 331 295 332 add(m_group_settings, false); 296 333 add(m_group_paths, false); 334 add(m_group_remote, false); 297 335 } 298 336 -
code/dialogs/preferences-dialog.hpp
r61cce2c r4a12852 127 127 Group m_group_settings; 128 128 Group m_group_paths; 129 Group m_group_remote; 129 130 130 131 Gtk::HBox m_box_user_name; … … 139 140 Gtk::Label m_lbl_path_host_directory; 140 141 Gtk::FileChooserButton m_btn_path_host_directory; 142 143 Gtk::CheckButton m_btn_remote_show_cursors; 144 Gtk::CheckButton m_btn_remote_show_selections; 145 Gtk::CheckButton m_btn_remote_show_current_lines; 146 Gtk::CheckButton m_btn_remote_show_cursor_positions; 141 147 142 148 Glib::RefPtr<Gtk::SizeGroup> m_size_group;
