Changeset c5cb29d4d328f0f803f3bcbd5a65fc89ed548ddd
- Timestamp:
- 12/11/09 13:42:26 (3 years ago)
- Author:
- Benjamin Herr <ben@…>
- Parents:
- 485732763f97274d10799276e87f261e6289b602
- Children:
- e056a898bf91e96d0aaf2289e858bb5953fcde1c
- git-committer:
- Benjamin Herr <ben@0x539.de> / 2009-12-11T13:42:26Z+0100
- Message:
-
temporary commit
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
rf8809f6
|
rc5cb29d
|
|
| 4 | 4 | |
| 5 | 5 | libgobby_commands_a_SOURCES = \ |
| | 6 | auth-commands.cpp \ |
| 6 | 7 | autosave-commands.cpp \ |
| 7 | 8 | browser-commands.cpp \ |
| … |
… |
|
| 17 | 18 | |
| 18 | 19 | noinst_HEADERS = \ |
| | 20 | auth-commands.hpp \ |
| 19 | 21 | autosave-commands.hpp \ |
| 20 | 22 | browser-commands.hpp \ |
-
|
r4857327
|
rc5cb29d
|
|
| 17 | 17 | */ |
| 18 | 18 | |
| | 19 | #include "dialogs/password-dialog.hpp" |
| 19 | 20 | #include "core/browser.hpp" |
| 20 | 21 | #include "util/file.hpp" |
| … |
… |
|
| 27 | 28 | |
| 28 | 29 | #ifndef G_OS_WIN32 |
| 29 | | # include <sys/socket.h> |
| | 30 | # include <sys/socket.h> |
| 30 | 31 | # include <net/if.h> |
| 31 | 32 | #endif |
| | 33 | |
| | 34 | namespace |
| | 35 | { |
| | 36 | Glib::ustring prompt_password(Gtk::Window& parent, |
| | 37 | Gsasl_session* session) |
| | 38 | { |
| | 39 | InfXmppConnection* xmpp = |
| | 40 | INF_XMPP_CONNECTION(gsasl_session_hook_get(session)); |
| | 41 | gchar* remote_id; |
| | 42 | g_object_get(G_OBJECT(xmpp), "remote-id", &remote_id, NULL); |
| | 43 | Glib::ustring remote_id_(remote_id); |
| | 44 | g_free(remote_id); |
| | 45 | Gobby::PasswordDialog dialog(parent, remote_id_); |
| | 46 | dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_ACCEPT); |
| | 47 | dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); |
| | 48 | if(dialog.run() != Gtk::RESPONSE_ACCEPT) |
| | 49 | return ""; |
| | 50 | return dialog.get_password(); |
| | 51 | } |
| | 52 | } |
| 32 | 53 | |
| 33 | 54 | gint compare_func(GtkTreeModel* model, GtkTreeIter* first, GtkTreeIter* second, gpointer user_data) |
| … |
… |
|
| 89 | 110 | m_status_bar(status_bar), |
| 90 | 111 | m_preferences(preferences), |
| | 112 | m_gsasl(NULL), |
| 91 | 113 | m_expander(_("_Direct Connection"), true), |
| 92 | 114 | m_hbox(false, 6), |
| … |
… |
|
| 184 | 206 | } |
| 185 | 207 | |
| | 208 | gsasl_done(m_gsasl); |
| | 209 | |
| 186 | 210 | g_object_unref(m_browser_store); |
| 187 | 211 | g_object_unref(m_sort_model); |
| … |
… |
|
| 287 | 311 | NULL, hostname.c_str(), |
| 288 | 312 | m_preferences.security.policy, |
| 289 | | NULL, NULL, NULL); |
| | 313 | NULL, |
| | 314 | m_gsasl, |
| | 315 | m_gsasl_mechanisms.empty() |
| | 316 | ? "" |
| | 317 | : m_gsasl_mechanisms.c_str()); |
| 290 | 318 | |
| 291 | 319 | inf_xmpp_manager_add_connection(m_xmpp_manager, xmpp); |
| … |
… |
|
| 442 | 470 | } |
| 443 | 471 | |
| | 472 | void Gobby::Browser::set_gsasl_context(Gsasl* gsasl, const char* mechanisms) |
| | 473 | { |
| | 474 | m_gsasl = gsasl; |
| | 475 | m_gsasl_mechanisms = mechanisms ? mechanisms : ""; |
| | 476 | #ifdef LIBINFINITY_HAVE_AVAHI |
| | 477 | g_object_set(G_OBJECT(m_discovery), |
| | 478 | "sasl-context", m_gsasl, |
| | 479 | "sasl-mechanisms", mechanisms, |
| | 480 | NULL); |
| | 481 | #endif |
| | 482 | } |
| | 483 | |
| 444 | 484 | void Gobby::Browser::on_security_policy_changed() |
| 445 | 485 | { |
-
|
r23dfbe6
|
rc5cb29d
|
|
| 35 | 35 | #include <libinfgtk/inf-gtk-browser-model.h> |
| 36 | 36 | #include <libinfgtk/inf-gtk-browser-model-sort.h> |
| | 37 | |
| | 38 | #include <gsasl.h> |
| 37 | 39 | |
| 38 | 40 | #include <gtkmm/window.h> |
| … |
… |
|
| 78 | 80 | |
| 79 | 81 | void connect_to_host(Glib::ustring str); |
| | 82 | |
| | 83 | void set_gsasl_context(Gsasl* gsasl, const char* mechanisms); |
| 80 | 84 | |
| 81 | 85 | SignalActivate signal_activate() const { return m_signal_activate; } |
| … |
… |
|
| 123 | 127 | Preferences& m_preferences; |
| 124 | 128 | |
| | 129 | Gsasl* m_gsasl; |
| | 130 | std::string m_gsasl_mechanisms; |
| 125 | 131 | InfXmppManager* m_xmpp_manager; |
| 126 | 132 | #ifdef LIBINFINITY_HAVE_AVAHI |
-
|
r1a96a2b
|
rc5cb29d
|
|
| 8 | 8 | initial-dialog.cpp \ |
| 9 | 9 | open-location-dialog.cpp \ |
| | 10 | password-dialog.cpp \ |
| 10 | 11 | preferences-dialog.cpp |
| 11 | 12 | |
| … |
… |
|
| 17 | 18 | initial-dialog.hpp \ |
| 18 | 19 | open-location-dialog.hpp \ |
| | 20 | password-dialog.hpp \ |
| 19 | 21 | preferences-dialog.hpp |
| 20 | 22 | |
-
|
r86c27b8
|
rc5cb29d
|
|
| 55 | 55 | m_browser_context_commands(*this, m_browser, m_file_chooser, |
| 56 | 56 | m_operations, m_preferences), |
| | 57 | m_auth_commands(*this, m_browser, m_preferences), |
| 57 | 58 | m_autosave_commands(m_text_folder, m_operations, m_info_storage, |
| 58 | 59 | m_preferences), |
-
|
r96ac8c3
|
rc5cb29d
|
|
| 28 | 28 | #include "commands/user-join-commands.hpp" |
| 29 | 29 | #include "commands/browser-context-commands.hpp" |
| | 30 | #include "commands/auth-commands.hpp" |
| 30 | 31 | #include "commands/folder-commands.hpp" |
| 31 | 32 | #include "commands/file-commands.hpp" |
| … |
… |
|
| 178 | 179 | BrowserContextCommands m_browser_context_commands; |
| 179 | 180 | |
| | 181 | AuthCommands m_auth_commands; |
| | 182 | |
| 180 | 183 | AutosaveCommands m_autosave_commands; |
| 181 | 184 | SubscriptionCommands m_subscription_commands; |
-
|
re78b79d
|
rc5cb29d
|
|
| 37 | 37 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |
| 38 | 38 | |
| 39 | | required_libs="libxml++-2.6 glibmm-2.4 >= 2.18.0 giomm-2.4 >= 2.18.0 gtkmm-2.4 >= 2.12.0 gthread-2.0 gtksourceview-2.0 >= 2.4" |
| | 39 | required_libs="libxml++-2.6 glibmm-2.4 >= 2.18.0 giomm-2.4 >= 2.18.0 gtkmm-2.4 >= 2.12.0 gthread-2.0 gtksourceview-2.0 >= 2.4 libgsasl >= 0.2.21" |
| 40 | 40 | |
| 41 | 41 | # Check if we are running on OS X, for special link handling. |