Crossfire Client, Trunk
Classes | Macros | Functions | Variables
info.c File Reference
#include "client.h"
#include <gtk/gtk.h>
#include "image.h"
#include "main.h"
#include "gtk2proto.h"
#include "msgtypes.h"
Include dependency graph for info.c:

Go to the source code of this file.

Classes

struct  boolean_widget_t
 A container that holds the pointer and state of a checkbox control. Each Message Control dialog checkbox is tracked in one of these structs. More...
 
struct  buffer_control_t
 A container for all of the buffer control parameters like output count and time. The structure holds widget pointers, a state variables to track the parameter values, and the client built-in defaults. Only the final initializer for output_count and output_time is used as a default. More...
 
struct  buffer_parameter_t
 A container for a single buffer control parameter like output count or time. The structure holds a widget pointer, a state variable to track the widget value, and a default value. More...
 
struct  info_buffer_t
 A buffer record that supports suppression of duplicate messages. This buffer holds data for messages that are monitored for suppression of duplicates. The buffer holds all data passed to message_callback(), including type, subtype, suggested color, and the text. Age and count fields are provided to track the time a message is in the buffer, and how many times it occured during the time it is buffered. More...
 
struct  message_control_t
 A container for all of the checkboxes associated with a single message type. More...
 
struct  msgctrl_data_t
 Descriptive message type names with pane routing and buffer enable. A single struct defines a hard-coded, player-friendly, descriptive name to use for a single message type. All other fields in the structure define routing of messages to either or both client message panels, and whether or not messages of this type are passed through the duplicate suppression buffer system. This struct is intended to be used as the base type of an array that contains one struct per message type defined in newclient.h. The hard-coding of the descriptive name for the message type here is not ideal as it would be nicer to have it alongside the MSG_TYPE_* defines. More...
 

Macros

#define NUM_TEXT_VIEWS   2
 

Functions

void add_marked_text_to_pane (Info_Pane *pane, const char *message, int type, int subtype, int orig_color)
 
void add_style_to_textbuffer (Info_Pane *pane, GtkStyle *base_style)
 
void add_tags_to_textbuffer (Info_Pane *pane, GtkTextBuffer *textbuf)
 
static void add_to_textbuf (Info_Pane *pane, const char *message, int type, int subtype, int bold, int italic, int font, const char *color, int underline)
 
void default_msgctrl_configuration (void)
 
void draw_ext_info (int orig_color, int type, int subtype, const char *message)
 
void info_buffer_flush (const int id)
 
void info_buffer_init (void)
 
void info_buffer_tick (void)
 
void info_get_styles (void)
 
void info_init (GtkWidget *window_root)
 
static void launch_mapedit (char *path)
 
void load_msgctrl_configuration (void)
 
void menu_clear (void)
 
void msgctrl_init (GtkWidget *window_root)
 
void on_msgctrl_activate (GtkMenuItem *menuitem, gpointer user_data)
 
void on_msgctrl_button_apply_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_close_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_defaults_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_load_clicked (GtkButton *button, gpointer user_data)
 
void on_msgctrl_button_save_clicked (GtkButton *button, gpointer user_data)
 
void read_msgctrl_configuration (void)
 
void save_msgctrl_configuration (void)
 
void set_text_tag_from_style (GtkTextTag *tag, GtkStyle *style, const GtkStyle *const base_style)
 
void update_msgctrl_configuration (void)
 

Variables

bool arm_mapedit
 
const char *const colorname [NUM_COLORS]
 
static const char * font_style_names [NUM_FONTS]
 
static int has_style =0
 
Info_Pane info_pane [NUM_TEXT_VIEWS]
 
static int max_subtype =0
 
static const char *const usercolorname [NUM_COLORS]
 

GTK V2 Message Control System.

Supports a client-side implementation of what used to be provided by the server output-count and output-sync commands. These defines presently control the way the system works. The hardcoded values here are temporary and shall give way to client commands and/or a GUI method of configuring the system. Turn off the output count/sync by setting MESSAGE_COUNT_MAX to 1. It should be safe to experiment with most values as long as none of them are set less than 1, and as long as the two buffer sizes are set to reasonable values (buffer sizes include the terminating null character).

struct buffer_control_t buffer_control
 
#define COUNT_BUFFER_SIZE   16
 
struct info_buffer_t info_buffer [MESSAGE_BUFFER_COUNT]
 
#define MESSAGE_AGE_MAX   16
 
#define MESSAGE_BUFFER_COUNT   10
 
#define MESSAGE_BUFFER_SIZE   56
 
static void message_callback (int orig_color, int type, int subtype, char *message)
 
#define MESSAGE_COUNT_MAX   16
 
struct msgctrl_data_t msgctrl_defaults [MSG_TYPE_LAST-1]
 
GtkWidget * msgctrl_table
 
message_control_t msgctrl_widgets [MSG_TYPE_LAST-1]
 
GtkWidget * msgctrl_window
 

Detailed Description

Text-drawing functions for the message window

Definition in file info.c.

Macro Definition Documentation

◆ COUNT_BUFFER_SIZE

#define COUNT_BUFFER_SIZE   16

The maximum size of the tag that indicates the number of times a message occured while buffered. Example: "4 times "

Definition at line 124 of file info.c.

◆ MESSAGE_AGE_MAX

#define MESSAGE_AGE_MAX   16

The maximum time in client ticks, that a message resides in a buffer before it is sent to a client panel for display. 8 ticks is roughly 1 second.

Definition at line 134 of file info.c.

◆ MESSAGE_BUFFER_COUNT

#define MESSAGE_BUFFER_COUNT   10

The maximum number of messages to concurrently monitor for duplicate occurances.

Definition at line 116 of file info.c.

◆ MESSAGE_BUFFER_SIZE

#define MESSAGE_BUFFER_SIZE   56

The maximum allowable size of messages that are checked for duplicate reduction.

Definition at line 120 of file info.c.

◆ MESSAGE_COUNT_MAX

#define MESSAGE_COUNT_MAX   16

The maximum number of times a buffered message may repeat before it is sent to a client panel for for display.

Definition at line 129 of file info.c.

◆ NUM_TEXT_VIEWS

#define NUM_TEXT_VIEWS   2

EndOf GTK V2 Font Style Definitions. The number of supported message panes (normal + critical). This define is meant to support anything that iterates over all the information panels. It does nothing to help remove or document hardcoded panel numbers throughout the code.

Todo:
Create defines for each panel and replace panel numbers with the defines describing the panel. This integer declaration is to that account.c knows how many are being used here, and can add appropriately.

Definition at line 68 of file info.c.

Function Documentation

◆ add_marked_text_to_pane()

void add_marked_text_to_pane ( Info_Pane pane,
const char *  message,
int  type,
int  subtype,
int  orig_color 
)

This just does the work of taking text (which may have markup) and putting it into the target pane. This is a lower level than the draw_ext_info() below, as it does not do message routing. This is called from draw_ext_info() below, as well as account.c to update news/motd/rules.

Parameters
panePointer to the pane info to draw info.
messageMessage that is parsed and displayed.
typeType of the message - for default coloring information.
subtypeSubtype of message - used for default coloring information.
orig_colorLegacy color hint not based on type that is used when a theme does not define a style for the message.
Note
Note both type and subtype are the values passed to draw_ext_info().

< Only if we get a [color] tag should we care, otherwise, the type/subtype should dictate color (unless no style set!)

Definition at line 802 of file info.c.

References add_to_textbuf(), FONT_ARCANE, FONT_FIXED, FONT_HAND, FONT_NORMAL, FONT_STRANGE, has_style, LOG(), LOG_ERROR, LOG_INFO, Info_Pane::msg_type_tags, NUM_COLORS, and usercolorname.

Referenced by draw_ext_info(), on_combobox_starting_map_changed(), and update_login_info().

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

◆ add_style_to_textbuffer()

void add_style_to_textbuffer ( Info_Pane pane,
GtkStyle *  base_style 
)

This is like add_tags_to_textbuffer above, but styles can be changed during the run of the client. So this has to be separate to note it it might be a reload.

Parameters
paneMessage panel number to update.
base_styleBase style if retrieved - may be null.

Definition at line 409 of file info.c.

References Info_Pane::color_tags, font_style_names, Info_Pane::font_tags, MAX_BUF, NUM_COLORS, NUM_FONTS, set_text_tag_from_style(), Info_Pane::textbuffer, and usercolorname.

Referenced by info_get_styles(), init_choose_char_window(), init_create_account_window(), init_create_character_window(), and init_login_window().

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

◆ add_tags_to_textbuffer()

void add_tags_to_textbuffer ( Info_Pane pane,
GtkTextBuffer *  textbuf 
)

Adds the various tags to the next buffer. If textbuf is non-null, then it also sets the text buffer for that pane to textbuf. This is called right now by info_get_styles() below and from within the account code.

Parameters
paneMessage panel number to add buffer to.
textbufText buffer to apply tags to. It is allowed to be null if info_pane[pane].textbuffer has already been set.

Definition at line 355 of file info.c.

References Info_Pane::bold_tag, Info_Pane::color_tags, Info_Pane::default_tag, Info_Pane::font_tags, Info_Pane::italic_tag, max_subtype, MSG_TYPE_LAST, Info_Pane::msg_type_tags, NUM_COLORS, NUM_FONTS, Info_Pane::textbuffer, and Info_Pane::underline_tag.

Referenced by info_get_styles(), init_choose_char_window(), init_create_account_window(), init_create_character_window(), and init_login_window().

Here is the caller graph for this function:

◆ add_to_textbuf()

static void add_to_textbuf ( Info_Pane pane,
const char *  message,
int  type,
int  subtype,
int  bold,
int  italic,
int  font,
const char *  color,
int  underline 
)
static

Adds some data to the text buffer of the specified information panel using the appropriate tags to provide the desired formatting. Note that the style within the users theme determines how a particular type/subtype is drawn.

Parameters
paneThe client message panel to write a message to.
messageA pointer to some text to show in a client message window.
typeThe message type - see the MSG_TYPE values in newclient.h.
subtypeMessage subtype - see MSG_TYPE_*_* values in newclient.h.
boldIf true, should be in bold text.
italicIf true, should be in italic text
fontWhich font to use - resolved to an actual font style based on the user's theme file.
colorString name of the color.
underlineIf true, draw underlined text.

Definition at line 693 of file info.c.

References Info_Pane::adjustment, Info_Pane::bold_tag, Info_Pane::color_tags, Info_Pane::default_tag, Info_Pane::font_tags, Info_Pane::italic_tag, LOG(), LOG_ERROR, max_subtype, MSG_TYPE_CLIENT, MSG_TYPE_LAST, Info_Pane::msg_type_tags, NUM_COLORS, Info_Pane::textbuffer, Info_Pane::textmark, Info_Pane::textview, Info_Pane::underline_tag, and usercolorname.

Referenced by add_marked_text_to_pane().

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

◆ default_msgctrl_configuration()

void default_msgctrl_configuration ( void  )

Setup the state of the message control dialog so the configuration matches the default settings built in to the client.

Iterate through each message type. For each, copy the built-in client default to the Message Control dialog state variables. All supported defaults are copied, not just the ones supported by the layout.

Definition at line 1774 of file info.c.

References message_control_t::buffer, msgctrl_data_t::buffer, buffer_control, buffer_control_t::count, buffer_parameter_t::default_state, MSG_TYPE_LAST, msgctrl_defaults, msgctrl_widgets, NUM_TEXT_VIEWS, message_control_t::pane, msgctrl_data_t::pane, buffer_parameter_t::state, boolean_widget_t::state, buffer_control_t::timer, and update_msgctrl_configuration().

Referenced by msgctrl_init(), and on_msgctrl_button_defaults_clicked().

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

◆ draw_ext_info()

void draw_ext_info ( int  orig_color,
int  type,
int  subtype,
const char *  message 
)

A message processor that accepts messages along with meta information color and type. The message type and subtype are analyzed to select font and other text attributes. All gtk-v2 client messages pass through this processor before being output. Before addition of the output buffering feature, this was the message callback function. It is a separate function so that it can be called both by the callback, and but buffer maintenance functions.

Client-sourced messages generally should be passed directly to this handler instead of to the callback. This will save some overhead as the callback implements a system that coalesces duplicate messages - a feature that is not really applicable to most messages that do not come from the server.

Parameters
orig_colorSuggested text color that type/subtype can over-ride.
typeMessage type. See MSG_TYPE definitions in newclient.h.
subtypeMessage subtype. See MSG_TYPE_*_* values in newclient.h.
messageThe message text to display.

< When 0, the type is valid and may be used to pick the panel routing, otherwise the message can only go to the main message pane.

Definition at line 915 of file info.c.

References add_marked_text_to_pane(), CONFIG_TIMESTAMP, info_pane, LOG(), LOG_ERROR, MSG_TYPE_LAST, msgctrl_widgets, NUM_TEXT_VIEWS, and want_config.

Referenced by bind_key(), client_negotiate(), command_foodbeep(), command_show(), command_take(), complete_command(), configure_keys(), do_set_mapscale(), draw_prompt(), DrawInfoCmd(), get_image_info(), handle_local_command(), handle_query(), info_buffer_flush(), init_common_cache_data(), keybinding_get_data(), launch_mapedit(), list_item_drop(), load_msgctrl_configuration(), message_callback(), new_menu_pickup(), parse_key(), print_inventory(), save_defaults(), save_keys(), save_msgctrl_configuration(), save_winpos(), script_init(), script_kill(), script_killall(), script_list(), script_process_cmd(), script_tell(), send_command(), set_command_window(), SetupCmd(), show_keys(), toggle_keybind_scope(), unbind_key(), and unbind_usage().

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

◆ info_get_styles()

void info_get_styles ( void  )

Loads up values from the style file. Note that the actual name of the style file is set elsewhere.

This function is designed so that it should be possible to call it multiple times - it will release old style data and load up new values. In this way, a user should be able to change styles on the fly and have things work.

Definition at line 499 of file info.c.

References add_style_to_textbuffer(), add_tags_to_textbuffer(), has_init, has_style, info_pane, LOG(), LOG_INFO, MAX_BUF, max_subtype, Info_Pane::msg_type_tags, NUM_TEXT_VIEWS, and set_text_tag_from_style().

Referenced by load_theme().

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

◆ info_init()

void info_init ( GtkWidget *  window_root)

Initialize the information panels in the client. These panels are the client areas where text is drawn.

Parameters
window_rootPointer to the parent (root) application window.

Definition at line 632 of file info.c.

References Info_Pane::adjustment, info_buffer_init(), info_pane, MAX_BUF, message_callback(), MSG_TYPE_LAST, NUM_TEXT_VIEWS, Info_Pane::scrolled_window, setTextManager(), Info_Pane::textbuffer, Info_Pane::textmark, Info_Pane::textview, and window_xml.

Referenced by init_ui().

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

◆ load_msgctrl_configuration()

void load_msgctrl_configuration ( void  )

Setup the state of the message control dialog so the configuration matches a previously saved configuration.

Definition at line 1593 of file info.c.

References message_control_t::buffer, buffer_control, config_dir, buffer_control_t::count, draw_ext_info(), LOG(), LOG_DEBUG, LOG_ERROR, MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_ERROR, MSG_TYPE_LAST, msgctrl_widgets, NDI_RED, NUM_TEXT_VIEWS, message_control_t::pane, buffer_parameter_t::state, boolean_widget_t::state, buffer_control_t::timer, and update_msgctrl_configuration().

Referenced by msgctrl_init(), and on_msgctrl_button_load_clicked().

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

◆ menu_clear()

void menu_clear ( void  )

Clears all the message panels. It is not clear why someone would use it, but is called from the common area, and so is supported here.

Definition at line 1329 of file info.c.

References info_pane, and NUM_TEXT_VIEWS.

Referenced by do_clearinfo().

Here is the caller graph for this function:

◆ msgctrl_init()

void msgctrl_init ( GtkWidget *  window_root)

Initialize the message control panel by populating it with descriptions of each message type along with checkboxes that are used to configure the routing and duplicate suppression system. If previously saved settings are found on disk, they are loaded and applied, otherwise the built in client defaults are loaded and applied. This initialization must occur after the info_init() function runs.

Parameters
window_rootThe client main window
Todo:
Panes that are unsupported in the current layout should always have their routing disabled, and should disallow user interaction with the control but this logic is not yet implemented.

Definition at line 1348 of file info.c.

References message_control_t::buffer, buffer_control, buffer_control_t::count, default_msgctrl_configuration(), dialog_xml, load_msgctrl_configuration(), MSG_TYPE_LAST, msgctrl_defaults, msgctrl_table, msgctrl_widgets, msgctrl_window, NUM_TEXT_VIEWS, on_msgctrl_button_apply_clicked(), on_msgctrl_button_close_clicked(), on_msgctrl_button_defaults_clicked(), on_msgctrl_button_load_clicked(), on_msgctrl_button_save_clicked(), message_control_t::pane, buffer_parameter_t::ptr, boolean_widget_t::ptr, and buffer_control_t::timer.

Referenced by init_ui().

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

◆ on_msgctrl_activate()

void on_msgctrl_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Shows the message control dialog when the menu item is activated. The settings shown on the dialog when it is activated are the settings currently in use.

Parameters
menuitem
user_data

Definition at line 1910 of file info.c.

References msgctrl_window.

Referenced by init_menu_items().

Here is the caller graph for this function:

◆ on_msgctrl_button_apply_clicked()

void on_msgctrl_button_apply_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog apply button is pressed, the currently displayed settings are applied. The dialog is not dismissed, but remains open for further adjustments to be made.

Parameters
button
user_data

Definition at line 1880 of file info.c.

References read_msgctrl_configuration().

Referenced by msgctrl_init().

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

◆ on_msgctrl_button_close_clicked()

void on_msgctrl_button_close_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog close button is pressed, the currently displayed settings are applied and the dialog is dismissed.

Parameters
button
user_data

Definition at line 1894 of file info.c.

References msgctrl_window, and read_msgctrl_configuration().

Referenced by msgctrl_init().

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

◆ on_msgctrl_button_defaults_clicked()

void on_msgctrl_button_defaults_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog defaults button is pressed, the default settings built into the client are restored and applied.

Parameters
button
user_data

Definition at line 1865 of file info.c.

References default_msgctrl_configuration().

Referenced by msgctrl_init().

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

◆ on_msgctrl_button_load_clicked()

void on_msgctrl_button_load_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog load button is pressed, the settings last saved are restored and applied. It may be used to "undo" both applied and unapplied setting changes.

Parameters
button
user_data

Definition at line 1851 of file info.c.

References load_msgctrl_configuration().

Referenced by msgctrl_init().

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

◆ on_msgctrl_button_save_clicked()

void on_msgctrl_button_save_clicked ( GtkButton *  button,
gpointer  user_data 
)

When the message control dialog save button is pressed, the currently shown settings are applied for immediate use and they are saved to disk so the settings persist across client sessions. Saved settings automatically load and apply when the client is started.

Parameters
button
user_data

Definition at line 1835 of file info.c.

References read_msgctrl_configuration(), and save_msgctrl_configuration().

Referenced by msgctrl_init().

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

◆ read_msgctrl_configuration()

void read_msgctrl_configuration ( void  )

Reads the state of the message control dialog and applies the settings to the msgctrl_widgets[] state variables that control the message routing and duplicate suppression system.

Definition at line 1796 of file info.c.

References message_control_t::buffer, buffer_control, buffer_control_t::count, MSG_TYPE_LAST, msgctrl_widgets, NUM_TEXT_VIEWS, message_control_t::pane, buffer_parameter_t::ptr, buffer_parameter_t::state, boolean_widget_t::state, and buffer_control_t::timer.

Referenced by on_msgctrl_button_apply_clicked(), on_msgctrl_button_close_clicked(), on_msgctrl_button_save_clicked(), and save_msgctrl_configuration().

Here is the caller graph for this function:

◆ save_msgctrl_configuration()

void save_msgctrl_configuration ( void  )

Applies the current state of the checkboxes to the msgctrl_widgets state variables and saves the settings to disk so the configuration persists across client sessions.

Definition at line 1525 of file info.c.

References buffer_control, config_dir, buffer_control_t::count, draw_ext_info(), LOG(), LOG_DEBUG, LOG_WARNING, make_path_to_file(), MAX_BUF, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_CONFIG, MSG_TYPE_CLIENT_ERROR, MSG_TYPE_LAST, msgctrl_widgets, NDI_BLUE, NDI_RED, NUM_TEXT_VIEWS, read_msgctrl_configuration(), buffer_parameter_t::state, and buffer_control_t::timer.

Referenced by on_msgctrl_button_save_clicked().

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

◆ set_text_tag_from_style()

void set_text_tag_from_style ( GtkTextTag *  tag,
GtkStyle *  style,
const GtkStyle *const  base_style 
)

Sets attributes in the text tag from a style. Best I can gather, there is no way to take all of the attributes from a style and apply them directly to a text tag, hence this function to do the work. GtkTextTags also know what attributes are set and which are not set - thus, you can apply multiple tags to the same text, and get all of the effects. For styles, that isn't the case - a style contains all of the information. So this function also compares the loaded style from the base style, and only sets the attributes that are different.

Parameters
tagText tag to set values on.
styleStyle name to get values from.
base_styleBase style for the widget to compare against.

Definition at line 317 of file info.c.

Referenced by add_style_to_textbuffer(), and info_get_styles().

Here is the caller graph for this function:

◆ update_msgctrl_configuration()

void update_msgctrl_configuration ( void  )

Update the state of the message control dialog so the configuration matches the currently selected settings. Do not call this before msgctrl_widgets[] is initialized. It also really only makes sense to call it if changes have been made to msgctrl_widgets[].

Definition at line 1495 of file info.c.

References message_control_t::buffer, buffer_control, buffer_control_t::count, MSG_TYPE_LAST, msgctrl_widgets, NUM_TEXT_VIEWS, buffer_parameter_t::ptr, buffer_parameter_t::state, boolean_widget_t::state, and buffer_control_t::timer.

Referenced by default_msgctrl_configuration(), and load_msgctrl_configuration().

Here is the caller graph for this function:

Variable Documentation

◆ buffer_control

struct buffer_control_t buffer_control

◆ colorname

const char* const colorname[NUM_COLORS]

◆ font_style_names

const char* font_style_names[NUM_FONTS]
static
Initial value:
= {
"info_font_normal",
"info_font_arcane",
"info_font_strange",
"info_font_fixed",
"info_font_hand"
}

A mapping of font numbers to style based on the rcfile content.

Definition at line 47 of file info.c.

Referenced by add_style_to_textbuffer().

◆ has_style

int has_style =0
static

Definition at line 90 of file info.c.

Referenced by add_marked_text_to_pane(), and info_get_styles().

◆ info_buffer

struct info_buffer_t info_buffer[MESSAGE_BUFFER_COUNT]

Several buffers that support suppression of duplicates even even when the duplicates are alternate with other messages.

Referenced by info_buffer_flush(), info_buffer_init(), info_buffer_tick(), and message_callback().

◆ info_pane

Definition at line 72 of file info.c.

Referenced by draw_ext_info(), info_get_styles(), info_init(), and menu_clear().

◆ max_subtype

int max_subtype =0
static

Definition at line 90 of file info.c.

Referenced by add_tags_to_textbuffer(), add_to_textbuf(), and info_get_styles().

◆ msgctrl_defaults

struct msgctrl_data_t msgctrl_defaults[MSG_TYPE_LAST-1]
Initial value:
=
{
{ "Books", FALSE, { TRUE, FALSE } },
{ "Cards", FALSE, { TRUE, FALSE } },
{ "Paper", FALSE, { TRUE, FALSE } },
{ "Signs & Magic Mouths", FALSE, { TRUE, FALSE } },
{ "Monuments", FALSE, { TRUE, FALSE } },
{ "Dialogs (Altar/NPC/Magic Ear)" , FALSE, { TRUE, FALSE } },
{ "Message of the day", FALSE, { TRUE, FALSE } },
{ "Administrative", FALSE, { TRUE, FALSE } },
{ "Shops", TRUE, { TRUE, FALSE } },
{ "Command responses", FALSE, { TRUE, FALSE } },
{ "Changes to attributes", TRUE, { TRUE, TRUE } },
{ "Skill-related messages", TRUE, { TRUE, FALSE } },
{ "Apply results", TRUE, { TRUE, FALSE } },
{ "Attack results", TRUE, { TRUE, FALSE } },
{ "Player communication", FALSE, { TRUE, TRUE } },
{ "Spell results", TRUE, { TRUE, FALSE } },
{ "Item information", TRUE, { TRUE, FALSE } },
{ "Miscellaneous", TRUE, { TRUE, FALSE } },
{ "Victim notification", FALSE, { TRUE, TRUE } },
{ "Client-generated messages", FALSE, { TRUE, FALSE } }
}

A data structure to track how to handle each message type in with respect to panel routing and output count.

Referenced by default_msgctrl_configuration(), and msgctrl_init().

◆ msgctrl_table

GtkWidget* msgctrl_table

The message control table where routing and buffer configuration is set up.

Definition at line 112 of file info.c.

Referenced by msgctrl_init().

◆ msgctrl_widgets

message_control_t msgctrl_widgets[MSG_TYPE_LAST-1]

◆ msgctrl_window

GtkWidget* msgctrl_window

The message control dialog where routing and buffer configuration is set up.

Definition at line 108 of file info.c.

Referenced by msgctrl_init(), on_msgctrl_activate(), and on_msgctrl_button_close_clicked().

◆ usercolorname

const char *const usercolorname
static
Initial value:
= {
"black",
"white",
"darkblue",
"red",
"orange",
"lightblue",
"darkorange",
"green",
"darkgreen",
"grey",
"brown",
"yellow",
"tan"
}

Color names set by the user in the gtkrc file.

Definition at line 28 of file info.c.

Referenced by add_marked_text_to_pane(), add_style_to_textbuffer(), and add_to_textbuf().

MESSAGE_AGE_MAX
#define MESSAGE_AGE_MAX
Definition: info.c:134
MESSAGE_COUNT_MAX
#define MESSAGE_COUNT_MAX
Definition: info.c:129