Changeset a2853fcd79f1a3d860b57026dad02fe89c2b27c7
- Timestamp:
- 01/06/07 23:29:14 (6 years ago)
- Author:
- Philipp Kern <phil@…>
- Parents:
- 8b2a3a49c23b0f36032b2321d61dd524ef2f618c
- Children:
- e76680186b096d86b316b2c0e733c25bfaed5930
- git-committer:
- Philipp Kern <phil@0x539.de> / 2007-01-06T22:29:14Z+0000
- Message:
-
[project @ Added about dialog]
Original author: Philipp Kern <phil@…>
Date: 2005-04-08 11:03:24+00:00
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r59e6131
|
ra2853fc
|
|
| 51 | 51 | typedef sigc::signal<void> signal_document_open_type; |
| 52 | 52 | typedef sigc::signal<void> signal_document_close_type; |
| | 53 | typedef sigc::signal<void> signal_about_type; |
| 53 | 54 | typedef sigc::signal<void> signal_quit_type; |
| 54 | 55 | |
| … |
… |
|
| 62 | 63 | signal_document_open_type document_open_event() const; |
| 63 | 64 | signal_document_close_type document_close_event() const; |
| | 65 | signal_about_type about_event() const; |
| 64 | 66 | signal_quit_type quit_event() const; |
| 65 | 67 | |
| … |
… |
|
| 79 | 81 | void on_app_document_open(); |
| 80 | 82 | void on_app_document_close(); |
| | 83 | void on_app_about(); |
| 81 | 84 | void on_app_quit(); |
| 82 | 85 | |
| … |
… |
|
| 94 | 97 | signal_document_open_type m_signal_document_open; |
| 95 | 98 | signal_document_close_type m_signal_document_close; |
| | 99 | signal_about_type m_signal_about; |
| 96 | 100 | signal_quit_type m_signal_quit; |
| 97 | 101 | }; |
-
|
r8c66072
|
ra2853fc
|
|
| 43 | 43 | void on_session_join(); |
| 44 | 44 | void on_session_quit(); |
| | 45 | void on_about(); |
| 45 | 46 | void on_quit(); |
| 46 | 47 | |
-
|
r92f8c62
|
ra2853fc
|
|
| 39 | 39 | m_group_app->add(Gtk::Action::create("MenuApp", "Gobby") ); |
| 40 | 40 | |
| 41 | | m_group_app->add(Gtk::Action::create("MenuSession", "Session") ); |
| 42 | | |
| 43 | 41 | // Create session |
| 44 | 42 | m_group_app->add( |
| … |
… |
|
| 83 | 81 | ); |
| 84 | 82 | |
| | 83 | // Session menu |
| | 84 | m_group_app->add(Gtk::Action::create("MenuSession", "Session") ); |
| | 85 | |
| 85 | 86 | // Create document |
| 86 | 87 | m_group_app->add( |
| … |
… |
|
| 124 | 125 | ) |
| 125 | 126 | ); |
| 126 | | |
| | 127 | |
| | 128 | // Help menu |
| | 129 | m_group_app->add(Gtk::Action::create("Help", "Help") ); |
| | 130 | |
| | 131 | // Display about dialog |
| | 132 | m_group_app->add( |
| | 133 | Gtk::Action::create( |
| | 134 | "About", |
| | 135 | Gtk::Stock::ABOUT, |
| | 136 | "About", |
| | 137 | "Shows Gobby's copyright and credits" |
| | 138 | ), |
| | 139 | sigc::mem_fun( |
| | 140 | *this, |
| | 141 | &Header::on_app_about |
| | 142 | ) |
| | 143 | ); |
| | 144 | |
| 127 | 145 | // Quit application |
| 128 | 146 | m_group_app->add( |
| … |
… |
|
| 204 | 222 | } |
| 205 | 223 | |
| | 224 | Gobby::Header::signal_about_type |
| | 225 | Gobby::Header::about_event() const |
| | 226 | { |
| | 227 | return m_signal_about; |
| | 228 | } |
| | 229 | |
| 206 | 230 | Gobby::Header::signal_quit_type |
| 207 | 231 | Gobby::Header::quit_event() const |
| … |
… |
|
| 288 | 312 | } |
| 289 | 313 | |
| | 314 | void Gobby::Header::on_app_about() |
| | 315 | { |
| | 316 | m_signal_about.emit(); |
| | 317 | } |
| | 318 | |
| 290 | 319 | void Gobby::Header::on_app_quit() |
| 291 | 320 | { |
-
|
r7ecb475
|
ra2853fc
|
|
| 19 | 19 | #include <stdexcept> |
| 20 | 20 | #include <gtkmm/main.h> |
| | 21 | #include <gtkmm/aboutdialog.h> |
| 21 | 22 | #include <gtkmm/messagedialog.h> |
| 22 | 23 | #include <libobby/client_buffer.hpp> |
| … |
… |
|
| 25 | 26 | #include "joindialog.hpp" |
| 26 | 27 | #include "window.hpp" |
| | 28 | #include "features.hpp" |
| 27 | 29 | |
| 28 | 30 | Gobby::Window::Window() |
| … |
… |
|
| 37 | 39 | m_header.session_quit_event().connect( |
| 38 | 40 | sigc::mem_fun(*this, &Window::on_session_quit) ); |
| | 41 | m_header.about_event().connect( |
| | 42 | sigc::mem_fun(*this, &Window::on_about) ); |
| 39 | 43 | m_header.quit_event().connect( |
| 40 | 44 | sigc::mem_fun(*this, &Window::on_quit) ); |
| … |
… |
|
| 235 | 239 | } |
| 236 | 240 | |
| | 241 | void Gobby::Window::on_about() |
| | 242 | { |
| | 243 | Gtk::AboutDialog dlg; |
| | 244 | dlg.set_name("Gobby"); |
| | 245 | dlg.set_version(PACKAGE_VERSION); |
| | 246 | dlg.set_comments("A collaborative text editor"); |
| | 247 | dlg.set_copyright("Copyright (C) 2005 0x539 dev group <crew@0x539.de>"); |
| | 248 | |
| | 249 | std::deque<Glib::ustring> authors; |
| | 250 | authors.push_back("Armin Burgmeier <armin@0x539.de>"); |
| | 251 | authors.push_back("Benjamin Herr <ben@0x539.de>"); |
| | 252 | authors.push_back("Philipp Kern <phil@0x539.de>"); |
| | 253 | dlg.set_authors(authors); |
| | 254 | |
| | 255 | dlg.set_license( |
| | 256 | "This program is free software; you can redistribute it\n" |
| | 257 | "and/or modify it under the terms of the GNU General Public\n" |
| | 258 | "License as published by the Free Software Foundation; either\n" |
| | 259 | "version 2 of the License, or (at your option) any later\n" |
| | 260 | "version.\n" |
| | 261 | "\n" |
| | 262 | "This program is distributed in the hope that it will be\n" |
| | 263 | "useful, but WITHOUT ANY WARRANTY; without even the implied\n" |
| | 264 | "warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n" |
| | 265 | "PURPOSE. See the GNU General Public License for more details." |
| | 266 | ); |
| | 267 | dlg.run(); |
| | 268 | } |
| | 269 | |
| 237 | 270 | void Gobby::Window::on_quit() |
| 238 | 271 | { |
-
|
r92f8c62
|
ra2853fc
|
|
| 14 | 14 | <menuitem action="CloseDocument" /> |
| 15 | 15 | </menu> |
| | 16 | <menu action="Help"> |
| | 17 | <menuitem action="About" /> |
| | 18 | </menu> |
| 16 | 19 | </menubar> |
| 17 | 20 | <toolbar name="ToolMainBar"> |