~ubuntu-branches/ubuntu/maverick/crossfire-client/maverick

« back to all changes in this revision

Viewing changes to gtk-v2/src/menubar.c

  • Committer: Bazaar Package Importer
  • Author(s): Kari Pahula
  • Date: 2005-08-20 23:46:35 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050820234635-m3nwl2a0190jc15f
Tags: 1.8.0-1
* New upstream release (closes: #298438)
* New maintainer
* Set datadir to /usr/share/games and sounddir to
  /usr/share/games/crossfire/sounds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
char *rcsid_gtk2_menubar_c =
 
2
    "$Id: menubar.c,v 1.1 2005/03/02 07:52:04 mwedel Exp $";
 
3
/*
 
4
    Crossfire client, a client program for the crossfire program.
 
5
 
 
6
    Copyright (C) 2005 Mark Wedel & Crossfire Development Team
 
7
 
 
8
    This program is free software; you can redistribute it and/or modify
 
9
    it under the terms of the GNU General Public License as published by
 
10
    the Free Software Foundation; either version 2 of the License, or
 
11
    (at your option) any later version.
 
12
 
 
13
    This program is distributed in the hope that it will be useful,
 
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
    GNU General Public License for more details.
 
17
 
 
18
    You should have received a copy of the GNU General Public License
 
19
    along with this program; if not, write to the Free Software
 
20
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
21
 
 
22
    The author can be reached via e-mail to crossfire@metalforge.org
 
23
*/
 
24
 
 
25
/* This file is here to cover the core selections from the top
 
26
 * menubar.
 
27
 */
 
28
#ifdef HAVE_CONFIG_H
 
29
#  include <config.h>
 
30
#endif
 
31
 
 
32
#include <gtk/gtk.h>
 
33
 
 
34
#include "client.h"
 
35
 
 
36
#include "callbacks.h"
 
37
#include "interface.h"
 
38
#include "support.h"
 
39
#include "p_cmd.h"
 
40
 
 
41
/* Few quick notes on the menubar:
 
42
 * 1) Using the stock Quit menu item for some reason causes it to
 
43
 *    take several seconds of 100% cpu utilization to show the menu.
 
44
 *    So I don't use the stock item.
 
45
 */
 
46
 
 
47
void
 
48
menu_quit_program                       (GtkMenuItem     *menuitem,
 
49
                                        gpointer         user_data)
 
50
{
 
51
#ifdef WIN32
 
52
    script_killall();
 
53
#endif
 
54
 
 
55
    LOG(LOG_INFO,"gtk::client_exit","Exiting with return value 0.");
 
56
    exit(0);
 
57
 
 
58
}
 
59
 
 
60
void
 
61
menu_quit_character                       (GtkMenuItem     *menuitem,
 
62
                                        gpointer         user_data)
 
63
{
 
64
    extended_command("quit");
 
65
 
 
66
}
 
67
 
 
68
 
 
69
void
 
70
menu_about                       (GtkMenuItem     *menuitem,
 
71
                                        gpointer         user_data)
 
72
{
 
73
 
 
74
}
 
75