Logo Search packages:      
Sourcecode: hf version File versions

braggui.c

# include "gui.h"

/*
 *  interface for personal edit help window
 */

GtkWidget*
create_wpersonal (void)
{
  GtkWidget *wpersonal;
  GtkWidget *vbox12;
  GtkWidget *frame7;
  GtkWidget *table8;
  GtkWidget *label65;
  GtkWidget *label66;
  GtkWidget *label67;
  GtkWidget *label68;
  GtkWidget *label69;
  GtkWidget *label70;
  GtkWidget *label71;
  GtkWidget *label72;
  GtkWidget *hseparator4;
  GtkWidget *hseparator5;
  GtkWidget *entry28;
  GtkWidget *entry29;
  GtkWidget *entry30;
  GtkWidget *entry31;
  GtkWidget *entry32;
  GtkWidget *entry33;
  GtkWidget *entry34;
  GtkWidget *entry27;
  GtkWidget *hseparator6;
  GtkWidget *hseparator8;
  GtkWidget *hseparator9;
  GtkWidget *hseparator10;
  GtkWidget *hseparator11;
  GtkWidget *hseparator12;
  GtkWidget *hseparator13;
  GtkWidget *toolbar2;
  GtkWidget *button19;
  GtkWidget *button21;
  GtkWidget *button20;
  GtkTooltips *tooltips;
  GtkAccelGroup *brag_accels;

  tooltips = gtk_tooltips_new ();

  wpersonal = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (wpersonal, "wpersonal");
  gtk_object_set_data (GTK_OBJECT (wpersonal), "wpersonal", wpersonal);
  gtk_tooltips_set_tip (tooltips, wpersonal, _("In this menue you can enter your data and use it as macros for the fixtexts ..."), NULL);
  gtk_window_set_title (GTK_WINDOW (wpersonal), _("Brag -- Personal Data"));
  gtk_window_set_wmclass (GTK_WINDOW (wpersonal), "hfterm", "hfterm");

  brag_accels = gtk_accel_group_new ();
  gtk_accel_group_attach(brag_accels, GTK_OBJECT(wpersonal));

  
  vbox12 = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (vbox12, "vbox12");
  gtk_widget_ref (vbox12);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "vbox12", vbox12,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox12);
  gtk_container_add (GTK_CONTAINER (wpersonal), vbox12);

  frame7 = gtk_frame_new (_("Please enter your data here:"));
  gtk_widget_set_name (frame7, "frame7");
  gtk_widget_ref (frame7);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "frame7", frame7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (frame7);
  gtk_box_pack_start (GTK_BOX (vbox12), frame7, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame7), 3);

  table8 = gtk_table_new (17, 2, FALSE);
  gtk_widget_set_name (table8, "table8");
  gtk_widget_ref (table8);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "table8", table8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (table8);
  gtk_container_add (GTK_CONTAINER (frame7), table8);
  gtk_table_set_row_spacings (GTK_TABLE (table8), 1);
  gtk_table_set_col_spacings (GTK_TABLE (table8), 3);

  label65 = gtk_label_new (_("Callsign"));
  gtk_widget_set_name (label65, "label65");
  gtk_widget_ref (label65);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label65", label65,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label65);
  gtk_table_attach (GTK_TABLE (table8), label65, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label65), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label65), 3, 0);

  label66 = gtk_label_new (_("Name / SysOp"));
  gtk_widget_set_name (label66, "label66");
  gtk_widget_ref (label66);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label66", label66,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label66);
  gtk_table_attach (GTK_TABLE (table8), label66, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label66), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label66), 3, 0);

  label67 = gtk_label_new (_("City / QTH"));
  gtk_widget_set_name (label67, "label67");
  gtk_widget_ref (label67);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label67", label67,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label67);
  gtk_table_attach (GTK_TABLE (table8), label67, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label67), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label67), 3, 0);

  label68 = gtk_label_new (_("Locator"));
  gtk_widget_set_name (label68, "label68");
  gtk_widget_ref (label68);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label68", label68,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label68);
  gtk_table_attach (GTK_TABLE (table8), label68, 0, 1, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label68), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label68), 3, 0);

  label69 = gtk_label_new (_("RX / TX"));
  gtk_widget_set_name (label69, "label69");
  gtk_widget_ref (label69);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label69", label69,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label69);
  gtk_table_attach (GTK_TABLE (table8), label69, 0, 1, 8, 9,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label69), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label69), 3, 0);

  label70 = gtk_label_new (_("Output ( Wtts )"));
  gtk_widget_set_name (label70, "label70");
  gtk_widget_ref (label70);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label70", label70,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label70);
  gtk_table_attach (GTK_TABLE (table8), label70, 0, 1, 10, 11,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label70), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label70), 3, 0);

  label71 = gtk_label_new (_("Antenna"));
  gtk_widget_set_name (label71, "label71");
  gtk_widget_ref (label71);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label71", label71,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label71);
  gtk_table_attach (GTK_TABLE (table8), label71, 0, 1, 12, 13,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label71), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label71), 3, 0);

  label72 = gtk_label_new (_("Homepage / E-Mail"));
  gtk_widget_set_name (label72, "label72");
  gtk_widget_ref (label72);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "label72", label72,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label72);
  gtk_table_attach (GTK_TABLE (table8), label72, 0, 1, 14, 15,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label72), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (label72), 3, 0);

  hseparator4 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator4, "hseparator4");
  gtk_widget_ref (hseparator4);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator4", hseparator4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator4);
  gtk_table_attach (GTK_TABLE (table8), hseparator4, 0, 1, 16, 17,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator5 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator5, "hseparator5");
  gtk_widget_ref (hseparator5);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator5", hseparator5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator5);
  gtk_table_attach (GTK_TABLE (table8), hseparator5, 1, 2, 16, 17,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  entry28 = gtk_entry_new ();
  gtk_widget_set_name (entry28, "entry28");
  gtk_widget_ref (entry28);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry28", entry28,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry28);
  gtk_table_attach (GTK_TABLE (table8), entry28, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  entry29 = gtk_entry_new ();
  gtk_widget_set_name (entry29, "entry29");
  gtk_widget_ref (entry29);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry29", entry29,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry29);
  gtk_table_attach (GTK_TABLE (table8), entry29, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  entry30 = gtk_entry_new ();
  gtk_widget_set_name (entry30, "entry30");
  gtk_widget_ref (entry30);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry30", entry30,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry30);
  gtk_table_attach (GTK_TABLE (table8), entry30, 1, 2, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  entry31 = gtk_entry_new ();
  gtk_widget_set_name (entry31, "entry31");
  gtk_widget_ref (entry31);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry31", entry31,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry31);
  gtk_table_attach (GTK_TABLE (table8), entry31, 1, 2, 8, 9,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  entry32 = gtk_entry_new ();
  gtk_widget_set_name (entry32, "entry32");
  gtk_widget_ref (entry32);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry32", entry32,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry32);
  gtk_table_attach (GTK_TABLE (table8), entry32, 1, 2, 10, 11,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  entry33 = gtk_entry_new ();
  gtk_widget_set_name (entry33, "entry33");
  gtk_widget_ref (entry33);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry33", entry33,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry33);
  gtk_table_attach (GTK_TABLE (table8), entry33, 1, 2, 12, 13,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  entry34 = gtk_entry_new ();
  gtk_widget_set_name (entry34, "entry34");
  gtk_widget_ref (entry34);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry34", entry34,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry34);
  gtk_table_attach (GTK_TABLE (table8), entry34, 1, 2, 14, 15,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  entry27 = gtk_entry_new ();
  gtk_widget_set_name (entry27, "entry27");
  gtk_widget_ref (entry27);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "entry27", entry27,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry27);
  gtk_table_attach (GTK_TABLE (table8), entry27, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  hseparator6 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator6, "hseparator6");
  gtk_widget_ref (hseparator6);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator6", hseparator6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator6);
  gtk_table_attach (GTK_TABLE (table8), hseparator6, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator8 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator8, "hseparator8");
  gtk_widget_ref (hseparator8);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator8", hseparator8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator8);
  gtk_table_attach (GTK_TABLE (table8), hseparator8, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator9 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator9, "hseparator9");
  gtk_widget_ref (hseparator9);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator9", hseparator9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator9);
  gtk_table_attach (GTK_TABLE (table8), hseparator9, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator10 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator10, "hseparator10");
  gtk_widget_ref (hseparator10);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator10", hseparator10,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator10);
  gtk_table_attach (GTK_TABLE (table8), hseparator10, 0, 1, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator11 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator11, "hseparator11");
  gtk_widget_ref (hseparator11);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator11", hseparator11,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator11);
  gtk_table_attach (GTK_TABLE (table8), hseparator11, 0, 1, 9, 10,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator12 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator12, "hseparator12");
  gtk_widget_ref (hseparator12);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator12", hseparator12,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator12);
  gtk_table_attach (GTK_TABLE (table8), hseparator12, 0, 1, 11, 12,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hseparator13 = gtk_hseparator_new ();
  gtk_widget_set_name (hseparator13, "hseparator13");
  gtk_widget_ref (hseparator13);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "hseparator13", hseparator13,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator13);
  gtk_table_attach (GTK_TABLE (table8), hseparator13, 0, 1, 13, 14,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  toolbar2 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_TEXT);
  gtk_widget_set_name (toolbar2, "toolbar2");
  gtk_widget_ref (toolbar2);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "toolbar2", toolbar2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (toolbar2);
  gtk_box_pack_start (GTK_BOX (vbox12), toolbar2, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (toolbar2), 3);

  button19 = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("OK & Save"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (button19, "button19");
  gtk_widget_ref (button19);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "button19", button19,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button19);
  gtk_container_set_border_width (GTK_CONTAINER (button19), 3);

  button21 = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("delete all"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (button21, "button21");
  gtk_widget_ref (button21);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "button21", button21,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button21);
  gtk_container_set_border_width (GTK_CONTAINER (button21), 3);

  button20 = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Cancel"),
                                NULL, NULL,
                                NULL, NULL, NULL);
  gtk_widget_set_name (button20, "button20");
  gtk_widget_ref (button20);
  gtk_object_set_data_full (GTK_OBJECT (wpersonal), "button20", button20,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button20);
  gtk_container_set_border_width (GTK_CONTAINER (button20), 3);

  gtk_signal_connect (GTK_OBJECT (button19), "clicked",
                      GTK_SIGNAL_FUNC (on_brag_ok_button_clicked),
                      NULL);
  gtk_widget_add_accelerator (button19, "clicked",
                  brag_accels,
                  GDK_Return, 0, 
                            GTK_ACCEL_VISIBLE);
 
  gtk_signal_connect (GTK_OBJECT (button20), "clicked",
                      GTK_SIGNAL_FUNC (on_brag_cancel_button_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (wpersonal), "delete_event",
                      GTK_SIGNAL_FUNC (gtk_widget_hide),
                      NULL);
  gtk_widget_add_accelerator (button20, "clicked",
                  brag_accels,
                  GDK_Escape, 0, 
                            GTK_ACCEL_VISIBLE);
 
   gtk_signal_connect (GTK_OBJECT (button21), "clicked",
                      GTK_SIGNAL_FUNC (on_brag_delete_button_clicked),
                      NULL);

  gtk_widget_add_accelerator (wpersonal, "hide",
                  brag_accels,
                  GDK_b, GDK_SHIFT_MASK,
                            GTK_ACCEL_VISIBLE);

   gtk_object_set_data (GTK_OBJECT (wpersonal), "tooltips", tooltips);

  return wpersonal;
}


Generated by  Doxygen 1.6.0   Back to index