Changeset 500d2c5f67fab64860d81d7e78f352ed5f5a5ba6

Show
Ignore:
Timestamp:
04/15/07 16:24:49 (6 years ago)
Author:
Armin Burgmeier <armin@…>
Parents:
f2e79fb7e99e21e1ae673f2d2d310e1ba1c77fb5
Children:
d694de594c7d4e794d7eb7c2a43fc1fd29e714c4
git-committer:
Armin Burgmeier <armin@0x539.de> / 2007-04-15T14:24:49Z+0000
Message:

2007-04-15 Armin Burgmeier <armin@…>

  • src/joindialog.cpp: Don't allow selection in the error case, use a single column for both icon and text. Make the dialog resizable.
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rf2e79fb r500d2c5  
     12007-04-15  Armin Burgmeier  <armin@0x539.de> 
     2 
     3        * src/joindialog.cpp: Don't allow selection in the error case, use a 
     4        single column for both icon and text. Make the dialog resizable. 
     5 
    162007-04-15  Philipp Kern <phil@0x539.de> 
    27 
  • src/joindialog.cpp

    rf2e79fb r500d2c5  
    1919#include <gtkmm/stock.h> 
    2020#include <gtkmm/enums.h> 
     21#include <gtkmm/alignment.h> 
    2122#include <iostream> 
    2223#include "common.hpp" 
     
    111112        m_table.set_spacings(5); 
    112113        m_vbox.set_spacing(5); 
    113         m_vbox.pack_start(m_table); 
     114        m_vbox.pack_start(m_table, Gtk::PACK_SHRINK); 
    114115 
    115116#ifdef WITH_ZEROCONF 
     
    129130                        sigc::mem_fun(*this, &JoinDialog::on_leave) ); 
    130131 
    131                 m_vbox.pack_start(m_ep_discover); 
     132                Gtk::Alignment* alignment = new Gtk::Alignment(0.5, 0.0); 
     133                alignment->add(m_ep_discover); 
     134                m_vbox.pack_start(*alignment, Gtk::PACK_EXPAND_WIDGET); 
    132135        } 
    133136#endif 
     
    141144        show_all(); 
    142145        set_border_width(10); 
    143         set_resizable(false); 
     146        set_resizable(true); 
    144147} 
    145148 
     
    276279                        m_session_view.append_column(_("Host"), m_session_cols.host); 
    277280                        m_session_view.append_column(_("Port"), m_session_cols.port); 
     281 
     282                        // Enable selection 
     283                        m_session_view.get_selection()->set_mode(Gtk::SELECTION_SINGLE); 
    278284                } catch(std::runtime_error& e) { 
    279285                        std::cerr << "Discovery failed: " << e.what() << std::endl; 
     
    290296 
    291297                        // append them 
    292                         m_session_view.append_column("", *stop); 
    293                         m_session_view.append_column(_("Failure"), *failure); 
     298                        Gtk::TreeViewColumn* column = Gtk::manage( 
     299                                new Gtk::TreeViewColumn(_("Failure"))); 
     300 
     301                        column->pack_start(*stop, false); 
     302                        column->pack_start(*failure, true); 
     303                        column->set_spacing(8); 
     304                        m_session_view.append_column(*column); 
     305 
     306                        // Disable selection 
     307                        m_session_view.get_selection()->set_mode(Gtk::SELECTION_NONE); 
    294308 
    295309                        // create a dummy row for the renderer to be displayed