Changeset 5843bef6491135d10a76ef9cfcff060e6fed5b76
- Timestamp:
- 01/06/07 23:54:54 (6 years ago)
- Author:
- Philipp Kern <phil@…>
- Parents:
- 1a0b6bc09de14029de094c8310a865f46f664179
- Children:
- da7de63fd4f82cb0f1078a0f954c3f09e2ee50bc
- git-committer:
- Philipp Kern <phil@0x539.de> / 2007-01-06T22:54:54Z+0000
- Message:
-
[project @ Goto line Dialog [fixes #79]]
Original author: Armin Burgmeier <armin@…>
Date: 2005-11-17 16:01:17+00:00
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r6db4078
|
r5843bef
|
|
| 48 | 48 | noinst_HEADERS += inc/entrydialog.hpp |
| 49 | 49 | noinst_HEADERS += inc/finddialog.hpp |
| | 50 | noinst_HEADERS += inc/gotodialog.hpp |
| 50 | 51 | noinst_HEADERS += inc/dragdrop.hpp |
| 51 | 52 | noinst_HEADERS += inc/window.hpp |
| … |
… |
|
| 102 | 103 | gobby_SOURCES += src/entrydialog.cpp |
| 103 | 104 | gobby_SOURCES += src/finddialog.cpp |
| | 105 | gobby_SOURCES += src/gotodialog.cpp |
| 104 | 106 | gobby_SOURCES += src/dragdrop.cpp |
| 105 | 107 | gobby_SOURCES += src/window.cpp |
-
|
r24041fb
|
r5843bef
|
|
| 45 | 45 | void set_search_only(bool search_only); |
| 46 | 46 | protected: |
| | 47 | virtual void on_show(); |
| | 48 | |
| 47 | 49 | virtual void on_find(); |
| 48 | 50 | virtual void on_replace(); |
| … |
… |
|
| 123 | 125 | } |
| 124 | 126 | |
| 125 | | #endif // _GOBBY_JOINDIALOG_HPP_ |
| | 127 | #endif // _GOBBY_FINDDIALOG_HPP_ |
-
|
ra78113f
|
r5843bef
|
|
| 103 | 103 | const Glib::RefPtr<Gtk::Action> action_edit_search; |
| 104 | 104 | const Glib::RefPtr<Gtk::Action> action_edit_search_replace; |
| | 105 | const Glib::RefPtr<Gtk::Action> action_edit_goto_line; |
| 105 | 106 | const Glib::RefPtr<Gtk::Action> action_edit_preferences; |
| 106 | 107 | |
-
|
r24041fb
|
r5843bef
|
|
| 30 | 30 | #include "header.hpp" |
| 31 | 31 | #include "docwindow.hpp" |
| 32 | | #include "folder.hpp" |
| 33 | | #include "finddialog.hpp" |
| 34 | 32 | #include "userlist.hpp" |
| 35 | 33 | #include "documentlist.hpp" |
| | 34 | #include "finddialog.hpp" |
| | 35 | #include "gotodialog.hpp" |
| | 36 | #include "folder.hpp" |
| 36 | 37 | #include "chat.hpp" |
| 37 | 38 | #include "statusbar.hpp" |
| … |
… |
|
| 86 | 87 | void on_edit_search(); |
| 87 | 88 | void on_edit_search_replace(); |
| | 89 | void on_edit_goto_line(); |
| 88 | 90 | void on_edit_preferences(); |
| 89 | 91 | |
| … |
… |
|
| 138 | 140 | |
| 139 | 141 | Header m_header; |
| 140 | | FindDialog m_finddialog; |
| 141 | 142 | UserList m_userlist; |
| 142 | 143 | DocumentList m_documentlist; |
| | 144 | |
| | 145 | FindDialog m_finddialog; |
| | 146 | GotoDialog m_gotodialog; |
| 143 | 147 | |
| 144 | 148 | Folder m_folder; |
-
|
r24041fb
|
r5843bef
|
|
| 47 | 47 | m_check_regex(_("Match as regular expression")), |
| 48 | 48 | m_frame_direction(_("Direction")), |
| 49 | | m_radio_up(m_group_direction, _("Up")), |
| 50 | | m_radio_down(m_group_direction, _("Down")), |
| | 49 | m_radio_up(m_group_direction, _("_Up"), true), |
| | 50 | m_radio_down(m_group_direction, _("_Down"), true), |
| 51 | 51 | m_btn_find(Gtk::Stock::FIND), |
| 52 | | m_btn_replace(_("Replace") ), |
| 53 | | m_btn_replace_all(_("Replace all") ), |
| | 52 | m_btn_replace(_("_Replace") ), |
| | 53 | m_btn_replace_all(_("Replace _all") ), |
| 54 | 54 | m_btn_close(Gtk::Stock::CLOSE), |
| 55 | 55 | m_regex("") |
| … |
… |
|
| 93 | 93 | m_hbox.pack_start(m_box_options); |
| 94 | 94 | m_hbox.pack_start(m_frame_direction, Gtk::PACK_SHRINK); |
| | 95 | m_hbox.set_spacing(10); |
| 95 | 96 | |
| 96 | 97 | m_box_options.pack_start(m_check_whole_word, Gtk::PACK_EXPAND_WIDGET); |
| … |
… |
|
| 133 | 134 | sigc::mem_fun(*this, &FindDialog::on_replace_all) ); |
| 134 | 135 | |
| 135 | | set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY); |
| | 136 | GTK_WIDGET_SET_FLAGS(m_btn_find.gobj(), GTK_CAN_DEFAULT); |
| | 137 | set_default(m_btn_find); |
| | 138 | |
| 136 | 139 | set_border_width(16); |
| 137 | 140 | |
| 138 | | // set_skip_pager_hint(true); |
| 139 | | // set_skip_taskbar_hint(true); |
| 140 | | |
| 141 | 141 | set_resizable(false); |
| 142 | | set_transient_for(parent); |
| 143 | 142 | show_all_children(); |
| 144 | 143 | |
| … |
… |
|
| 158 | 157 | |
| 159 | 158 | set_title(search_only ? _("Search") : _("Search and replace") ); |
| | 159 | } |
| | 160 | |
| | 161 | void Gobby::FindDialog::on_show() |
| | 162 | { |
| | 163 | ToolWindow::on_show(); |
| | 164 | m_entry_find.grab_focus(); |
| 160 | 165 | } |
| 161 | 166 | |
-
|
r509b047
|
r5843bef
|
|
| 47 | 47 | " <menuitem action=\"EditSearchReplace\" />" |
| 48 | 48 | " <separator />" |
| | 49 | " <menuitem action=\"EditGotoLine\" />" |
| | 50 | " <separator />" |
| 49 | 51 | " <menuitem action=\"EditPreferences\" />" |
| 50 | 52 | " </menu>" |
| … |
… |
|
| 281 | 283 | ), |
| 282 | 284 | |
| | 285 | action_edit_goto_line( |
| | 286 | Gtk::Action::create( |
| | 287 | "EditGotoLine", |
| | 288 | Gtk::Stock::JUMP_TO, |
| | 289 | _("Go to line..."), |
| | 290 | _("Move cursor to a specified line") |
| | 291 | ) |
| | 292 | ), |
| | 293 | |
| 283 | 294 | action_edit_preferences( |
| 284 | 295 | Gtk::Action::create( |
| … |
… |
|
| 379 | 390 | group_edit->add(action_edit_search); |
| 380 | 391 | group_edit->add(action_edit_search_replace); |
| | 392 | group_edit->add(action_edit_goto_line, Gtk::AccelKey("<control>I") ); |
| 381 | 393 | group_edit->add(action_edit_preferences); |
| 382 | 394 | |
-
|
r24041fb
|
r5843bef
|
|
| 22 | 22 | Gtk::Window(Gtk::WINDOW_TOPLEVEL) |
| 23 | 23 | { |
| 24 | | set_type_hint(Gdk::WINDOW_TYPE_HINT_UTILITY); |
| | 24 | set_type_hint(Gdk::WINDOW_TYPE_HINT_DIALOG); |
| 25 | 25 | set_transient_for(parent); |
| 26 | 26 | set_position(Gtk::WIN_POS_CENTER_ON_PARENT); |
-
|
r1a0b6bc
|
r5843bef
|
|
| 57 | 57 | #endif |
| 58 | 58 | m_header(), |
| 59 | | m_finddialog(*this), |
| 60 | 59 | m_userlist(*this, m_header, m_preferences, config["windows"]), |
| 61 | 60 | m_documentlist(*this, m_header, m_preferences, config["windows"]), |
| | 61 | m_finddialog(*this), m_gotodialog(*this), |
| 62 | 62 | m_folder(m_header, m_preferences), |
| 63 | 63 | m_statusbar(m_header, m_folder) |
| … |
… |
|
| 90 | 90 | m_header.action_edit_search_replace->signal_activate().connect( |
| 91 | 91 | sigc::mem_fun(*this, &Window::on_edit_search_replace) ); |
| | 92 | m_header.action_edit_goto_line->signal_activate().connect( |
| | 93 | sigc::mem_fun(*this, &Window::on_edit_goto_line) ); |
| 92 | 94 | m_header.action_edit_preferences->signal_activate().connect( |
| 93 | 95 | sigc::mem_fun(*this, &Window::on_edit_preferences) ); |
| … |
… |
|
| 755 | 757 | } |
| 756 | 758 | |
| | 759 | void Gobby::Window::on_edit_goto_line() |
| | 760 | { |
| | 761 | m_gotodialog.show(); |
| | 762 | m_gotodialog.grab_focus(); |
| | 763 | } |
| | 764 | |
| 757 | 765 | void Gobby::Window::on_edit_preferences() |
| 758 | 766 | { |