/* * Copyright (C) 2002-2004 Morten Brix Pedersen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef SERVERWINDOW_H #define SERVERWINDOW_H #include #include #include #include #include #include #include #include #include #include "MainWindow.h" class ServerWindow : public Gtk::Dialog { public: ServerWindow(Gtk::Window& parent); virtual ~ServerWindow() { } private: void connectEntry(); void addEntry(); void modifyEntry(); void deleteEntry(); void onColumnChanged(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&); bool focusChangeEvent(GdkEventFocus* event); void updateList(); Gtk::HBox hboxserver; // what our columned-list contains struct ModelColumns : public Gtk::TreeModel::ColumnRecord { Gtk::TreeModelColumn auto_connect; Gtk::TreeModelColumn servername; Gtk::TreeModelColumn port; Gtk::TreeModelColumn serverptr; ModelColumns() { add(servername); add(port); add(auto_connect); add(serverptr); } }; ModelColumns _columns; Glib::RefPtr _liststore; Gtk::TreeView _treeview; Gtk::Table _pref_table; Gtk::Entry ircnickentry; Gtk::Entry realnameentry; sigc::connection _column_signal; }; class ServerEditDialog : public Gtk::Dialog { public: ServerEditDialog(Gtk::Window& parent, Server*); virtual ~ServerEditDialog() { } virtual void on_response(int); private: Gtk::Entry nickentry; Gtk::Entry passentry; Gtk::Entry portentry; Gtk::Entry hostentry; Gtk::TextView cmdtext; Gtk::VBox *serverinfobox; Gtk::CheckButton auto_connect_button; Gtk::Table _server_options_table; Server *_server; }; #endif