/[pearpc]/src/system/ui/gtk/gui.cc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /src/system/ui/gtk/gui.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Wed Sep 5 17:11:21 2007 UTC (13 years, 3 months ago) by dpavlin
File size: 2084 byte(s)
import upstream CVS
1 /*
2 * PearPC
3 * gui.cc
4 *
5 * Copyright (C) 2003 Sebastian Biallas (sb@biallas.net)
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
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
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21 extern "C" {
22 #include <gtk/gtk.h>
23 }
24
25 #ifdef MIN
26 #undef MIN
27 #endif
28
29 #ifdef MAX
30 #undef MAX
31 #endif
32
33 #include "tools/data.h"
34 #include "system/ui/gui.h"
35
36 void sys_gui_init()
37 {
38 }
39
40 static void store_filename (GtkWidget *widget, gpointer user_data)
41 {
42 GtkWidget *file_selector = (GtkWidget *)user_data;
43 const gchar *selected_filename;
44
45 selected_filename = gtk_file_selection_get_filename(GTK_FILE_SELECTION (file_selector));
46 }
47
48
49
50 bool sys_gui_open_file_dialog(String &ret, const String &title, const String &filespec, const String &filespecname, const String &home, bool existing)
51 {
52 GtkWidget *file_selector;
53
54 file_selector = gtk_file_selection_new(title.contentChar());
55
56 g_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
57 "clicked",
58 G_CALLBACK (store_filename),
59 (gpointer) file_selector);
60
61 g_signal_connect_swapped(GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->ok_button),
62 "clicked",
63 G_CALLBACK (gtk_widget_destroy),
64 (gpointer) file_selector);
65
66 g_signal_connect_swapped(GTK_OBJECT (GTK_FILE_SELECTION (file_selector)->cancel_button),
67 "clicked",
68 G_CALLBACK (gtk_widget_destroy),
69 (gpointer) file_selector);
70
71 gtk_widget_show(file_selector);
72 }
73
74 int sys_gui_messagebox(const String &title, const String &text, int buttons)
75 {
76
77 }

  ViewVC Help
Powered by ViewVC 1.1.26