1 /** 2 * Copyright (c) 2005 PCMan <pcman.tw@gmail.com> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software Foundation, 16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 */ 18 19 #ifndef SITELISTDLG_H 20 #define SITELISTDLG_H 21 22 #ifdef __GNUG__ 23 #pragma interface "sitelistdlg.h" 24 #endif 25 26 #include "dialog.h" 27 #include <cstdio> 28 29 /** 30 @author PCMan 31 */ 32 class CMainFrame; 33 34 class CSiteListDlg : public CDialog 35 { 36 public: 37 CSiteListDlg(CWidget* parent); 38 39 static void OnSearch(GtkButton* btn, CSiteListDlg* _this); 40 static void OnConnect(GtkButton* btn, CSiteListDlg* _this); 41 static void OnClose(GtkButton* btn, CSiteListDlg* _this); 42 void LoadSiteList(); 43 void LoadSiteList(GtkTreeIter *parent, FILE *file, char *line); 44 static void OnRowActivated(GtkTreeView *tree_view, GtkTreePath* path, GtkTreeViewColumn* col, CSiteListDlg* _this); 45 static void OnKeywordActivate(GtkEntry* entry, CSiteListDlg* _this); 46 public: 47 GtkWidget *m_Keyword; 48 GtkWidget *m_Tree; 49 GtkWidget *m_ConnectBtn; 50 GtkWidget *m_SearchBtn; 51 GtkTreeStore* m_Store; 52 protected: 53 GdkPixbuf* m_FolderIcon; 54 GdkPixbuf* m_SiteIcon; 55 CMainFrame* m_pParent; 56 }; 57 58 #endif 59