Changeset c5cb29d4d328f0f803f3bcbd5a65fc89ed548ddd

Show
Ignore:
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:
4 added
7 modified

Legend:

Unmodified
Added
Removed
  • code/commands/Makefile.am

    rf8809f6 rc5cb29d  
    44 
    55libgobby_commands_a_SOURCES = \ 
     6        auth-commands.cpp \ 
    67        autosave-commands.cpp \ 
    78        browser-commands.cpp \ 
     
    1718 
    1819noinst_HEADERS = \ 
     20        auth-commands.hpp \ 
    1921        autosave-commands.hpp \ 
    2022        browser-commands.hpp \ 
  • code/core/browser.cpp

    r4857327 rc5cb29d  
    1717 */ 
    1818 
     19#include "dialogs/password-dialog.hpp" 
    1920#include "core/browser.hpp" 
    2021#include "util/file.hpp" 
     
    2728 
    2829#ifndef G_OS_WIN32 
    29 # include <sys/socket.h>  
     30# include <sys/socket.h> 
    3031# include <net/if.h> 
    3132#endif 
     33 
     34namespace 
     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} 
    3253 
    3354gint compare_func(GtkTreeModel* model, GtkTreeIter* first, GtkTreeIter* second, gpointer user_data) 
     
    89110        m_status_bar(status_bar), 
    90111        m_preferences(preferences), 
     112        m_gsasl(NULL), 
    91113        m_expander(_("_Direct Connection"), true), 
    92114        m_hbox(false, 6), 
     
    184206        } 
    185207 
     208        gsasl_done(m_gsasl); 
     209 
    186210        g_object_unref(m_browser_store); 
    187211        g_object_unref(m_sort_model); 
     
    287311                                NULL, hostname.c_str(), 
    288312                                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()); 
    290318 
    291319                        inf_xmpp_manager_add_connection(m_xmpp_manager, xmpp); 
     
    442470} 
    443471 
     472void 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 
    444484void Gobby::Browser::on_security_policy_changed() 
    445485{ 
  • code/core/browser.hpp

    r23dfbe6 rc5cb29d  
    3535#include <libinfgtk/inf-gtk-browser-model.h> 
    3636#include <libinfgtk/inf-gtk-browser-model-sort.h> 
     37 
     38#include <gsasl.h> 
    3739 
    3840#include <gtkmm/window.h> 
     
    7880 
    7981        void connect_to_host(Glib::ustring str); 
     82 
     83        void set_gsasl_context(Gsasl* gsasl, const char* mechanisms); 
    8084 
    8185        SignalActivate signal_activate() const { return m_signal_activate; } 
     
    123127        Preferences& m_preferences; 
    124128 
     129        Gsasl* m_gsasl; 
     130        std::string m_gsasl_mechanisms; 
    125131        InfXmppManager* m_xmpp_manager; 
    126132#ifdef LIBINFINITY_HAVE_AVAHI 
  • code/dialogs/Makefile.am

    r1a96a2b rc5cb29d  
    88        initial-dialog.cpp \ 
    99        open-location-dialog.cpp \ 
     10        password-dialog.cpp \ 
    1011        preferences-dialog.cpp 
    1112 
     
    1718        initial-dialog.hpp \ 
    1819        open-location-dialog.hpp \ 
     20        password-dialog.hpp \ 
    1921        preferences-dialog.hpp 
    2022 
  • code/window.cpp

    r86c27b8 rc5cb29d  
    5555        m_browser_context_commands(*this, m_browser, m_file_chooser, 
    5656                                   m_operations, m_preferences), 
     57        m_auth_commands(*this, m_browser, m_preferences), 
    5758        m_autosave_commands(m_text_folder, m_operations, m_info_storage, 
    5859                            m_preferences), 
  • code/window.hpp

    r96ac8c3 rc5cb29d  
    2828#include "commands/user-join-commands.hpp" 
    2929#include "commands/browser-context-commands.hpp" 
     30#include "commands/auth-commands.hpp" 
    3031#include "commands/folder-commands.hpp" 
    3132#include "commands/file-commands.hpp" 
     
    178179        BrowserContextCommands m_browser_context_commands; 
    179180 
     181        AuthCommands m_auth_commands; 
     182 
    180183        AutosaveCommands m_autosave_commands; 
    181184        SubscriptionCommands m_subscription_commands; 
  • configure.ac

    re78b79d rc5cb29d  
    3737AM_CONDITIONAL(WIN32, test x$win32 = xtrue) 
    3838 
    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" 
     39required_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" 
    4040 
    4141# Check if we are running on OS X, for special link handling.