Crossfire Client, Trunk
menubar.c File Reference
#include "client.h"
#include <gtk/gtk.h>
#include "p_cmd.h"
#include "main.h"
#include "image.h"
#include "gtk2proto.h"
#include "script.h"
+ Include dependency graph for menubar.c:

Go to the source code of this file.

Functions

void init_menu_items ()
 
static void menu_about (GtkMenuItem *menuitem, gpointer user_data)
 
static void menu_quit_character (GtkMenuItem *menuitem, gpointer user_data)
 
static void menu_quit_program (GtkMenuItem *menuitem, gpointer user_data)
 
static void on_disconnect_activate (GtkMenuItem *menuitem, gpointer user_data)
 

Detailed Description

Sets up menu connections and implements core menu items in the top menubar.

Quick notes on the menubar: 1) Using the stock Quit menu item for some reason causes it to take several seconds of 100% cpu utilization to show the menu. So I don't use the stock item.

Definition in file menubar.c.

Function Documentation

◆ init_menu_items()

void init_menu_items ( )

Initialize menu bar items and connect their signals to their handlers.

Definition at line 89 of file menubar.c.

References menu_about(), menu_quit_character(), menu_quit_program(), on_configure_activate(), on_disconnect_activate(), on_keybindings_activate(), on_menu_all_weapons_activate(), on_menu_arrows_activate(), on_menu_body_armor_activate(), on_menu_boots_activate(), on_menu_bows_activate(), on_menu_cloaks_activate(), on_menu_containers_activate(), on_menu_dont_pickup_activate(), on_menu_drinks_activate(), on_menu_flesh_activate(), on_menu_food_activate(), on_menu_gloves_activate(), on_menu_helmets_activate(), on_menu_jewels_activate(), on_menu_keys_activate(), on_menu_magical_items_activate(), on_menu_missile_weapons_activate(), on_menu_normal_book_scrolls_activate(), on_menu_not_cursed_activate(), on_menu_potions_activate(), on_menu_ratio_10_activate(), on_menu_ratio_15_activate(), on_menu_ratio_20_activate(), on_menu_ratio_25_activate(), on_menu_ratio_35_activate(), on_menu_ratio_40_activate(), on_menu_ratio_45_activate(), on_menu_ratio_50_activate(), on_menu_ratio_5_activate(), on_menu_ratio_pickup_off_activate(), on_menu_shields_activate(), on_menu_skillscrolls_activate(), on_menu_spellbooks_activate(), on_menu_stop_before_pickup_activate(), on_menu_valuables_activate(), on_menu_wands_rods_horns_activate(), on_msgctrl_activate(), on_save_window_position_activate(), on_skills_activate(), on_spells_activate(), and window_xml.

Referenced by init_ui().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ menu_about()

static void menu_about ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

Display client about dialog.

Definition at line 79 of file menubar.c.

References dialog_xml.

Referenced by init_menu_items().

+ Here is the caller graph for this function:

◆ menu_quit_character()

static void menu_quit_character ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

File | Quit Character Causes the client to ask the server to delete the current character.

Parameters
menuitem
user_data

Definition at line 71 of file menubar.c.

References extended_command(), and script_killall().

Referenced by init_menu_items().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ menu_quit_program()

static void menu_quit_program ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

File | Quit Shuts down the client application.

Parameters
menuitem
user_data

Definition at line 58 of file menubar.c.

References LOG(), LOG_INFO, and script_killall().

Referenced by init_menu_items().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_disconnect_activate()

static void on_disconnect_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)
static

Client | Disconnect Triggers the client to disconnect from the server.

Parameters
menuitem
user_data

Definition at line 45 of file menubar.c.

References client_disconnect(), and client_is_connected().

Referenced by init_menu_items().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: