/[pcsx2_0.9.7]/trunk/plugins/CDVDnull/Linux/Config.cpp
ViewVC logotype

Contents of /trunk/plugins/CDVDnull/Linux/Config.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 11 months ago) by william
File size: 2061 byte(s)
committing r3113 initial commit again...
1 /* CDVDnull
2 * Copyright (C) 2002-2009 Pcsx2 Team
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
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 #include "CDVD.h"
20
21 #include <assert.h>
22 #include <stdlib.h>
23 #include <stdio.h>
24 #include <string.h>
25
26 GtkWidget *MsgDlg;
27
28 void OnMsg_Ok()
29 {
30 gtk_widget_destroy(MsgDlg);
31 gtk_main_quit();
32 }
33
34 void SysMessage(const char *fmt, ...)
35 {
36 GtkWidget *Ok, *Txt;
37 GtkWidget *Box, *Box1;
38 va_list list;
39 char msg[512];
40
41 va_start(list, fmt);
42 vsprintf(msg, fmt, list);
43 va_end(list);
44
45 if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0;
46
47 MsgDlg = gtk_window_new(GTK_WINDOW_POPUP);
48 gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER);
49 gtk_window_set_title(GTK_WINDOW(MsgDlg), "CDVDnull Msg");
50 gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5);
51
52 Box = gtk_vbox_new(5, 0);
53 gtk_container_add(GTK_CONTAINER(MsgDlg), Box);
54 gtk_widget_show(Box);
55
56 Txt = gtk_label_new(msg);
57
58 gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5);
59 gtk_widget_show(Txt);
60
61 Box1 = gtk_hbutton_box_new();
62 gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0);
63 gtk_widget_show(Box1);
64
65 Ok = gtk_button_new_with_label("Ok");
66 gtk_signal_connect(GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL);
67 gtk_container_add(GTK_CONTAINER(Box1), Ok);
68 GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT);
69 gtk_widget_show(Ok);
70
71 gtk_widget_show(MsgDlg);
72
73 gtk_main();
74 }
75
76 void LoadConfig()
77 {
78 }

  ViewVC Help
Powered by ViewVC 1.1.22