7548 lines
229 KiB
C
7548 lines
229 KiB
C
/*
|
|
* CDE - Common Desktop Environment
|
|
*
|
|
* Copyright (c) 1993-2012, The Open Group. All rights reserved.
|
|
*
|
|
* These libraries and programs are free software; you can
|
|
* redistribute them and/or modify them under the terms of the GNU
|
|
* Lesser General Public License as published by the Free Software
|
|
* Foundation; either version 2 of the License, or (at your option)
|
|
* any later version.
|
|
*
|
|
* These libraries and programs are distributed in the hope that
|
|
* they will be useful, but WITHOUT ANY WARRANTY; without even the
|
|
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
* PURPOSE. See the GNU Lesser General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with these librararies and programs; if not, write
|
|
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
|
* Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
/* $TOG: options_ui.C /main/17 1999/03/25 14:17:16 mgreess $ */
|
|
/*
|
|
* File: options_ui.c
|
|
* Contains: user module object initialize and create functions
|
|
*
|
|
* This file was generated by dtcodegen, from module options
|
|
*
|
|
* ** DO NOT MODIFY BY HAND - ALL MODIFICATIONS WILL BE LOST **
|
|
*/
|
|
/*
|
|
* Common Desktop Environment
|
|
*
|
|
* (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
|
|
* (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
|
|
* (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
|
|
* (c) Copyright 1993, 1994, 1995 Novell, Inc.
|
|
* (c) Copyright 1995 Digital Equipment Corp.
|
|
* (c) Copyright 1995 Fujitsu Limited
|
|
* (c) Copyright 1995 Hitachi, Ltd.
|
|
*
|
|
*
|
|
* RESTRICTED RIGHTS LEGEND
|
|
*
|
|
*Use, duplication, or disclosure by the U.S. Government is subject to
|
|
*restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
|
|
*Technical Data and Computer Software clause in DFARS 252.227-7013. Rights
|
|
*for non-DOD U.S. Government Departments and Agencies are as set forth in
|
|
*FAR 52.227-19(c)(1,2).
|
|
|
|
*Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, CA 94304 U.S.A.
|
|
*International Business Machines Corp., Route 100, Somers, NY 10589 U.S.A.
|
|
*Sun Microsystems, Inc., 2550 Garcia Avenue, Mountain View, CA 94043 U.S.A.
|
|
*Novell, Inc., 190 River Road, Summit, NJ 07901 U.S.A.
|
|
*Digital Equipment Corp., 111 Powdermill Road, Maynard, MA 01754, U.S.A.
|
|
*Fujitsu Limited, 1015, Kamikodanaka Nakahara-Ku, Kawasaki 211, Japan
|
|
*Hitachi, Ltd., 6, Kanda Surugadai 4-Chome, Chiyoda-ku, Tokyo 101, Japan
|
|
*/
|
|
|
|
|
|
#include <stdlib.h>
|
|
#include <X11/Intrinsic.h>
|
|
#include <Xm/DialogS.h>
|
|
#include <Xm/Form.h>
|
|
#include <Xm/PanedW.h>
|
|
#include <Xm/RowColumn.h>
|
|
#include <Xm/Separator.h>
|
|
#include <Xm/Label.h>
|
|
#include <Xm/PushB.h>
|
|
#include <Xm/ToggleB.h>
|
|
#include <Xm/SSpinB.h>
|
|
#include <Xm/TextF.h>
|
|
#include <Xm/ScrollBar.h>
|
|
#include <Xm/ScrolledW.h>
|
|
#include <Xm/List.h>
|
|
#include <Xm/Text.h>
|
|
#include <Xm/Scale.h>
|
|
#include "dtb_utils.h"
|
|
#include "dtmailopts.h"
|
|
#include "options_ui.h"
|
|
#include "MailMsg.h"
|
|
|
|
DtbOptionsDialogInfoRec dtb_options_dialog =
|
|
{
|
|
False /* initialized */
|
|
};
|
|
|
|
/*
|
|
* Widget create procedure decls
|
|
*/
|
|
static int dtb_options_dialog_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_dialog_button_panel_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_ctrl_panel_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_layer_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_category_opmenu_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator10_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_msg_header_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_msg_view_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_compose_win_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_msg_filing_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_vacation_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_templates_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_aliases_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_advanced_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_checkbox_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator4_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group28_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group21_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_destroy_del_msg_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_deleted_msg_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group18_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group19_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group20_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_mail_check_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_seconds_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_signal_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_beeps_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_spinbox2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_flashes_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_display_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_headers_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator6_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_abr_header_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group8_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group17_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group22_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_fixed_font_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_display_row_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_rows_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_characters_wide_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_char_wide_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group3_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_fields_hide_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_hidden_fields_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_hidden_fields_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_header_fields_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_h_field_add_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_h_field_delete_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_h_field_change_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_wrap_checkbox_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_confirm_attachment_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator3_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator7_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_deadletter_field_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator9_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_format_menu_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group6_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group4_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_indent_str_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group23_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_indent_str_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_reply_include_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group7_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_menu_labels_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_hdr_field_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_def_value_field_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_hdr_field_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_def_value_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_add_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_del_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_change_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator8_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator5_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group25_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_mailb_for_sent_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group26_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group9_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_dpy_up_mbox_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_recent_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_visit_mailb_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_sent_mail_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_log_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group24_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_path_file_name_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_mv_menu_lst_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_srt_looking_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_move_menu_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_move_menu_lbl2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_path_file_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_start_look_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_mm_add_butt_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_mm_delete_butt_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_mm_change_butt_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_vacation_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group10_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_vacation_rb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_vacation_msg_tp_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_subject_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_msg_list_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_subject_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_vacation_rb_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group13_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group11_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_menu_label_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_path_filename_label_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_templates_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_templates_list_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_menu_label_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_path_filename_label_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_tem_add_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_tem_del_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_tem_change_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group14_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group15_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_alias_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_addresses_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_alias_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_alias_list_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_alias_tf_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_address_tf_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_alias_add_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_alias_delete_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_al_change_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_update_mbox_scale_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_update_mailb_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_frequently_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_seldom_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator11_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_adv_def_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group12_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_group16_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_local_name_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_local_name_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_local_name_add_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_local_name_del_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_local_name_chg_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_ok_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_reset_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_cancel_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_separator_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_apply_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
static int dtb_options_help_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
);
|
|
|
|
int
|
|
dtbOptionsDialogInfo_clear(DtbOptionsDialogInfo instance)
|
|
{
|
|
memset((void *)(instance), 0, sizeof(*instance));
|
|
return 0;
|
|
}
|
|
|
|
int
|
|
dtb_options_dialog_initialize(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
if (instance->initialized)
|
|
{
|
|
return 0;
|
|
}
|
|
instance->initialized = True;
|
|
|
|
dtb_options_dialog_create(instance,
|
|
parent);
|
|
dtb_options_dialog_button_panel_create(instance,
|
|
instance->dialog_panedwin);
|
|
dtb_options_ctrl_panel_create(instance,
|
|
instance->dialog_form);
|
|
dtb_options_layer_create(instance,
|
|
instance->dialog_form);
|
|
dtb_options_category_opmenu_create(instance,
|
|
instance->ctrl_panel);
|
|
dtb_options_separator10_create(instance,
|
|
instance->ctrl_panel);
|
|
dtb_options_msg_header_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_msg_view_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_compose_win_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_msg_filing_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_vacation_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_templates_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_aliases_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_advanced_pane_create(instance,
|
|
instance->layer);
|
|
dtb_options_separator2_create(instance,
|
|
instance->msg_header_pane);
|
|
dtb_options_checkbox_create(instance,
|
|
instance->msg_header_pane);
|
|
dtb_options_separator4_create(instance,
|
|
instance->msg_header_pane);
|
|
dtb_options_group28_create(instance,
|
|
instance->msg_header_pane);
|
|
dtb_options_group21_create(instance,
|
|
instance->msg_header_pane);
|
|
dtb_options_destroy_del_msg_lbl_create(instance,
|
|
instance->group28);
|
|
dtb_options_deleted_msg_cb_create(instance,
|
|
instance->group28);
|
|
dtb_options_group_create(instance,
|
|
instance->group21);
|
|
dtb_options_group18_create(instance,
|
|
instance->group21);
|
|
dtb_options_group19_create(instance,
|
|
instance->group21);
|
|
dtb_options_group20_create(instance,
|
|
instance->group21);
|
|
dtb_options_mail_check_sb_create(instance,
|
|
instance->group);
|
|
dtb_options_seconds_lbl_create(instance,
|
|
instance->group);
|
|
dtb_options_signal_sb_create(instance,
|
|
instance->group18);
|
|
dtb_options_beeps_lbl_create(instance,
|
|
instance->group18);
|
|
dtb_options_spinbox2_create(instance,
|
|
instance->group19);
|
|
dtb_options_flashes_lbl_create(instance,
|
|
instance->group19);
|
|
dtb_options_display_sb_create(instance,
|
|
instance->group20);
|
|
dtb_options_headers_lbl_create(instance,
|
|
instance->group20);
|
|
dtb_options_separator6_create(instance,
|
|
instance->msg_view_pane);
|
|
dtb_options_abr_header_lbl_create(instance,
|
|
instance->msg_view_pane);
|
|
dtb_options_group8_create(instance,
|
|
instance->msg_view_pane);
|
|
dtb_options_group17_create(instance,
|
|
instance->msg_view_pane);
|
|
dtb_options_group2_create(instance,
|
|
instance->group8);
|
|
dtb_options_group22_create(instance,
|
|
instance->group8);
|
|
dtb_options_fixed_font_cb_create(instance,
|
|
instance->group8);
|
|
dtb_options_display_row_sb_create(instance,
|
|
instance->group2);
|
|
dtb_options_rows_lbl_create(instance,
|
|
instance->group2);
|
|
dtb_options_characters_wide_sb_create(instance,
|
|
instance->group22);
|
|
dtb_options_char_wide_lbl_create(instance,
|
|
instance->group22);
|
|
dtb_options_group3_create(instance,
|
|
instance->group17);
|
|
dtb_options_fields_hide_create(instance,
|
|
instance->group17);
|
|
dtb_options_hidden_fields_list_create(instance,
|
|
instance->group17);
|
|
dtb_options_hidden_fields_lbl_create(instance,
|
|
instance->group17);
|
|
dtb_options_header_fields_lbl_create(instance,
|
|
instance->group17);
|
|
dtb_options_h_field_add_create(instance,
|
|
instance->group3);
|
|
dtb_options_h_field_delete_create(instance,
|
|
instance->group3);
|
|
dtb_options_h_field_change_create(instance,
|
|
instance->group3);
|
|
dtb_options_wrap_checkbox_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_confirm_attachment_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_separator3_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_separator7_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_deadletter_field_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_separator9_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_format_menu_lbl_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_group6_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_group4_create(instance,
|
|
instance->compose_win_pane);
|
|
dtb_options_indent_str_tf_create(instance,
|
|
instance->group6);
|
|
dtb_options_group23_create(instance,
|
|
instance->group6);
|
|
dtb_options_indent_str_lbl_create(instance,
|
|
instance->group23);
|
|
dtb_options_reply_include_lbl_create(instance,
|
|
instance->group23);
|
|
dtb_options_group7_create(instance,
|
|
instance->group4);
|
|
dtb_options_list_create(instance,
|
|
instance->group4);
|
|
dtb_options_menu_labels_lbl_create(instance,
|
|
instance->group4);
|
|
dtb_options_hdr_field_create(instance,
|
|
instance->group4);
|
|
dtb_options_def_value_field_create(instance,
|
|
instance->group4);
|
|
dtb_options_hdr_field_lbl_create(instance,
|
|
instance->group4);
|
|
dtb_options_def_value_lbl_create(instance,
|
|
instance->group4);
|
|
dtb_options_add_button_create(instance,
|
|
instance->group7);
|
|
dtb_options_del_button_create(instance,
|
|
instance->group7);
|
|
dtb_options_change_button_create(instance,
|
|
instance->group7);
|
|
dtb_options_separator8_create(instance,
|
|
instance->msg_filing_pane);
|
|
dtb_options_separator5_create(instance,
|
|
instance->msg_filing_pane);
|
|
dtb_options_group25_create(instance,
|
|
instance->msg_filing_pane);
|
|
dtb_options_mailb_for_sent_lbl_create(instance,
|
|
instance->msg_filing_pane);
|
|
dtb_options_group26_create(instance,
|
|
instance->msg_filing_pane);
|
|
dtb_options_group9_create(instance,
|
|
instance->msg_filing_pane);
|
|
dtb_options_dpy_up_mbox_cb_create(instance,
|
|
instance->group25);
|
|
dtb_options_recent_sb_create(instance,
|
|
instance->group25);
|
|
dtb_options_visit_mailb_lbl_create(instance,
|
|
instance->group25);
|
|
dtb_options_sent_mail_tf_create(instance,
|
|
instance->group26);
|
|
dtb_options_log_cb_create(instance,
|
|
instance->group26);
|
|
dtb_options_group24_create(instance,
|
|
instance->group9);
|
|
dtb_options_path_file_name_tf_create(instance,
|
|
instance->group9);
|
|
dtb_options_mv_menu_lst_create(instance,
|
|
instance->group9);
|
|
dtb_options_srt_looking_tf_create(instance,
|
|
instance->group9);
|
|
dtb_options_move_menu_lbl_create(instance,
|
|
instance->group9);
|
|
dtb_options_move_menu_lbl2_create(instance,
|
|
instance->group9);
|
|
dtb_options_path_file_lbl_create(instance,
|
|
instance->group9);
|
|
dtb_options_start_look_lbl_create(instance,
|
|
instance->group9);
|
|
dtb_options_mm_add_butt_create(instance,
|
|
instance->group24);
|
|
dtb_options_mm_delete_butt_create(instance,
|
|
instance->group24);
|
|
dtb_options_mm_change_butt_create(instance,
|
|
instance->group24);
|
|
dtb_options_vacation_lbl_create(instance,
|
|
instance->vacation_pane);
|
|
dtb_options_group10_create(instance,
|
|
instance->vacation_pane);
|
|
dtb_options_vacation_rb_create(instance,
|
|
instance->group10);
|
|
dtb_options_vacation_msg_tp_create(instance,
|
|
instance->group10);
|
|
dtb_options_subject_tf_create(instance,
|
|
instance->group10);
|
|
dtb_options_msg_list_lbl_create(instance,
|
|
instance->group10);
|
|
dtb_options_subject_lbl_create(instance,
|
|
instance->group10);
|
|
dtb_options_vacation_rb_lbl_create(instance,
|
|
instance->group10);
|
|
dtb_options_group13_create(instance,
|
|
instance->templates_pane);
|
|
dtb_options_group11_create(instance,
|
|
instance->group13);
|
|
dtb_options_menu_label_create(instance,
|
|
instance->group13);
|
|
dtb_options_path_filename_label_create(instance,
|
|
instance->group13);
|
|
dtb_options_templates_list_create(instance,
|
|
instance->group13);
|
|
dtb_options_templates_list_lbl_create(instance,
|
|
instance->group13);
|
|
dtb_options_menu_label_lbl_create(instance,
|
|
instance->group13);
|
|
dtb_options_path_filename_label_lbl_create(instance,
|
|
instance->group13);
|
|
dtb_options_tem_add_but_create(instance,
|
|
instance->group11);
|
|
dtb_options_tem_del_but_create(instance,
|
|
instance->group11);
|
|
dtb_options_tem_change_but_create(instance,
|
|
instance->group11);
|
|
dtb_options_group14_create(instance,
|
|
instance->aliases_pane);
|
|
dtb_options_group15_create(instance,
|
|
instance->group14);
|
|
dtb_options_alias_tf_create(instance,
|
|
instance->group14);
|
|
dtb_options_addresses_tf_create(instance,
|
|
instance->group14);
|
|
dtb_options_alias_list_create(instance,
|
|
instance->group14);
|
|
dtb_options_alias_list_lbl_create(instance,
|
|
instance->group14);
|
|
dtb_options_alias_tf_lbl_create(instance,
|
|
instance->group14);
|
|
dtb_options_address_tf_lbl_create(instance,
|
|
instance->group14);
|
|
dtb_options_alias_add_but_create(instance,
|
|
instance->group15);
|
|
dtb_options_alias_delete_but_create(instance,
|
|
instance->group15);
|
|
dtb_options_al_change_but_create(instance,
|
|
instance->group15);
|
|
dtb_options_update_mbox_scale_create(instance,
|
|
instance->advanced_pane);
|
|
dtb_options_update_mailb_lbl_create(instance,
|
|
instance->advanced_pane);
|
|
dtb_options_frequently_lbl_create(instance,
|
|
instance->advanced_pane);
|
|
dtb_options_seldom_lbl_create(instance,
|
|
instance->advanced_pane);
|
|
dtb_options_separator11_create(instance,
|
|
instance->advanced_pane);
|
|
dtb_options_adv_def_cb_create(instance,
|
|
instance->advanced_pane);
|
|
dtb_options_group12_create(instance,
|
|
instance->advanced_pane);
|
|
dtb_options_group16_create(instance,
|
|
instance->group12);
|
|
dtb_options_local_name_tf_create(instance,
|
|
instance->group12);
|
|
dtb_options_local_name_list_create(instance,
|
|
instance->group12);
|
|
dtb_options_local_name_add_but_create(instance,
|
|
instance->group16);
|
|
dtb_options_local_name_del_but_create(instance,
|
|
instance->group16);
|
|
dtb_options_local_name_chg_but_create(instance,
|
|
instance->group16);
|
|
dtb_options_ok_button_create(instance,
|
|
instance->dialog_button_panel);
|
|
dtb_options_reset_button_create(instance,
|
|
instance->dialog_button_panel);
|
|
dtb_options_cancel_button_create(instance,
|
|
instance->dialog_button_panel);
|
|
dtb_options_separator_create(instance,
|
|
instance->dialog_button_panel);
|
|
dtb_options_apply_button_create(instance,
|
|
instance->dialog_button_panel);
|
|
dtb_options_help_button_create(instance,
|
|
instance->dialog_button_panel);
|
|
|
|
/*
|
|
* Add widget-reference resources.
|
|
*/
|
|
|
|
XtVaSetValues(instance->dialog_shellform,
|
|
XmNdefaultButton, instance->ok_button,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->layer,
|
|
XmNtopWidget, instance->ctrl_panel,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator10,
|
|
XmNtopWidget, instance->category_opmenu_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator2,
|
|
XmNtopWidget, instance->group21,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->checkbox,
|
|
XmNtopWidget, instance->separator2,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator4,
|
|
XmNtopWidget, instance->checkbox,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group28,
|
|
XmNtopWidget, instance->separator4,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->deleted_msg_cb,
|
|
XmNtopWidget, instance->destroy_del_msg_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->seconds_lbl,
|
|
XmNleftWidget, instance->mail_check_sb_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->beeps_lbl,
|
|
XmNleftWidget, instance->signal_sb_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->flashes_lbl,
|
|
XmNleftWidget, instance->spinbox2_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->headers_lbl,
|
|
XmNleftWidget, instance->display_sb_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator6,
|
|
XmNtopWidget, instance->group8,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->abr_header_lbl,
|
|
XmNtopWidget, instance->separator6,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group17,
|
|
XmNtopWidget, instance->abr_header_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->rows_lbl,
|
|
XmNleftWidget, instance->display_row_sb_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->char_wide_lbl,
|
|
XmNleftWidget, instance->characters_wide_sb_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group3,
|
|
XmNleftWidget, instance->hidden_fields_list_scrolledwin,
|
|
XmNtopWidget, instance->hidden_fields_list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->hidden_fields_list_scrolledwin,
|
|
XmNrightWidget, instance->fields_hide,
|
|
XmNtopWidget, instance->fields_hide,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->hidden_fields_lbl,
|
|
XmNtopWidget, instance->hidden_fields_list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->h_field_delete,
|
|
XmNtopWidget, instance->h_field_add,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->h_field_change,
|
|
XmNtopWidget, instance->h_field_delete,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator7,
|
|
XmNtopWidget, instance->group6,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->deadletter_field_rowcolumn,
|
|
XmNtopWidget, instance->separator7,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator9,
|
|
XmNtopWidget, instance->deadletter_field_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->format_menu_lbl,
|
|
XmNtopWidget, instance->separator9,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->confirm_attachment,
|
|
XmNtopWidget, instance->wrap_checkbox,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator3,
|
|
XmNtopWidget, instance->confirm_attachment,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group6,
|
|
XmNtopWidget, instance->separator3,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group4,
|
|
XmNtopWidget, instance->format_menu_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->indent_str_tf,
|
|
XmNleftWidget, instance->group23,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group7,
|
|
XmNleftWidget, instance->list_scrolledwin,
|
|
XmNtopWidget, instance->list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->list_scrolledwin,
|
|
XmNrightWidget, instance->def_value_field,
|
|
XmNtopWidget, instance->def_value_field,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->menu_labels_lbl,
|
|
XmNtopWidget, instance->list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->def_value_field,
|
|
XmNtopWidget, instance->hdr_field,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->hdr_field_lbl,
|
|
XmNbottomWidget, instance->hdr_field,
|
|
XmNtopWidget, instance->hdr_field,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->def_value_lbl,
|
|
XmNbottomWidget, instance->def_value_field,
|
|
XmNtopWidget, instance->def_value_field,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->del_button,
|
|
XmNtopWidget, instance->add_button,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->change_button,
|
|
XmNtopWidget, instance->del_button,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator8,
|
|
XmNtopWidget, instance->group25,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator5,
|
|
XmNtopWidget, instance->group9,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group25,
|
|
XmNtopWidget, instance->separator5,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->mailb_for_sent_lbl,
|
|
XmNtopWidget, instance->separator8,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group26,
|
|
XmNtopWidget, instance->mailb_for_sent_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group24,
|
|
XmNleftWidget, instance->mv_menu_lst_scrolledwin,
|
|
XmNtopWidget, instance->mv_menu_lst_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->mv_menu_lst_scrolledwin,
|
|
XmNrightWidget, instance->path_file_name_tf,
|
|
XmNtopWidget, instance->path_file_name_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->srt_looking_tf,
|
|
XmNtopWidget, instance->mv_menu_lst_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->move_menu_lbl,
|
|
XmNtopWidget, instance->mv_menu_lst_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->move_menu_lbl2,
|
|
XmNtopWidget, instance->move_menu_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->path_file_lbl,
|
|
XmNbottomWidget, instance->path_file_name_tf,
|
|
XmNtopWidget, instance->path_file_name_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->start_look_lbl,
|
|
XmNbottomWidget, instance->srt_looking_tf,
|
|
XmNtopWidget, instance->srt_looking_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->mm_delete_butt,
|
|
XmNtopWidget, instance->mm_add_butt,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->mm_change_butt,
|
|
XmNtopWidget, instance->mm_delete_butt,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group10,
|
|
XmNtopWidget, instance->vacation_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->vacation_msg_tp_scrolledwin,
|
|
XmNtopWidget, instance->subject_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->subject_tf,
|
|
XmNtopWidget, instance->vacation_rb,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->msg_list_lbl,
|
|
XmNtopWidget, instance->vacation_msg_tp_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->subject_lbl,
|
|
XmNbottomWidget, instance->subject_tf,
|
|
XmNtopWidget, instance->subject_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->vacation_rb_lbl,
|
|
XmNbottomWidget, instance->vacation_rb,
|
|
XmNtopWidget, instance->vacation_rb,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group11,
|
|
XmNleftWidget, instance->templates_list_scrolledwin,
|
|
XmNtopWidget, instance->templates_list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->path_filename_label,
|
|
XmNtopWidget, instance->menu_label,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->templates_list_scrolledwin,
|
|
XmNrightWidget, instance->path_filename_label,
|
|
XmNtopWidget, instance->path_filename_label,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->templates_list_lbl,
|
|
XmNtopWidget, instance->templates_list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->menu_label_lbl,
|
|
XmNbottomWidget, instance->menu_label,
|
|
XmNtopWidget, instance->menu_label,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->path_filename_label_lbl,
|
|
XmNbottomWidget, instance->path_filename_label,
|
|
XmNtopWidget, instance->path_filename_label,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->tem_del_but,
|
|
XmNtopWidget, instance->tem_add_but,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->tem_change_but,
|
|
XmNtopWidget, instance->tem_del_but,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group15,
|
|
XmNleftWidget, instance->alias_list_scrolledwin,
|
|
XmNtopWidget, instance->alias_list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->addresses_tf,
|
|
XmNtopWidget, instance->alias_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->alias_list_scrolledwin,
|
|
XmNrightWidget, instance->addresses_tf,
|
|
XmNtopWidget, instance->addresses_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->alias_list_lbl,
|
|
XmNtopWidget, instance->alias_list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->alias_tf_lbl,
|
|
XmNbottomWidget, instance->alias_tf,
|
|
XmNtopWidget, instance->alias_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->address_tf_lbl,
|
|
XmNbottomWidget, instance->addresses_tf,
|
|
XmNtopWidget, instance->addresses_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->alias_delete_but,
|
|
XmNtopWidget, instance->alias_add_but,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->al_change_but,
|
|
XmNtopWidget, instance->alias_delete_but,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->update_mbox_scale,
|
|
XmNtopWidget, instance->update_mailb_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->frequently_lbl,
|
|
XmNleftWidget, instance->update_mbox_scale,
|
|
XmNtopWidget, instance->update_mbox_scale,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->seldom_lbl,
|
|
XmNrightWidget, instance->update_mbox_scale,
|
|
XmNtopWidget, instance->update_mbox_scale,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->separator11,
|
|
XmNtopWidget, instance->seldom_lbl,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->adv_def_cb_rowcolumn,
|
|
XmNtopWidget, instance->separator11,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group12,
|
|
XmNtopWidget, instance->adv_def_cb_rowcolumn,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->group16,
|
|
XmNleftWidget, instance->local_name_list_scrolledwin,
|
|
XmNtopWidget, instance->local_name_list_scrolledwin,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->local_name_list_scrolledwin,
|
|
XmNrightWidget, instance->local_name_tf,
|
|
XmNtopWidget, instance->local_name_tf,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->local_name_del_but,
|
|
XmNtopWidget, instance->local_name_add_but,
|
|
NULL);
|
|
|
|
XtVaSetValues(instance->local_name_chg_but,
|
|
XmNtopWidget, instance->local_name_del_but,
|
|
NULL);
|
|
|
|
/*
|
|
* Call utility functions to do group layout
|
|
*/
|
|
|
|
dtb_children_align(instance->group21,
|
|
DTB_GROUP_COLUMNS,
|
|
DTB_ALIGN_NONE,
|
|
DTB_ALIGN_LABELS,
|
|
0, 1, 0, 0, 4);
|
|
|
|
dtb_children_align(instance->group8,
|
|
DTB_GROUP_COLUMNS,
|
|
DTB_ALIGN_NONE,
|
|
DTB_ALIGN_LABELS,
|
|
0, 1, 0, 0, 2);
|
|
|
|
dtb_children_align(instance->group23,
|
|
DTB_GROUP_COLUMNS,
|
|
DTB_ALIGN_NONE,
|
|
DTB_ALIGN_RIGHT,
|
|
0, 1, 0, 0, 0);
|
|
dtb_children_align(instance->group25,
|
|
DTB_GROUP_ROWS,
|
|
DTB_ALIGN_HCENTER,
|
|
DTB_ALIGN_NONE,
|
|
0, 1, 0, 4, 0);
|
|
|
|
XtVaSetValues(instance->visit_mailb_lbl, XmNtopOffset, 6, NULL);
|
|
|
|
dtb_children_align(instance->group26,
|
|
DTB_GROUP_COLUMNS,
|
|
DTB_ALIGN_NONE,
|
|
DTB_ALIGN_LEFT,
|
|
0, 1, 0, 0, 6);
|
|
|
|
XtManageChild(instance->category_opmenu_label);
|
|
XtManageChild(instance->category_opmenu);
|
|
XtManageChild(instance->category_opmenu_rowcolumn);
|
|
XtManageChild(instance->separator10);
|
|
XtManageChild(instance->ctrl_panel);
|
|
XtManageChild(instance->separator2);
|
|
XtManageChild(instance->checkbox);
|
|
XtManageChild(instance->separator4);
|
|
XtManageChild(instance->destroy_del_msg_lbl);
|
|
XtManageChild(instance->deleted_msg_cb);
|
|
XtManageChild(instance->group28);
|
|
XtManageChild(instance->mail_check_sb_label);
|
|
XtManageChild(instance->mail_check_sb);
|
|
XtManageChild(instance->mail_check_sb_rowcolumn);
|
|
XtManageChild(instance->seconds_lbl);
|
|
XtManageChild(instance->group);
|
|
XtManageChild(instance->signal_sb_label);
|
|
XtManageChild(instance->signal_sb);
|
|
XtManageChild(instance->signal_sb_rowcolumn);
|
|
XtManageChild(instance->beeps_lbl);
|
|
XtManageChild(instance->group18);
|
|
XtManageChild(instance->spinbox2_label);
|
|
XtManageChild(instance->spinbox2);
|
|
XtManageChild(instance->spinbox2_rowcolumn);
|
|
XtManageChild(instance->flashes_lbl);
|
|
XtManageChild(instance->group19);
|
|
XtManageChild(instance->display_sb_label);
|
|
XtManageChild(instance->display_sb);
|
|
XtManageChild(instance->display_sb_rowcolumn);
|
|
XtManageChild(instance->headers_lbl);
|
|
XtManageChild(instance->group20);
|
|
XtManageChild(instance->group21);
|
|
XtManageChild(instance->msg_header_pane);
|
|
XtManageChild(instance->separator6);
|
|
XtManageChild(instance->abr_header_lbl);
|
|
XtManageChild(instance->display_row_sb_label);
|
|
XtManageChild(instance->display_row_sb);
|
|
XtManageChild(instance->display_row_sb_rowcolumn);
|
|
XtManageChild(instance->rows_lbl);
|
|
XtManageChild(instance->group2);
|
|
XtManageChild(instance->characters_wide_sb_label);
|
|
XtManageChild(instance->characters_wide_sb);
|
|
XtManageChild(instance->characters_wide_sb_rowcolumn);
|
|
XtManageChild(instance->char_wide_lbl);
|
|
XtManageChild(instance->group22);
|
|
XtManageChild(instance->fixed_font_cb);
|
|
XtManageChild(instance->group8);
|
|
XtManageChild(instance->h_field_add);
|
|
XtManageChild(instance->h_field_delete);
|
|
XtManageChild(instance->h_field_change);
|
|
XtManageChild(instance->group3);
|
|
XtManageChild(instance->fields_hide);
|
|
XtManageChild(instance->hidden_fields_list);
|
|
XtManageChild(instance->hidden_fields_list_scrolledwin);
|
|
XtManageChild(instance->hidden_fields_lbl);
|
|
XtManageChild(instance->header_fields_lbl);
|
|
XtManageChild(instance->group17);
|
|
XtManageChild(instance->wrap_checkbox);
|
|
XtManageChild(instance->confirm_attachment);
|
|
XtManageChild(instance->separator3);
|
|
XtManageChild(instance->separator7);
|
|
XtManageChild(instance->deadletter_field_label);
|
|
XtManageChild(instance->deadletter_field);
|
|
XtManageChild(instance->deadletter_field_rowcolumn);
|
|
XtManageChild(instance->separator9);
|
|
XtManageChild(instance->format_menu_lbl);
|
|
XtManageChild(instance->indent_str_tf);
|
|
XtManageChild(instance->indent_str_lbl);
|
|
XtManageChild(instance->reply_include_lbl);
|
|
XtManageChild(instance->group23);
|
|
XtManageChild(instance->group6);
|
|
XtManageChild(instance->add_button);
|
|
XtManageChild(instance->del_button);
|
|
XtManageChild(instance->change_button);
|
|
XtManageChild(instance->group7);
|
|
XtManageChild(instance->list);
|
|
XtManageChild(instance->list_scrolledwin);
|
|
XtManageChild(instance->menu_labels_lbl);
|
|
XtManageChild(instance->hdr_field);
|
|
XtManageChild(instance->def_value_field);
|
|
XtManageChild(instance->hdr_field_lbl);
|
|
XtManageChild(instance->def_value_lbl);
|
|
XtManageChild(instance->group4);
|
|
XtManageChild(instance->separator8);
|
|
XtManageChild(instance->separator5);
|
|
XtManageChild(instance->dpy_up_mbox_cb);
|
|
XtManageChild(instance->recent_sb);
|
|
XtManageChild(instance->visit_mailb_lbl);
|
|
XtManageChild(instance->group25);
|
|
XtManageChild(instance->mailb_for_sent_lbl);
|
|
XtManageChild(instance->sent_mail_tf);
|
|
XtManageChild(instance->log_cb);
|
|
XtManageChild(instance->group26);
|
|
XtManageChild(instance->mm_add_butt);
|
|
XtManageChild(instance->mm_delete_butt);
|
|
XtManageChild(instance->mm_change_butt);
|
|
XtManageChild(instance->group24);
|
|
XtManageChild(instance->path_file_name_tf);
|
|
XtManageChild(instance->mv_menu_lst);
|
|
XtManageChild(instance->mv_menu_lst_scrolledwin);
|
|
XtManageChild(instance->srt_looking_tf);
|
|
XtManageChild(instance->move_menu_lbl);
|
|
XtManageChild(instance->move_menu_lbl2);
|
|
XtManageChild(instance->path_file_lbl);
|
|
XtManageChild(instance->start_look_lbl);
|
|
XtManageChild(instance->group9);
|
|
XtManageChild(instance->vacation_lbl);
|
|
XtManageChild(instance->vacation_rb);
|
|
XtManageChild(instance->vacation_msg_tp);
|
|
XtManageChild(instance->vacation_msg_tp_scrolledwin);
|
|
XtManageChild(instance->subject_tf);
|
|
XtManageChild(instance->msg_list_lbl);
|
|
XtManageChild(instance->subject_lbl);
|
|
XtManageChild(instance->vacation_rb_lbl);
|
|
XtManageChild(instance->group10);
|
|
XtManageChild(instance->tem_add_but);
|
|
XtManageChild(instance->tem_del_but);
|
|
XtManageChild(instance->tem_change_but);
|
|
XtManageChild(instance->group11);
|
|
XtManageChild(instance->menu_label);
|
|
XtManageChild(instance->path_filename_label);
|
|
XtManageChild(instance->templates_list);
|
|
XtManageChild(instance->templates_list_scrolledwin);
|
|
XtManageChild(instance->templates_list_lbl);
|
|
XtManageChild(instance->menu_label_lbl);
|
|
XtManageChild(instance->path_filename_label_lbl);
|
|
XtManageChild(instance->group13);
|
|
XtManageChild(instance->alias_add_but);
|
|
XtManageChild(instance->alias_delete_but);
|
|
XtManageChild(instance->al_change_but);
|
|
XtManageChild(instance->group15);
|
|
XtManageChild(instance->alias_tf);
|
|
XtManageChild(instance->addresses_tf);
|
|
XtManageChild(instance->alias_list);
|
|
XtManageChild(instance->alias_list_scrolledwin);
|
|
XtManageChild(instance->alias_list_lbl);
|
|
XtManageChild(instance->alias_tf_lbl);
|
|
XtManageChild(instance->address_tf_lbl);
|
|
XtManageChild(instance->group14);
|
|
XtManageChild(instance->update_mbox_scale);
|
|
XtManageChild(instance->update_mailb_lbl);
|
|
XtManageChild(instance->frequently_lbl);
|
|
XtManageChild(instance->seldom_lbl);
|
|
XtManageChild(instance->separator11);
|
|
XtManageChild(instance->adv_def_cb_label);
|
|
XtManageChild(instance->adv_def_cb);
|
|
XtManageChild(instance->adv_def_cb_rowcolumn);
|
|
XtManageChild(instance->local_name_add_but);
|
|
XtManageChild(instance->local_name_del_but);
|
|
XtManageChild(instance->local_name_chg_but);
|
|
XtManageChild(instance->group16);
|
|
XtManageChild(instance->local_name_tf);
|
|
XtManageChild(instance->local_name_list);
|
|
XtManageChild(instance->local_name_list_scrolledwin);
|
|
XtManageChild(instance->group12);
|
|
XtManageChild(instance->layer);
|
|
XtManageChild(instance->dialog_form);
|
|
XtManageChild(instance->ok_button);
|
|
XtManageChild(instance->reset_button);
|
|
XtManageChild(instance->cancel_button);
|
|
XtManageChild(instance->separator);
|
|
XtManageChild(instance->apply_button);
|
|
XtManageChild(instance->help_button);
|
|
XtManageChild(instance->dialog_button_panel);
|
|
XtManageChild(instance->dialog_panedwin);
|
|
|
|
/*
|
|
* Add User and Connection callbacks
|
|
*/
|
|
XtAddCallback(instance->category_opmenu_items.Message_Header_List_item,
|
|
XmNactivateCallback, message_header_listCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Message_View_item,
|
|
XmNactivateCallback, message_viewCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Compose_Window_item,
|
|
XmNactivateCallback, compose_windowCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Message_Filing_item,
|
|
XmNactivateCallback, message_filingCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Vacation_item,
|
|
XmNactivateCallback, vacationCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Templates_item,
|
|
XmNactivateCallback, templatesCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Aliases_item,
|
|
XmNactivateCallback, aliasesCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Advanced_item,
|
|
XmNactivateCallback, advancedCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.Printing_item,
|
|
XmNactivateCallback, printingCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->category_opmenu_items.MailRetrieval_item,
|
|
XmNactivateCallback, mailretrievalCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->vacation_rb_items.On_item,
|
|
XmNvalueChangedCallback, vacationOnCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->vacation_rb_items.Off_item,
|
|
XmNvalueChangedCallback, vacationOffCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->alias_add_but,
|
|
XmNactivateCallback, alias_addCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->alias_delete_but,
|
|
XmNactivateCallback, alias_delCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->al_change_but,
|
|
XmNactivateCallback, alias_changeCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->ok_button,
|
|
XmNactivateCallback, opt_pane_okCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->reset_button,
|
|
XmNactivateCallback, opt_dlog_resetCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->cancel_button,
|
|
XmNactivateCallback, opt_dlog_cancelCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->apply_button,
|
|
XmNactivateCallback, options_applyCB,
|
|
(XtPointer)&(*instance));
|
|
XtAddCallback(instance->help_button,
|
|
XmNactivateCallback, opt_dlog_HelpCB,
|
|
(XtPointer)&(*instance));
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_dialog_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Display *display= (parent == NULL? NULL:XtDisplay(parent));
|
|
Arg args[8]; /* need 3 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->dialog == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNallowShellResize, True); ++n;
|
|
XtSetArg(args[n], XmNtitle, GETMSG(Dtb_project_catd, 2, 1, "Mailer - Mail Options")); ++n;
|
|
XtSetArg(args[n], XmNbackground, dtb_cvt_string_to_pixel(parent, "white")); ++n;
|
|
instance->dialog =
|
|
XmCreateDialogShell(parent,
|
|
"dtb_options_dialog", args, n);
|
|
}
|
|
if (instance->dialog == NULL)
|
|
return -1;
|
|
|
|
if (instance->dialog_shellform == NULL) {
|
|
instance->dialog_shellform =
|
|
XtVaCreateWidget("dtb_options_dialog_shellform",
|
|
xmFormWidgetClass,
|
|
instance->dialog,
|
|
XmNnoResize, True,
|
|
XmNdefaultPosition, False,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
XmNbackground, dtb_cvt_string_to_pixel(instance->dialog, "white"),
|
|
NULL);
|
|
}
|
|
if (instance->dialog_shellform == NULL)
|
|
return -1;
|
|
|
|
if (instance->dialog_panedwin == NULL) {
|
|
instance->dialog_panedwin =
|
|
XtVaCreateWidget("dtb_options_dialog_panedwin",
|
|
xmPanedWindowWidgetClass,
|
|
instance->dialog_shellform,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNsashWidth, 1,
|
|
XmNsashHeight, 1,
|
|
XmNspacing, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
XmNbackground, dtb_cvt_string_to_pixel(instance->dialog_shellform, "white"),
|
|
NULL);
|
|
}
|
|
if (instance->dialog_panedwin == NULL)
|
|
return -1;
|
|
|
|
if (instance->dialog_form == NULL) {
|
|
instance->dialog_form =
|
|
XtVaCreateWidget("dtb_options_dialog_form",
|
|
xmFormWidgetClass,
|
|
instance->dialog_panedwin,
|
|
XmNallowResize, True,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNbackground, dtb_cvt_string_to_pixel(instance->dialog_panedwin, "white"),
|
|
NULL);
|
|
}
|
|
if (instance->dialog_form == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_dialog_button_panel_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->dialog_button_panel == NULL) {
|
|
instance->dialog_button_panel =
|
|
XtVaCreateWidget("dtb_options_dialog_button_panel",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNresizePolicy, XmRESIZE_GROW,
|
|
XmNmarginHeight, 7,
|
|
XmNmarginWidth, 7,
|
|
XmNpositionIndex, 1,
|
|
NULL);
|
|
}
|
|
if (instance->dialog_button_panel == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_ctrl_panel_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->ctrl_panel == NULL) {
|
|
instance->ctrl_panel =
|
|
XtVaCreateWidget("dtb_options_ctrl_panel",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->ctrl_panel == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_layer_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->layer == NULL) {
|
|
instance->layer =
|
|
XtVaCreateWidget("dtb_options_layer",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
NULL);
|
|
}
|
|
if (instance->layer == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_category_opmenu_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[22]; /* need 17 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget category_opmenu_menu_items[8];
|
|
|
|
if (instance->category_opmenu_rowcolumn == NULL) {
|
|
instance->category_opmenu_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_category_opmenu",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 50,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 4,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNspacing, 0,
|
|
XmNpacking, XmPACK_TIGHT,
|
|
XmNisHomogeneous, False,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->category_opmenu_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_menu == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNrowColumnType, XmMENU_PULLDOWN); ++n;
|
|
instance->category_opmenu_menu =
|
|
XmCreatePulldownMenu(instance->category_opmenu_rowcolumn,
|
|
"dtb_options_category_opmenu_menu", args, n);
|
|
}
|
|
if (instance->category_opmenu_menu == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 2, "Category:"));
|
|
instance->category_opmenu_label =
|
|
XtVaCreateWidget("dtb_options_category_opmenu_label",
|
|
xmLabelWidgetClass,
|
|
instance->category_opmenu_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNrowColumnType, XmMENU_OPTION); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNsubMenuId, instance->category_opmenu_menu); ++n;
|
|
instance->category_opmenu =
|
|
XmCreateOptionMenu(instance->category_opmenu_rowcolumn,
|
|
"dtb_options_category_opmenu_choice", args, n);
|
|
}
|
|
if (instance->category_opmenu == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Message_Header_List_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 3, "Message Header List"));
|
|
instance->category_opmenu_items.Message_Header_List_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_message_header_list_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Message_Header_List_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Message_View_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 4, "Message View"));
|
|
instance->category_opmenu_items.Message_View_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_message_view_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Message_View_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Compose_Window_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 5, "Compose Window"));
|
|
instance->category_opmenu_items.Compose_Window_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_compose_window_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Compose_Window_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Message_Filing_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 6, "Message Filing"));
|
|
instance->category_opmenu_items.Message_Filing_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_message_filing_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Message_Filing_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Vacation_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 7, "Vacation"));
|
|
instance->category_opmenu_items.Vacation_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_vacation_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Vacation_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Templates_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 8, "Templates"));
|
|
instance->category_opmenu_items.Templates_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_templates_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Templates_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Aliases_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 9, "Aliases"));
|
|
instance->category_opmenu_items.Aliases_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_aliases_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Aliases_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Advanced_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 10, "Advanced"));
|
|
instance->category_opmenu_items.Advanced_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_advanced_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Advanced_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.Printing_item == NULL) {
|
|
label_xmstring =
|
|
XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 92, "Printing"));
|
|
instance->category_opmenu_items.Printing_item =
|
|
XtVaCreateManagedWidget("dtb_options_category_opmenu_printing_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.Printing_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->category_opmenu_items.MailRetrieval_item == NULL) {
|
|
label_xmstring =
|
|
XmStringCreateLocalized(
|
|
GETMSG(Dtb_project_catd, 2, 93, "Mail Retrieval"));
|
|
instance->category_opmenu_items.MailRetrieval_item =
|
|
XtVaCreateManagedWidget(
|
|
"dtb_options_category_opmenu_mailretrieval_item",
|
|
xmPushButtonWidgetClass,
|
|
instance->category_opmenu_menu,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->category_opmenu_items.MailRetrieval_item == NULL)
|
|
return -1;
|
|
|
|
dtb_center(instance->category_opmenu_rowcolumn, DTB_CENTER_POSITION_VERT);
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator10_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator10 == NULL) {
|
|
instance->separator10 =
|
|
XtVaCreateWidget("dtb_options_separator10",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 2,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator10 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_msg_header_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->msg_header_pane == NULL) {
|
|
instance->msg_header_pane =
|
|
XtVaCreateWidget("dtb_options_msg_header_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->msg_header_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_msg_view_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->msg_view_pane == NULL) {
|
|
instance->msg_view_pane =
|
|
XtVaCreateWidget("dtb_options_msg_view_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->msg_view_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_compose_win_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->compose_win_pane == NULL) {
|
|
instance->compose_win_pane =
|
|
XtVaCreateWidget("dtb_options_compose_win_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->compose_win_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_msg_filing_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->msg_filing_pane == NULL) {
|
|
instance->msg_filing_pane =
|
|
XtVaCreateWidget("dtb_options_msg_filing_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->msg_filing_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_vacation_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->vacation_pane == NULL) {
|
|
instance->vacation_pane =
|
|
XtVaCreateWidget("dtb_options_vacation_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->vacation_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_templates_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->templates_pane == NULL) {
|
|
instance->templates_pane =
|
|
XtVaCreateWidget("dtb_options_templates_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->templates_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_aliases_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->aliases_pane == NULL) {
|
|
instance->aliases_pane =
|
|
XtVaCreateWidget("dtb_options_aliases_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->aliases_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_advanced_pane_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->advanced_pane == NULL) {
|
|
instance->advanced_pane =
|
|
XtVaCreateWidget("dtb_options_advanced_pane",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomPosition, 100,
|
|
XmNbottomAttachment, XmATTACH_POSITION,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 0,
|
|
XmNtopPosition, 0,
|
|
XmNtopAttachment, XmATTACH_POSITION,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->advanced_pane == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator2 == NULL) {
|
|
instance->separator2 =
|
|
XtVaCreateWidget("dtb_options_separator2",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator2 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_checkbox_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[23]; /* need 18 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget checkbox_items[2];
|
|
|
|
if (instance->checkbox == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 76); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNentryVerticalAlignment, XmALIGNMENT_BASELINE_BOTTOM); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->checkbox =
|
|
XmCreateRadioBox(parent,
|
|
"dtb_options_checkbox", args, n);
|
|
}
|
|
if (instance->checkbox == NULL)
|
|
return -1;
|
|
|
|
if (instance->checkbox_items.Show_To_recipient_when_mail_is_from_me_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 11, "Show To: recipient when mail is from me"));
|
|
instance->checkbox_items.Show_To_recipient_when_mail_is_from_me_item =
|
|
XtVaCreateManagedWidget("dtb_options_checkbox_show_to_recipient_when_mail_is_from_me_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->checkbox,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->checkbox_items.Show_To_recipient_when_mail_is_from_me_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->checkbox_items.Display_message_numbers_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 12, "Display message numbers"));
|
|
instance->checkbox_items.Display_message_numbers_item =
|
|
XtVaCreateManagedWidget("dtb_options_checkbox_display_message_numbers_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->checkbox,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->checkbox_items.Display_message_numbers_item == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator4_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator4 == NULL) {
|
|
instance->separator4 =
|
|
XtVaCreateWidget("dtb_options_separator4",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator4 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group28_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group28 == NULL) {
|
|
instance->group28 =
|
|
XtVaCreateWidget("dtb_options_group28",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 76,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group28 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group21_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group21 == NULL) {
|
|
instance->group21 =
|
|
XtVaCreateWidget("dtb_options_group21",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 78,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group21 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_destroy_del_msg_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->destroy_del_msg_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 20, "Destroy Deleted Messages:"));
|
|
instance->destroy_del_msg_lbl =
|
|
XtVaCreateWidget("dtb_options_destroy_del_msg_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->destroy_del_msg_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_deleted_msg_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[23]; /* need 18 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget deleted_msg_cb_items[2];
|
|
|
|
if (instance->deleted_msg_cb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 2); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNentryVerticalAlignment, XmALIGNMENT_BASELINE_BOTTOM); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->deleted_msg_cb =
|
|
XmCreateRadioBox(parent,
|
|
"dtb_options_deleted_msg_cb", args, n);
|
|
}
|
|
if (instance->deleted_msg_cb == NULL)
|
|
return -1;
|
|
|
|
if (instance->deleted_msg_cb_items.When_I_close_the_mailbox_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 21, "When I close the mailbox"));
|
|
instance->deleted_msg_cb_items.When_I_close_the_mailbox_item =
|
|
XtVaCreateManagedWidget("dtb_options_deleted_msg_cb_when_i_close_the_mailbox_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->deleted_msg_cb,
|
|
XmNset, True,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->deleted_msg_cb_items.When_I_close_the_mailbox_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->deleted_msg_cb_items.Show_confirmation_notice_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 22, "Show confirmation notice"));
|
|
instance->deleted_msg_cb_items.Show_confirmation_notice_item =
|
|
XtVaCreateManagedWidget("dtb_options_deleted_msg_cb_show_confirmation_notice_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->deleted_msg_cb,
|
|
XmNset, True,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->deleted_msg_cb_items.Show_confirmation_notice_item == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group == NULL) {
|
|
instance->group =
|
|
XtVaCreateWidget("dtb_options_group",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group18_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group18 == NULL) {
|
|
instance->group18 =
|
|
XtVaCreateWidget("dtb_options_group18",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group18 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group19_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group19 == NULL) {
|
|
instance->group19 =
|
|
XtVaCreateWidget("dtb_options_group19",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group19 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group20_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group20 == NULL) {
|
|
instance->group20 =
|
|
XtVaCreateWidget("dtb_options_group20",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group20 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_mail_check_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->mail_check_sb_rowcolumn == NULL) {
|
|
instance->mail_check_sb_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_mail_check_sb",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->mail_check_sb_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->mail_check_sb_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 13, "Check for new mail every:"));
|
|
instance->mail_check_sb_label =
|
|
XtVaCreateWidget("dtb_options_mail_check_sb_label",
|
|
xmLabelWidgetClass,
|
|
instance->mail_check_sb_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->mail_check_sb_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->mail_check_sb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 500); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 999999); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 6); ++n;
|
|
instance->mail_check_sb =
|
|
XmCreateSimpleSpinBox(instance->mail_check_sb_rowcolumn,
|
|
"dtb_options_mail_check_sb_field", args, n);
|
|
}
|
|
if (instance->mail_check_sb == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_seconds_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->seconds_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 14, "Seconds"));
|
|
instance->seconds_lbl =
|
|
XtVaCreateWidget("dtb_options_seconds_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 2,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->seconds_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_signal_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->signal_sb_rowcolumn == NULL) {
|
|
instance->signal_sb_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_signal_sb",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->signal_sb_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->signal_sb_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 15, "Signal new mail with:"));
|
|
instance->signal_sb_label =
|
|
XtVaCreateWidget("dtb_options_signal_sb_label",
|
|
xmLabelWidgetClass,
|
|
instance->signal_sb_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->signal_sb_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->signal_sb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 0); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 100); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 6); ++n;
|
|
instance->signal_sb =
|
|
XmCreateSimpleSpinBox(instance->signal_sb_rowcolumn,
|
|
"dtb_options_signal_sb_field", args, n);
|
|
}
|
|
if (instance->signal_sb == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_beeps_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->beeps_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 16, "Beep(s)"));
|
|
instance->beeps_lbl =
|
|
XtVaCreateWidget("dtb_options_beeps_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 2,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->beeps_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_spinbox2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->spinbox2_rowcolumn == NULL) {
|
|
instance->spinbox2_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_spinbox2",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->spinbox2_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->spinbox2_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 91, " "));
|
|
instance->spinbox2_label =
|
|
XtVaCreateWidget("dtb_options_spinbox2_label",
|
|
xmLabelWidgetClass,
|
|
instance->spinbox2_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->spinbox2_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->spinbox2 == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 0); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 100); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 6); ++n;
|
|
instance->spinbox2 =
|
|
XmCreateSimpleSpinBox(instance->spinbox2_rowcolumn,
|
|
"dtb_options_spinbox2_field", args, n);
|
|
}
|
|
if (instance->spinbox2 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_flashes_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->flashes_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 17, "Flash(es)"));
|
|
instance->flashes_lbl =
|
|
XtVaCreateWidget("dtb_options_flashes_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 2,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->flashes_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_display_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->display_sb_rowcolumn == NULL) {
|
|
instance->display_sb_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_display_sb",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->display_sb_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->display_sb_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 18, "Display"));
|
|
instance->display_sb_label =
|
|
XtVaCreateWidget("dtb_options_display_sb_label",
|
|
xmLabelWidgetClass,
|
|
instance->display_sb_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->display_sb_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->display_sb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 15); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 100); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 6); ++n;
|
|
instance->display_sb =
|
|
XmCreateSimpleSpinBox(instance->display_sb_rowcolumn,
|
|
"dtb_options_display_sb_field", args, n);
|
|
}
|
|
if (instance->display_sb == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_headers_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->headers_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 19, "Headers"));
|
|
instance->headers_lbl =
|
|
XtVaCreateWidget("dtb_options_headers_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 2,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->headers_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator6_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator6 == NULL) {
|
|
instance->separator6 =
|
|
XtVaCreateWidget("dtb_options_separator6",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 100,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 0,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator6 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_abr_header_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->abr_header_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 23, "Abbreviated header will not include:"));
|
|
instance->abr_header_lbl =
|
|
XtVaCreateWidget("dtb_options_abr_header_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 24,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->abr_header_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group8_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group8 == NULL) {
|
|
instance->group8 =
|
|
XtVaCreateWidget("dtb_options_group8",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 133,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group8 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group17_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group17 == NULL) {
|
|
instance->group17 =
|
|
XtVaCreateWidget("dtb_options_group17",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 35,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group17 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group2 == NULL) {
|
|
instance->group2 =
|
|
XtVaCreateWidget("dtb_options_group2",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group2 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group22_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group22 == NULL) {
|
|
instance->group22 =
|
|
XtVaCreateWidget("dtb_options_group22",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group22 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_fixed_font_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[14]; /* need 9 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->fixed_font_cb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNentryVerticalAlignment, XmALIGNMENT_BASELINE_BOTTOM); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->fixed_font_cb =
|
|
XmCreateRadioBox(parent,
|
|
"dtb_options_fixed_font_cb", args, n);
|
|
}
|
|
if (instance->fixed_font_cb == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_display_row_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->display_row_sb_rowcolumn == NULL) {
|
|
instance->display_row_sb_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_display_row_sb",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->display_row_sb_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->display_row_sb_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 18, "Display"));
|
|
instance->display_row_sb_label =
|
|
XtVaCreateWidget("dtb_options_display_row_sb_label",
|
|
xmLabelWidgetClass,
|
|
instance->display_row_sb_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->display_row_sb_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->display_row_sb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 24); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 360); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 6); ++n;
|
|
instance->display_row_sb =
|
|
XmCreateSimpleSpinBox(instance->display_row_sb_rowcolumn,
|
|
"dtb_options_display_row_sb_field", args, n);
|
|
}
|
|
if (instance->display_row_sb == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_rows_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->rows_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 33, "Rows"));
|
|
instance->rows_lbl =
|
|
XtVaCreateWidget("dtb_options_rows_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->rows_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_characters_wide_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->characters_wide_sb_rowcolumn == NULL) {
|
|
instance->characters_wide_sb_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_characters_wide_sb",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->characters_wide_sb_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->characters_wide_sb_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 91, " "));
|
|
instance->characters_wide_sb_label =
|
|
XtVaCreateWidget("dtb_options_characters_wide_sb_label",
|
|
xmLabelWidgetClass,
|
|
instance->characters_wide_sb_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->characters_wide_sb_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->characters_wide_sb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 80); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 132); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 6); ++n;
|
|
instance->characters_wide_sb =
|
|
XmCreateSimpleSpinBox(instance->characters_wide_sb_rowcolumn,
|
|
"dtb_options_characters_wide_sb_field", args, n);
|
|
}
|
|
if (instance->characters_wide_sb == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_char_wide_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->char_wide_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 34, "Characters Wide"));
|
|
instance->char_wide_lbl =
|
|
XtVaCreateWidget("dtb_options_char_wide_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->char_wide_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group3_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group3 == NULL) {
|
|
instance->group3 =
|
|
XtVaCreateWidget("dtb_options_group3",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 10,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group3 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_fields_hide_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->fields_hide == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 34); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->fields_hide =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_fields_hide", args, n);
|
|
}
|
|
if (instance->fields_hide == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_hidden_fields_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[21]; /* need 16 args (add 5 to be safe) */
|
|
int n = 0;
|
|
int i = 0;
|
|
XmString hidden_fields_list_list_xmstrings[3];
|
|
|
|
|
|
/*
|
|
* Convert char* strings to XmStrings
|
|
*/
|
|
hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 25, "x-lines"));
|
|
hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 26, "email-version"));
|
|
hidden_fields_list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 27, "expires"));
|
|
if (instance->hidden_fields_list == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n;
|
|
XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT); ++n;
|
|
XtSetArg(args[n], XmNselectionPolicy, XmSINGLE_SELECT); ++n;
|
|
XtSetArg(args[n], XmNvisibleItemCount, 7); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 34); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNitems, (XtArgVal)hidden_fields_list_list_xmstrings); n++;
|
|
XtSetArg(args[n], XmNitemCount, (XtArgVal)3); n++;
|
|
instance->hidden_fields_list =
|
|
XmCreateScrolledList(parent,
|
|
"dtb_options_hidden_fields_list_list", args, n);
|
|
}
|
|
instance->hidden_fields_list_scrolledwin = XtParent(instance->hidden_fields_list);
|
|
if (instance->hidden_fields_list == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_hidden_fields_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->hidden_fields_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 28, "Hidden Fields:"));
|
|
instance->hidden_fields_lbl =
|
|
XtVaCreateWidget("dtb_options_hidden_fields_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 34,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_END,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->hidden_fields_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_header_fields_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->header_fields_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 24, "Header Field:"));
|
|
instance->header_fields_lbl =
|
|
XtVaCreateWidget("dtb_options_header_fields_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 34,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 4,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->header_fields_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_h_field_add_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->h_field_add == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add"));
|
|
instance->h_field_add =
|
|
XtVaCreateWidget("dtb_options_h_field_add",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->h_field_add == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_h_field_delete_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->h_field_delete == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete"));
|
|
instance->h_field_delete =
|
|
XtVaCreateWidget("dtb_options_h_field_delete",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->h_field_delete == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_h_field_change_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->h_field_change == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change"));
|
|
instance->h_field_change =
|
|
XtVaCreateWidget("dtb_options_h_field_change",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->h_field_change == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_wrap_checkbox_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[22]; /* need 17 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget wrap_checkbox_items[1];
|
|
|
|
if (instance->wrap_checkbox == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 26); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 9); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNentryVerticalAlignment, XmALIGNMENT_BASELINE_BOTTOM); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->wrap_checkbox =
|
|
XmCreateRadioBox(parent,
|
|
"dtb_options_wrap_checkbox", args, n);
|
|
}
|
|
if (instance->wrap_checkbox == NULL)
|
|
return -1;
|
|
|
|
if (instance->wrap_checkbox_items.Show_Attachment_List_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 36, "Show Attachment List"));
|
|
instance->wrap_checkbox_items.Show_Attachment_List_item =
|
|
XtVaCreateManagedWidget("dtb_options_wrap_checkbox_show_attachment_list_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->wrap_checkbox,
|
|
XmNset, True,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->wrap_checkbox_items.Show_Attachment_List_item == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_confirm_attachment_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[32]; /* need 9 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->confirm_attachment == NULL)
|
|
{
|
|
instance->confirm_attachment =
|
|
XtVaCreateWidget("dtb_options_confirm_attachment",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftPosition, 26,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 4,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
|
|
if (instance->confirm_attachment == NULL) return -1;
|
|
}
|
|
parent = instance->confirm_attachment;
|
|
|
|
if (instance->cfrm_att_checkbox == NULL)
|
|
{
|
|
n = 0;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNentryVerticalAlignment,
|
|
XmALIGNMENT_BASELINE_BOTTOM); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->cfrm_att_checkbox =
|
|
XmCreateRadioBox(parent, "dtb_options_cfrm_att_checkbox", args, n);
|
|
|
|
if (instance->cfrm_att_checkbox == NULL) return -1;
|
|
|
|
XtVaSetValues(
|
|
instance->cfrm_att_checkbox,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNleftPosition, 50,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
NULL);
|
|
|
|
XtManageChild(instance->cfrm_att_checkbox);
|
|
}
|
|
|
|
if (instance->cfrm_att_checkbox_items.Confirm_Attachment_item == NULL)
|
|
{
|
|
label_xmstring = XmStringCreateLocalized(
|
|
GETMSG(Dtb_project_catd, 2, 94, "Confirm attachments over:"));
|
|
|
|
instance->cfrm_att_checkbox_items.Confirm_Attachment_item =
|
|
XtVaCreateManagedWidget(
|
|
"dtb_options_cfrm_att_checkbox_Confirm_Attachment_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->cfrm_att_checkbox,
|
|
XmNset, True,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
|
|
if (instance->cfrm_att_checkbox_items.Confirm_Attachment_item == NULL)
|
|
return -1;
|
|
}
|
|
|
|
if (instance->cfrm_att_size_sb == NULL)
|
|
{
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 1024*1024); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 1024*1024); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 8); ++n;
|
|
instance->cfrm_att_size_sb =
|
|
XmCreateSimpleSpinBox(parent, "dtb_options_cfrm_att_size_sb", args,n);
|
|
|
|
if (instance->cfrm_att_size_sb == NULL) return -1;
|
|
|
|
XtVaSetValues(
|
|
instance->cfrm_att_size_sb,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNleftWidget, instance->cfrm_att_checkbox,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
NULL);
|
|
XtManageChild(instance->cfrm_att_size_sb);
|
|
}
|
|
|
|
if (instance->visit_mailb_lbl == NULL)
|
|
{
|
|
label_xmstring =
|
|
XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 95, "kilobytes"));
|
|
instance->cfrm_att_size_mb_lbl =
|
|
XtVaCreateManagedWidget("dtb_options_cfrm_att_size_mb_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNbottomOffset, 4,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 2,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNleftWidget, instance->cfrm_att_size_sb,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
|
|
if (instance->cfrm_att_size_mb_lbl == NULL) return -1;
|
|
|
|
XtVaSetValues(
|
|
instance->cfrm_att_size_mb_lbl,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNleftWidget, instance->cfrm_att_size_sb,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
NULL);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator3_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator3 == NULL) {
|
|
instance->separator3 =
|
|
XtVaCreateWidget("dtb_options_separator3",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 1,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 9,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator3 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator7_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator7 == NULL) {
|
|
instance->separator7 =
|
|
XtVaCreateWidget("dtb_options_separator7",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 1,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator7 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_deadletter_field_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[44]; /* need 39 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->deadletter_field_rowcolumn == NULL) {
|
|
instance->deadletter_field_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_deadletter_field",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 32,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->deadletter_field_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->deadletter_field_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 38, "Dead Letter Folder:"));
|
|
instance->deadletter_field_label =
|
|
XtVaCreateWidget("dtb_options_deadletter_field_label",
|
|
xmLabelWidgetClass,
|
|
instance->deadletter_field_rowcolumn,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->deadletter_field_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->deadletter_field == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->deadletter_field =
|
|
XmCreateTextField(instance->deadletter_field_rowcolumn,
|
|
"dtb_options_deadletter_field_field", args, n);
|
|
}
|
|
if (instance->deadletter_field == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator9_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator9 == NULL) {
|
|
instance->separator9 =
|
|
XtVaCreateWidget("dtb_options_separator9",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 2,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator9 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_format_menu_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->format_menu_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 39, "Format Menu Custom Fields"));
|
|
instance->format_menu_lbl =
|
|
XtVaCreateWidget("dtb_options_format_menu_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 8,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->format_menu_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group6_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group6 == NULL) {
|
|
instance->group6 =
|
|
XtVaCreateWidget("dtb_options_group6",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 32,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group6 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group4_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group4 == NULL) {
|
|
instance->group4 =
|
|
XtVaCreateWidget("dtb_options_group4",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 69,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group4 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_indent_str_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[19]; /* need 14 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->indent_str_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNvalue, GETMSG(Dtb_project_catd, 2, 37, ">")); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->indent_str_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_indent_str_tf", args, n);
|
|
}
|
|
if (instance->indent_str_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group23_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group23 == NULL) {
|
|
instance->group23 =
|
|
XtVaCreateWidget("dtb_options_group23",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 4,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 15,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, -2,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group23 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_indent_str_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->indent_str_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 52, "Indent string"));
|
|
instance->indent_str_lbl =
|
|
XtVaCreateWidget("dtb_options_indent_str_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->indent_str_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_reply_include_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->reply_include_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 53, "for Reply Include:"));
|
|
instance->reply_include_lbl =
|
|
XtVaCreateWidget("dtb_options_reply_include_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->reply_include_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group7_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group7 == NULL) {
|
|
instance->group7 =
|
|
XtVaCreateWidget("dtb_options_group7",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 10,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group7 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[21]; /* need 16 args (add 5 to be safe) */
|
|
int n = 0;
|
|
int i = 0;
|
|
XmString list_list_xmstrings[2];
|
|
|
|
|
|
/*
|
|
* Convert char* strings to XmStrings
|
|
*/
|
|
list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 40, "bcc"));
|
|
list_list_xmstrings[i++] = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 41, "return-receipt"));
|
|
if (instance->list == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n;
|
|
XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT); ++n;
|
|
XtSetArg(args[n], XmNselectionPolicy, XmBROWSE_SELECT); ++n;
|
|
XtSetArg(args[n], XmNvisibleItemCount, 5); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 24); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNitems, (XtArgVal)list_list_xmstrings); n++;
|
|
XtSetArg(args[n], XmNitemCount, (XtArgVal)2); n++;
|
|
instance->list =
|
|
XmCreateScrolledList(parent,
|
|
"dtb_options_list_list", args, n);
|
|
}
|
|
instance->list_scrolledwin = XtParent(instance->list);
|
|
if (instance->list == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_menu_labels_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->menu_labels_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 42, "Menu Labels:"));
|
|
instance->menu_labels_lbl =
|
|
XtVaCreateWidget("dtb_options_menu_labels_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 24,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->menu_labels_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_hdr_field_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->hdr_field == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 24); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->hdr_field =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_hdr_field", args, n);
|
|
}
|
|
if (instance->hdr_field == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_def_value_field_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->def_value_field == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 24); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->def_value_field =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_def_value_field", args, n);
|
|
}
|
|
if (instance->def_value_field == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_hdr_field_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->hdr_field_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 50, "Header Field:"));
|
|
instance->hdr_field_lbl =
|
|
XtVaCreateWidget("dtb_options_hdr_field_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 24,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->hdr_field_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_def_value_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->def_value_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 51, "Default Value:"));
|
|
instance->def_value_lbl =
|
|
XtVaCreateWidget("dtb_options_def_value_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 24,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->def_value_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_add_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->add_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add"));
|
|
instance->add_button =
|
|
XtVaCreateWidget("dtb_options_add_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->add_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_del_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->del_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete"));
|
|
instance->del_button =
|
|
XtVaCreateWidget("dtb_options_del_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->del_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_change_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->change_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change"));
|
|
instance->change_button =
|
|
XtVaCreateWidget("dtb_options_change_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->change_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator8_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator8 == NULL) {
|
|
instance->separator8 =
|
|
XtVaCreateWidget("dtb_options_separator8",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, -5,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 6,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator8 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator5_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator5 == NULL) {
|
|
instance->separator5 =
|
|
XtVaCreateWidget("dtb_options_separator5",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator5 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group25_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group25 == NULL) {
|
|
instance->group25 =
|
|
XtVaCreateWidget("dtb_options_group25",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 28,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 4,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group25 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_mailb_for_sent_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->mailb_for_sent_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 61, "Mailbox for sent messages:"));
|
|
instance->mailb_for_sent_lbl =
|
|
XtVaCreateWidget("dtb_options_mailb_for_sent_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 38,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->mailb_for_sent_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group26_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group26 == NULL) {
|
|
instance->group26 =
|
|
XtVaCreateWidget("dtb_options_group26",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 160,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 6,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group26 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group9_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group9 == NULL) {
|
|
instance->group9 =
|
|
XtVaCreateWidget("dtb_options_group9",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 12,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group9 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_dpy_up_mbox_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[14]; /* need 9 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget dpy_up_mbox_cb_items[1];
|
|
|
|
if (instance->dpy_up_mbox_cb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNentryVerticalAlignment, XmALIGNMENT_BASELINE_BOTTOM); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->dpy_up_mbox_cb =
|
|
XmCreateRadioBox(parent,
|
|
"dtb_options_dpy_up_mbox_cb", args, n);
|
|
}
|
|
if (instance->dpy_up_mbox_cb == NULL)
|
|
return -1;
|
|
|
|
if (instance->dpy_up_mbox_cb_items.Display_up_to_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 59, "Display up to:"));
|
|
instance->dpy_up_mbox_cb_items.Display_up_to_item =
|
|
XtVaCreateManagedWidget("dtb_options_dpy_up_mbox_cb_display_up_to_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->dpy_up_mbox_cb,
|
|
XmNset, True,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->dpy_up_mbox_cb_items.Display_up_to_item == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_recent_sb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[13]; /* need 8 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->recent_sb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNdecimalPoints, 0); ++n;
|
|
XtSetArg(args[n], XmNincrementValue, 1); ++n;
|
|
XtSetArg(args[n], XmNposition, 5); ++n;
|
|
XtSetArg(args[n], XmNmaximumValue, 100); ++n;
|
|
XtSetArg(args[n], XmNminimumValue, 0); ++n;
|
|
XtSetArg(args[n], XmNarrowLayout, XmARROWS_END); ++n;
|
|
XtSetArg(args[n], XmNspinBoxChildType, XmNUMERIC); ++n;
|
|
XtSetArg(args[n], XmNcolumns, 6); ++n;
|
|
instance->recent_sb =
|
|
XmCreateSimpleSpinBox(parent,
|
|
"dtb_options_recent_sb", args, n);
|
|
}
|
|
if (instance->recent_sb == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_visit_mailb_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->visit_mailb_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 60, "Recently visited mailboxes"));
|
|
instance->visit_mailb_lbl =
|
|
XtVaCreateWidget("dtb_options_visit_mailb_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNbottomOffset, 0,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 2,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->visit_mailb_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_sent_mail_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[9]; /* need 4 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->sent_mail_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->sent_mail_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_sent_mail_tf", args, n);
|
|
}
|
|
if (instance->sent_mail_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_log_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[14]; /* need 9 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget log_cb_items[1];
|
|
|
|
if (instance->log_cb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNentryVerticalAlignment, XmALIGNMENT_BASELINE_BOTTOM); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->log_cb =
|
|
XmCreateRadioBox(parent,
|
|
"dtb_options_log_cb", args, n);
|
|
}
|
|
if (instance->log_cb == NULL)
|
|
return -1;
|
|
|
|
if (instance->log_cb_items.Log_all_sent_messages_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 62, "Log all sent messages"));
|
|
instance->log_cb_items.Log_all_sent_messages_item =
|
|
XtVaCreateManagedWidget("dtb_options_log_cb_log_all_sent_messages_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->log_cb,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->log_cb_items.Log_all_sent_messages_item == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group24_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group24 == NULL) {
|
|
instance->group24 =
|
|
XtVaCreateWidget("dtb_options_group24",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 10,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group24 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_path_file_name_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->path_file_name_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 30); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->path_file_name_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_path_file_name_tf", args, n);
|
|
}
|
|
if (instance->path_file_name_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_mv_menu_lst_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[17]; /* need 12 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->mv_menu_lst == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n;
|
|
XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT); ++n;
|
|
XtSetArg(args[n], XmNselectionPolicy, XmBROWSE_SELECT); ++n;
|
|
XtSetArg(args[n], XmNvisibleItemCount, 8); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 30); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
instance->mv_menu_lst =
|
|
XmCreateScrolledList(parent,
|
|
"dtb_options_mv_menu_lst_list", args, n);
|
|
}
|
|
instance->mv_menu_lst_scrolledwin = XtParent(instance->mv_menu_lst);
|
|
if (instance->mv_menu_lst == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_srt_looking_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->srt_looking_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 30); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->srt_looking_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_srt_looking_tf", args, n);
|
|
}
|
|
if (instance->srt_looking_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_move_menu_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->move_menu_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 57, "Move Menu"));
|
|
instance->move_menu_lbl =
|
|
XtVaCreateWidget("dtb_options_move_menu_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 1,
|
|
XmNrightPosition, 30,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->move_menu_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_move_menu_lbl2_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->move_menu_lbl2 == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 58, "and Copy To Menu:"));
|
|
instance->move_menu_lbl2 =
|
|
XtVaCreateWidget("dtb_options_move_menu_lbl2",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 30,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 1,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->move_menu_lbl2 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_path_file_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->path_file_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 54, "Path / File Name:"));
|
|
instance->path_file_lbl =
|
|
XtVaCreateWidget("dtb_options_path_file_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 30,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->path_file_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_start_look_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->start_look_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 55, "Start looking in:"));
|
|
instance->start_look_lbl =
|
|
XtVaCreateWidget("dtb_options_start_look_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 30,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->start_look_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_mm_add_butt_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->mm_add_butt == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add"));
|
|
instance->mm_add_butt =
|
|
XtVaCreateWidget("dtb_options_mm_add_butt",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->mm_add_butt == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_mm_delete_butt_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->mm_delete_butt == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete"));
|
|
instance->mm_delete_butt =
|
|
XtVaCreateWidget("dtb_options_mm_delete_butt",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->mm_delete_butt == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_mm_change_butt_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->mm_change_butt == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change"));
|
|
instance->mm_change_butt =
|
|
XtVaCreateWidget("dtb_options_mm_change_butt",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->mm_change_butt == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_vacation_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->vacation_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 66, "Vacation Precedence = junk"));
|
|
instance->vacation_lbl =
|
|
XtVaCreateWidget("dtb_options_vacation_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 14,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->vacation_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group10_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group10 == NULL) {
|
|
instance->group10 =
|
|
XtVaCreateWidget("dtb_options_group10",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 41,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 6,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group10 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_vacation_rb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[22]; /* need 17 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget vacation_rb_items[2];
|
|
|
|
if (instance->vacation_rb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 20); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNradioBehavior, True); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmHORIZONTAL); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
instance->vacation_rb =
|
|
XmCreateRadioBox(parent,
|
|
"dtb_options_vacation_rb", args, n);
|
|
}
|
|
if (instance->vacation_rb == NULL)
|
|
return -1;
|
|
|
|
if (instance->vacation_rb_items.On_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 64, "On"));
|
|
instance->vacation_rb_items.On_item =
|
|
XtVaCreateManagedWidget("dtb_options_vacation_rb_on_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->vacation_rb,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->vacation_rb_items.On_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->vacation_rb_items.Off_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 65, "Off"));
|
|
instance->vacation_rb_items.Off_item =
|
|
XtVaCreateManagedWidget("dtb_options_vacation_rb_off_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->vacation_rb,
|
|
XmNset, True,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->vacation_rb_items.Off_item == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_vacation_msg_tp_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[33]; /* need 28 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->vacation_msg_tp == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 20); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n;
|
|
XtSetArg(args[n], XmNvisualPolicy, XmVARIABLE); ++n;
|
|
XtSetArg(args[n], XmNscrollingPolicy, XmAPPLICATION_DEFINED); ++n;
|
|
XtSetArg(args[n], XmNwordWrap, True); ++n;
|
|
XtSetArg(args[n], XmNeditMode, XmMULTI_LINE_EDIT); ++n;
|
|
XtSetArg(args[n], XmNscrollHorizontal, False); ++n;
|
|
XtSetArg(args[n], XmNscrollVertical, True); ++n;
|
|
XtSetArg(args[n], XmNrows, 20); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
instance->vacation_msg_tp =
|
|
XmCreateScrolledText(parent,
|
|
"dtb_options_vacation_msg_tp_pane", args, n);
|
|
}
|
|
instance->vacation_msg_tp_scrolledwin = XtParent(instance->vacation_msg_tp);
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_subject_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[19]; /* need 14 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->subject_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 20); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNvalue, GETMSG(Dtb_project_catd, 2, 68, "Out of the office")); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->subject_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_subject_tf", args, n);
|
|
}
|
|
if (instance->subject_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_msg_list_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->msg_list_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 69, "Message:"));
|
|
instance->msg_list_lbl =
|
|
XtVaCreateWidget("dtb_options_msg_list_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 20,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->msg_list_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_subject_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->subject_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 67, "Subject:"));
|
|
instance->subject_lbl =
|
|
XtVaCreateWidget("dtb_options_subject_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 20,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->subject_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_vacation_rb_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->vacation_rb_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 63, "Vacation:"));
|
|
instance->vacation_rb_lbl =
|
|
XtVaCreateWidget("dtb_options_vacation_rb_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 20,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->vacation_rb_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group13_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group13 == NULL) {
|
|
instance->group13 =
|
|
XtVaCreateWidget("dtb_options_group13",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightOffset, 10,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group13 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group11_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group11 == NULL) {
|
|
instance->group11 =
|
|
XtVaCreateWidget("dtb_options_group11",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 10,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group11 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_menu_label_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->menu_label == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 23); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 256); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->menu_label =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_menu_label", args, n);
|
|
}
|
|
if (instance->menu_label == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_path_filename_label_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->path_filename_label == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 23); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 256); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->path_filename_label =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_path_filename_label", args, n);
|
|
}
|
|
if (instance->path_filename_label == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_templates_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[17]; /* need 12 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->templates_list == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n;
|
|
XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT); ++n;
|
|
XtSetArg(args[n], XmNselectionPolicy, XmBROWSE_SELECT); ++n;
|
|
XtSetArg(args[n], XmNvisibleItemCount, 18); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 23); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
instance->templates_list =
|
|
XmCreateScrolledList(parent,
|
|
"dtb_options_templates_list_list", args, n);
|
|
}
|
|
instance->templates_list_scrolledwin = XtParent(instance->templates_list);
|
|
if (instance->templates_list == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_templates_list_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->templates_list_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 72, "Templates:"));
|
|
instance->templates_list_lbl =
|
|
XtVaCreateWidget("dtb_options_templates_list_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 23,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->templates_list_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_menu_label_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->menu_label_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 71, "Menu Label:"));
|
|
instance->menu_label_lbl =
|
|
XtVaCreateWidget("dtb_options_menu_label_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 23,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->menu_label_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_path_filename_label_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->path_filename_label_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 54, "Path / File Name:"));
|
|
instance->path_filename_label_lbl =
|
|
XtVaCreateWidget("dtb_options_path_filename_label_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 23,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->path_filename_label_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_tem_add_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->tem_add_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add"));
|
|
instance->tem_add_but =
|
|
XtVaCreateWidget("dtb_options_tem_add_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->tem_add_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_tem_del_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->tem_del_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete"));
|
|
instance->tem_del_but =
|
|
XtVaCreateWidget("dtb_options_tem_del_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->tem_del_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_tem_change_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->tem_change_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change"));
|
|
instance->tem_change_but =
|
|
XtVaCreateWidget("dtb_options_tem_change_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->tem_change_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group14_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group14 == NULL) {
|
|
instance->group14 =
|
|
XtVaCreateWidget("dtb_options_group14",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightOffset, 10,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 44,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group14 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group15_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group15 == NULL) {
|
|
instance->group15 =
|
|
XtVaCreateWidget("dtb_options_group15",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 10,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group15 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_alias_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->alias_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 15); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 256); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->alias_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_alias_tf", args, n);
|
|
}
|
|
if (instance->alias_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_addresses_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[18]; /* need 13 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->addresses_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 15); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 256); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->addresses_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_addresses_tf", args, n);
|
|
}
|
|
if (instance->addresses_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_alias_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[17]; /* need 12 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->alias_list == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n;
|
|
XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT); ++n;
|
|
XtSetArg(args[n], XmNselectionPolicy, XmBROWSE_SELECT); ++n;
|
|
XtSetArg(args[n], XmNvisibleItemCount, 19); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 4); ++n;
|
|
XtSetArg(args[n], XmNleftPosition, 15); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
instance->alias_list =
|
|
XmCreateScrolledList(parent,
|
|
"dtb_options_alias_list_list", args, n);
|
|
}
|
|
instance->alias_list_scrolledwin = XtParent(instance->alias_list);
|
|
if (instance->alias_list == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_alias_list_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->alias_list_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 75, "Aliases:"));
|
|
instance->alias_list_lbl =
|
|
XtVaCreateWidget("dtb_options_alias_list_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 15,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->alias_list_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_alias_tf_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->alias_tf_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 73, "Alias:"));
|
|
instance->alias_tf_lbl =
|
|
XtVaCreateWidget("dtb_options_alias_tf_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 15,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->alias_tf_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_address_tf_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->address_tf_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 74, "Addresses:"));
|
|
instance->address_tf_lbl =
|
|
XtVaCreateWidget("dtb_options_address_tf_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 0,
|
|
XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 15,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->address_tf_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_alias_add_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->alias_add_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add"));
|
|
instance->alias_add_but =
|
|
XtVaCreateWidget("dtb_options_alias_add_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->alias_add_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_alias_delete_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->alias_delete_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete"));
|
|
instance->alias_delete_but =
|
|
XtVaCreateWidget("dtb_options_alias_delete_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->alias_delete_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_al_change_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->al_change_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change"));
|
|
instance->al_change_but =
|
|
XtVaCreateWidget("dtb_options_al_change_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->al_change_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_update_mbox_scale_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->update_mbox_scale == NULL) {
|
|
instance->update_mbox_scale =
|
|
XtVaCreateWidget("dtb_options_update_mbox_scale",
|
|
xmScaleWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 117,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 2,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNshowValue, False,
|
|
XmNvalue, 50,
|
|
XmNdecimalPoints, 0,
|
|
XmNscaleMultiple, 1,
|
|
XmNscaleWidth, 310,
|
|
XmNmaximum, 100,
|
|
XmNminimum, 0,
|
|
XmNprocessingDirection, XmMAX_ON_RIGHT,
|
|
XmNorientation, XmHORIZONTAL,
|
|
"slidingMode", False,
|
|
NULL);
|
|
}
|
|
if (instance->update_mbox_scale == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_update_mailb_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->update_mailb_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 76, "Update mailbox state:"));
|
|
instance->update_mailb_lbl =
|
|
XtVaCreateWidget("dtb_options_update_mailb_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 22,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->update_mailb_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_frequently_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->frequently_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 77, "Frequently"));
|
|
instance->frequently_lbl =
|
|
XtVaCreateWidget("dtb_options_frequently_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, -38,
|
|
XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNtopOffset, -2,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->frequently_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_seldom_lbl_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->seldom_lbl == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 78, "Seldom"));
|
|
instance->seldom_lbl =
|
|
XtVaCreateWidget("dtb_options_seldom_lbl",
|
|
xmLabelWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, -23,
|
|
XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNleftAttachment, XmATTACH_NONE,
|
|
XmNtopOffset, -2,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->seldom_lbl == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator11_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator11 == NULL) {
|
|
instance->separator11 =
|
|
XtVaCreateWidget("dtb_options_separator11",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator11 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_adv_def_cb_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
Arg args[23]; /* need 18 args (add 5 to be safe) */
|
|
int n = 0;
|
|
Widget adv_def_cb_choice_items[6];
|
|
|
|
if (instance->adv_def_cb_rowcolumn == NULL) {
|
|
instance->adv_def_cb_rowcolumn =
|
|
XtVaCreateWidget("dtb_options_adv_def_cb",
|
|
xmRowColumnWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 24,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 8,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNentryVerticalAlignment, XmALIGNMENT_BASELINE_BOTTOM,
|
|
XmNspacing, 0,
|
|
XmNpacking, XmPACK_TIGHT,
|
|
XmNisHomogeneous, False,
|
|
XmNadjustLast, True,
|
|
XmNmarginWidth, 0,
|
|
XmNmarginHeight, 0,
|
|
XmNentryAlignment, XmALIGNMENT_END,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->adv_def_cb_rowcolumn == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb_label == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 79, "Defaults:"));
|
|
instance->adv_def_cb_label =
|
|
XtVaCreateWidget("dtb_options_adv_def_cb_label",
|
|
xmLabelWidgetClass,
|
|
instance->adv_def_cb_rowcolumn,
|
|
XmNmarginHeight, 8,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->adv_def_cb_label == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNradioBehavior, False); ++n;
|
|
XtSetArg(args[n], XmNentryClass, xmToggleButtonWidgetClass); ++n;
|
|
XtSetArg(args[n], XmNnumColumns, 1); ++n;
|
|
XtSetArg(args[n], XmNisHomogeneous, True); ++n;
|
|
XtSetArg(args[n], XmNspacing, 0); ++n;
|
|
XtSetArg(args[n], XmNrowColumnType, XmWORK_AREA); ++n;
|
|
XtSetArg(args[n], XmNpacking, XmPACK_TIGHT); ++n;
|
|
XtSetArg(args[n], XmNorientation, XmVERTICAL); ++n;
|
|
instance->adv_def_cb =
|
|
XmCreateRadioBox(instance->adv_def_cb_rowcolumn,
|
|
"dtb_options_adv_def_cb_choice", args, n);
|
|
}
|
|
if (instance->adv_def_cb == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb_items.Show_confirmation_notices_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 80, "Show confirmation notices"));
|
|
instance->adv_def_cb_items.Show_confirmation_notices_item =
|
|
XtVaCreateManagedWidget("dtb_options_adv_def_cb_show_confirmation_notices_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->adv_def_cb,
|
|
XmNset, True,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->adv_def_cb_items.Show_confirmation_notices_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb_items.Use_strict_MIME_character_encoding_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 81, "Use strict MIME character encoding"));
|
|
instance->adv_def_cb_items.Use_strict_MIME_character_encoding_item =
|
|
XtVaCreateManagedWidget("dtb_options_adv_def_cb_use_strict_m_i_m_e_character_encoding_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->adv_def_cb,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->adv_def_cb_items.Use_strict_MIME_character_encoding_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb_items.Use_network_aware_mail_file_locking_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 82, "Use network aware mail file locking"));
|
|
instance->adv_def_cb_items.Use_network_aware_mail_file_locking_item =
|
|
XtVaCreateManagedWidget("dtb_options_adv_def_cb_use_network_aware_mail_file_locking_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->adv_def_cb,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->adv_def_cb_items.Use_network_aware_mail_file_locking_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb_items.Ignore_host_name_in_address_allnet_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 83, "Ignore host name in address (allnet)"));
|
|
instance->adv_def_cb_items.Ignore_host_name_in_address_allnet_item =
|
|
XtVaCreateManagedWidget("dtb_options_adv_def_cb_ignore_host_name_in_address_allnet_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->adv_def_cb,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->adv_def_cb_items.Ignore_host_name_in_address_allnet_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb_items.Include_me_when_I_Reply_to_all_metoo_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 84, "Include me when I \"Reply to All\" (metoo)"));
|
|
instance->adv_def_cb_items.Include_me_when_I_Reply_to_all_metoo_item =
|
|
XtVaCreateManagedWidget("dtb_options_adv_def_cb_include_me_when_i_reply_to_all_metoo_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->adv_def_cb,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->adv_def_cb_items.Include_me_when_I_Reply_to_all_metoo_item == NULL)
|
|
return -1;
|
|
|
|
if (instance->adv_def_cb_items.Use_local_name_username_item == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 85, "Use local name: username ="));
|
|
instance->adv_def_cb_items.Use_local_name_username_item =
|
|
XtVaCreateManagedWidget("dtb_options_adv_def_cb_use_local_name_username_item",
|
|
xmToggleButtonWidgetClass,
|
|
instance->adv_def_cb,
|
|
XmNset, False,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->adv_def_cb_items.Use_local_name_username_item == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group12_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group12 == NULL) {
|
|
instance->group12 =
|
|
XtVaCreateWidget("dtb_options_group12",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomOffset, 10,
|
|
XmNbottomAttachment, XmATTACH_FORM,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 119,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 6,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group12 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_group16_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->group16 == NULL) {
|
|
instance->group16 =
|
|
XtVaCreateWidget("dtb_options_group16",
|
|
xmFormWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightAttachment, XmATTACH_NONE,
|
|
XmNleftOffset, 10,
|
|
XmNleftAttachment, XmATTACH_WIDGET,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
|
|
XmNresizePolicy, XmRESIZE_ANY,
|
|
XmNmarginHeight, 0,
|
|
XmNmarginWidth, 0,
|
|
NULL);
|
|
}
|
|
if (instance->group16 == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_local_name_tf_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[17]; /* need 12 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
if (instance->local_name_tf == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNmaxLength, 80); ++n;
|
|
XtSetArg(args[n], XmNeditable, True); ++n;
|
|
XtSetArg(args[n], XmNcursorPositionVisible, True); ++n;
|
|
instance->local_name_tf =
|
|
XmCreateTextField(parent,
|
|
"dtb_options_local_name_tf", args, n);
|
|
}
|
|
if (instance->local_name_tf == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_local_name_list_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
Arg args[16]; /* need 11 args (add 5 to be safe) */
|
|
int n = 0;
|
|
|
|
|
|
if (instance->local_name_list == NULL) {
|
|
n = 0;
|
|
XtSetArg(args[n], XmNscrollBarDisplayPolicy, XmAUTOMATIC); ++n;
|
|
XtSetArg(args[n], XmNlistSizePolicy, XmCONSTANT); ++n;
|
|
XtSetArg(args[n], XmNselectionPolicy, XmBROWSE_SELECT); ++n;
|
|
XtSetArg(args[n], XmNvisibleItemCount, 8); ++n;
|
|
XtSetArg(args[n], XmNbottomAttachment, XmATTACH_NONE); ++n;
|
|
XtSetArg(args[n], XmNrightOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); ++n;
|
|
XtSetArg(args[n], XmNleftOffset, 0); ++n;
|
|
XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); ++n;
|
|
XtSetArg(args[n], XmNtopOffset, 6); ++n;
|
|
XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); ++n;
|
|
instance->local_name_list =
|
|
XmCreateScrolledList(parent,
|
|
"dtb_options_local_name_list_list", args, n);
|
|
}
|
|
instance->local_name_list_scrolledwin = XtParent(instance->local_name_list);
|
|
if (instance->local_name_list == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_local_name_add_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->local_name_add_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 29, "Add"));
|
|
instance->local_name_add_but =
|
|
XtVaCreateWidget("dtb_options_local_name_add_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->local_name_add_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_local_name_del_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->local_name_del_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 30, "Delete"));
|
|
instance->local_name_del_but =
|
|
XtVaCreateWidget("dtb_options_local_name_del_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->local_name_del_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_local_name_chg_but_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->local_name_chg_but == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 31, "Change"));
|
|
instance->local_name_chg_but =
|
|
XtVaCreateWidget("dtb_options_local_name_chg_but",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 10,
|
|
XmNtopAttachment, XmATTACH_WIDGET,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->local_name_chg_but == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_ok_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->ok_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 86, "OK"));
|
|
instance->ok_button =
|
|
XtVaCreateWidget("dtb_options_ok_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 19,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 2,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 13,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNdefaultButtonShadowThickness, 1,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->ok_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_reset_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->reset_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 87, "Reset"));
|
|
instance->reset_button =
|
|
XtVaCreateWidget("dtb_options_reset_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 59,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 41,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 13,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNdefaultButtonShadowThickness, 1,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->reset_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_cancel_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->cancel_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 88, "Cancel"));
|
|
instance->cancel_button =
|
|
XtVaCreateWidget("dtb_options_cancel_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 79,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 61,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 13,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNdefaultButtonShadowThickness, 1,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->cancel_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_separator_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
|
|
if (instance->separator == NULL) {
|
|
instance->separator =
|
|
XtVaCreateWidget("dtb_options_separator",
|
|
xmSeparatorWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightAttachment, XmATTACH_FORM,
|
|
XmNleftOffset, 0,
|
|
XmNleftAttachment, XmATTACH_FORM,
|
|
XmNtopOffset, 0,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNseparatorType, XmSHADOW_ETCHED_IN,
|
|
XmNorientation, XmHORIZONTAL,
|
|
NULL);
|
|
}
|
|
if (instance->separator == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_apply_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->apply_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 89, "Apply"));
|
|
instance->apply_button =
|
|
XtVaCreateWidget("dtb_options_apply_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 39,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 21,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 13,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNdefaultButtonShadowThickness, 1,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->apply_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
dtb_options_help_button_create(
|
|
DtbOptionsDialogInfo instance,
|
|
Widget parent
|
|
)
|
|
{
|
|
XmString label_xmstring = NULL;
|
|
|
|
if (instance->help_button == NULL) {
|
|
label_xmstring = XmStringCreateLocalized(GETMSG(Dtb_project_catd, 2, 90, "Help"));
|
|
instance->help_button =
|
|
XtVaCreateWidget("dtb_options_help_button",
|
|
xmPushButtonWidgetClass,
|
|
parent,
|
|
XmNbottomAttachment, XmATTACH_NONE,
|
|
XmNrightOffset, 0,
|
|
XmNrightPosition, 98,
|
|
XmNrightAttachment, XmATTACH_POSITION,
|
|
XmNleftOffset, 0,
|
|
XmNleftPosition, 81,
|
|
XmNleftAttachment, XmATTACH_POSITION,
|
|
XmNtopOffset, 13,
|
|
XmNtopAttachment, XmATTACH_FORM,
|
|
XmNrecomputeSize, True,
|
|
XmNalignment, XmALIGNMENT_CENTER,
|
|
XmNlabelType, XmSTRING,
|
|
XmNdefaultButtonShadowThickness, 1,
|
|
XmNlabelString, label_xmstring,
|
|
NULL);
|
|
XmStringFree(label_xmstring);
|
|
label_xmstring = NULL;
|
|
}
|
|
if (instance->help_button == NULL)
|
|
return -1;
|
|
|
|
return 0;
|
|
}
|
|
|