/[dino]/glashctl/sessionchooserdialog.cpp
ViewVC logotype

Contents of /glashctl/sessionchooserdialog.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Thu Jul 19 21:50:05 2007 UTC (17 years, 3 months ago) by larsl
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
Upgraded to GPL version 3 or later

1 /****************************************************************************
2 GLASHCtl - a simple tray applet for controlling lashd
3
4 Copyright (C) 2006 Lars Luthman <lars.luthman@gmail.com>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 ****************************************************************************/
20
21 #include <iostream>
22
23 #include <gtk/gtktreeitem.h>
24 #include <gtk/gtktreeview.h>
25 #include <glibmm/fileutils.h>
26
27 #include "sessionchooserdialog.hpp"
28
29
30 using namespace std;
31 using namespace Gtk;
32
33
34 SessionChooserDialog::SessionChooserDialog()
35 : FileChooserDialog("Select session", FILE_CHOOSER_ACTION_SELECT_FOLDER) {
36
37 signal_current_folder_changed().
38 connect(mem_fun(*this, &SessionChooserDialog::current_folder_changed));
39 }
40
41
42 void SessionChooserDialog::current_folder_changed() {
43 string dirname = get_current_folder();
44 Glib::Dir dir(get_current_folder());
45 for (Glib::DirIterator iter = dir.begin(); iter != dir.end(); ++iter) {
46 if (*iter == ".lash_info") {
47 response(RESPONSE_OK);
48 return;
49 }
50 }
51 }
52

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26