~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: 2007-04-13 21:15:44 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20070413211544-vjo6zesj6g0wgmwf
Tags: 1.10.0-1
* New upstream release
* Install the README, README-dev and TODO files specific to the GTK2
  client to the corresponding package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
char *rcsid_gtk2_menubar_c =
2
 
    "$Id: menubar.c,v 1.2 2006/02/20 07:22:04 mwedel Exp $";
 
2
    "$Id: menubar.c 5010 2006-10-07 18:29:47Z qal21 $";
3
3
/*
4
4
    Crossfire client, a client program for the crossfire program.
5
5
 
29
29
#  include <config.h>
30
30
#endif
31
31
 
 
32
#ifdef WIN32
 
33
#include <windows.h>
 
34
#endif
32
35
#include <gtk/gtk.h>
33
36
 
34
37
#include "client.h"
37
40
#include "interface.h"
38
41
#include "support.h"
39
42
#include "p_cmd.h"
 
43
#include "main.h"
40
44
 
41
45
/* Few quick notes on the menubar:
42
46
 * 1) Using the stock Quit menu item for some reason causes it to
86
90
 
87
91
}
88
92
 
 
93
/* This function enables/disables some of the menubar options.  Some do
 
94
 * not make sense if not connected to the server, so should be
 
95
 * disabled until connected.
 
96
 * enable is a true/false value. If true, enable the items, if false,
 
97
 * disable them.
 
98
 */
89
99
 
90
 
void
91
 
menu_about                       (GtkMenuItem     *menuitem,
92
 
                                        gpointer         user_data)
 
100
void enable_menu_items(int enable)
93
101
{
94
102
 
 
103
    gtk_widget_set_sensitive(lookup_widget(window_root,"quit_character1"), enable);
 
104
    gtk_widget_set_sensitive(lookup_widget(window_root,"disconnect"), enable);
 
105
    gtk_widget_set_sensitive(lookup_widget(window_root,"spells"), enable);
 
106
    gtk_widget_set_sensitive(lookup_widget(window_root,"pickup1"), enable);
 
107
 
95
108
}
96