Beispiel #1
0
	int main(int argc, char *argv[])
	{ 
		GtkWidget *app;
		GnomeAppBar *bar;
		GtkWidget *frame;

		//初始化
		//setlocale(LC_ALL, "");
		gnome_init(PACKAGE, "1.0", argc, argv);
		bindtextdomain( PACKAGE, "/usr/share/locale");
		textdomain( PACKAGE );

		//建立主窗口
		app = gnome_app_new (PACKAGE, "GNOME Style Programming");
		gtk_signal_connect (GTK_OBJECT (app), "delete_event",
			GTK_SIGNAL_FUNC (quit_cb), NULL);

		//建立菜单
		gnome_app_create_menus (GNOME_APP (app), helper_main_menu);
		//建立按钮
		gnome_app_create_toolbar (GNOME_APP (app), helper_toolbar);
		//建立状态条
		bar = GNOME_APPBAR(
			gnome_appbar_new(FALSE, TRUE, GNOME_PREFERENCES_USER));
		gnome_app_set_statusbar(GNOME_APP(app), GTK_WIDGET(bar));

		//在状态条上显示菜单提示 
		gnome_app_install_appbar_menu_hints(GNOME_APPBAR(bar), 
			helper_main_menu);


		//---- 主要工作区域 ---------------------------

		frame = gtk_frame_new (_("Main Work Area"));
		gtk_widget_set_usize(frame, 640, 480);
		gtk_widget_show (frame);


		//-------------------------------

		//加入组件
		gnome_app_set_contents ( GNOME_APP (app), frame);

		//显示组件
		gtk_widget_show (app);

		gtk_main ();
		return 0;
	}
Beispiel #2
0
int
main (int argc, char *argv [])
{
	GtkWidget *label;
	GnomeClient *client;

	gnome_score_init("same-gnome");

	bindtextdomain (PACKAGE, GNOMELOCALEDIR);
	textdomain (PACKAGE);

	gnome_init_with_popt_table ("same-gnome", VERSION, argc, argv, options, 0, NULL);

	gnome_window_icon_set_default_from_file (GNOME_ICONDIR"/gnome-gsame.png");
	client= gnome_master_client ();

	gtk_signal_connect (GTK_OBJECT (client), "save_yourself",
			    GTK_SIGNAL_FUNC (save_state), argv[0]);
	gtk_signal_connect (GTK_OBJECT (client), "die",
			    GTK_SIGNAL_FUNC (client_die), NULL);

	if (GNOME_CLIENT_RESTARTED (client)){
		gnome_config_push_prefix (gnome_client_get_config_prefix (client));
	    
		restart ();
		restarted = 1;
		
		gnome_config_pop_prefix ();
	}

	srand (time (NULL));

	app = gnome_app_new("same-gnome", _("Same Gnome"));

        gtk_window_set_policy(GTK_WINDOW(app), FALSE, FALSE, TRUE);
	gtk_signal_connect (GTK_OBJECT(app), "delete_event",
			    (GtkSignalFunc)game_quit_callback, NULL);

	appbar = gnome_appbar_new(FALSE, TRUE, GNOME_PREFERENCES_USER);
	gnome_app_set_statusbar(GNOME_APP (app), GTK_WIDGET(appbar));

	gnome_appbar_set_status(GNOME_APPBAR (appbar),
				_("Welcome to Same Gnome!"));

	gnome_app_create_menus(GNOME_APP(app), mainmenu);

	gnome_app_install_menu_hints(GNOME_APP (app), mainmenu);
  
        vb = gtk_vbox_new (FALSE, 0);
	gnome_app_set_contents (GNOME_APP (app), vb);

	if (!fname) {
		fname = gnome_config_get_string
			("/same-gnome/Preferences/Scenario=stones.png");
	}

	create_same_board (fname);

	label = gtk_label_new (_("Score: "));
	scorew = gtk_label_new ("");
	set_score (score);

	gtk_box_pack_start(GTK_BOX(appbar), label, FALSE, TRUE, 0);
	gtk_box_pack_start(GTK_BOX(appbar), scorew, FALSE, TRUE, 0);
	
	if (!restarted)
		new_game ();
	
	g_free (fname);

	gtk_widget_show (vb);
	gtk_widget_show (GTK_WIDGET(label));
	gtk_widget_show (GTK_WIDGET(scorew));
        gtk_widget_show (app);

	gtk_main ();
	return 0;
}
Beispiel #3
0
main(int argc, char *argv[])
{
   int n;
   int rows, cols;
   int drawButtons;
   char *btn_font, *disp_font;
   /* GtkWidget *main_w; */
   GtkWidget *vbox;
   GtkWidget *menu;
   GtkWidget *mdisp;
   GtkWidget *lcd;
   GtkWidget *btns;
   GdkFont *new_font;
   GtkStyle *default_style, *new_style;
   GdkBitmap *icon_bitmap;
#ifdef USE_GNOME
   GnomeAppBar *appbar;
#endif

   setlocale(LC_ALL, "C");
#ifdef USE_GNOME
   gnome_init("grpn", "1.0", argc, argv);
   gnome_app_new("grpn", "grpn");
#else
   /* initialize gtk */
   gtk_init(&argc, &argv);
#endif

   /* initial values */
   drawButtons = 1;
   rows = 8;
   cols = 30;
   btn_font = disp_font = NULL;

   /* process command line args */
   n = 1;
   while(n < argc){
      if(0 == strcmp("-fn", argv[n])){
         n++;
         if(n >= argc){
            usage("Missing required argument for -fn.");
            exit(0);
         }
         btn_font = disp_font = argv[n];
      } else if(0 == strcmp("-btn-fn", argv[n])){
         n++;
         if(n >= argc){
            usage("Missing required argument for -btn-fn.");
            exit(0);
         }
         btn_font = argv[n];
      } else if(0 == strcmp("-disp-fn", argv[n])){
         n++;
         if(n >= argc){
            usage("Missing required argument for -disp-fn.");
            exit(0);
         }
         disp_font = argv[n];
      } else if(0 == strcmp("-rows", argv[n])){
         n++;
         if(n >= argc){
            usage("Missing required argument for -rows.");
            exit(0);
         }
         if(1 != sscanf(argv[n], "%d", &rows)){
            usage("Unable to read number or rows.");
            exit(0);
         }
      } else if(0 == strcmp("-cols", argv[n])){
         n++;
         if(n >= argc){
            usage("Missing required argument for -cols.");
            exit(0);
         }
         if(1 != sscanf(argv[n], "%d", &cols)){
            usage("Unable to read number or cols.");
            exit(0);
         }
      } else if(0 == strcmp("-b", argv[n])){
         drawButtons = 0;
      } else if(0 == strcmp("-bm", argv[n])){
         n++;
         if(n >= argc){
            usage("Missing required argument for -m.");
            exit(0);
         }
         if (0 == strcmp("dec", argv[n])){
             setBaseMode(DECIMAL);
	 } else if (0 == strcmp("eng", argv[n])){
             setBaseMode(DECIMAL_ENG);
	 } else if (0 == strcmp("bin", argv[n])){
             setBaseMode(BINARY);
	 } else if (0 == strcmp("oct", argv[n])){
             setBaseMode(OCTAL);
	 } else if (0 == strcmp("hex", argv[n])){
             setBaseMode(HEXADECIMAL);
	 } else {
             usage("Specify dec, eng, bin, oct or hex for -m.");
             exit(0);
         }
      } else {
         usage("Unknown Argument.");
         exit(0);
      }
      n++;
   }

   /* set up any constants we may use */
   setup_constant();

   /* initialize the undo system */
   initUndoSystem();

   /* setup the stack */
   if(0 == setup_stack()){
      fprintf(stderr, "Error: Could not initalize data structures.\n");
      exit(0);
   }

   /* set the font if told */
   if(btn_font != NULL){
      default_style = gtk_widget_get_default_style();
      if(NULL == (new_font = gdk_font_load(btn_font))){
         fprintf(stderr, "Unable to load font %s.\n", btn_font);
         exit(0);
      }
      new_style = gtk_style_copy(default_style);
      new_style->font_desc = new_font;
/* BDD - No longer in Gtk2.x */
/*      gtk_widget_set_default_style(new_style); */
   }
   

#ifdef USE_GNOME
   main_w = gnome_app_new("grpn", "grpn");
   setup_menu(main_w);

   appbar = GNOME_APPBAR(gnome_appbar_new(FALSE, FALSE, FALSE));
   gnome_app_set_statusbar(GNOME_APP(main_w), GTK_WIDGET(appbar));

   /*create the box that everyone goes in */
   vbox = gtk_vbox_new(FALSE, 0);
   gnome_app_set_contents(GNOME_APP(main_w), vbox);
   gtk_widget_show(vbox);

#else
   /* the main window contains the work area and the menubar */
   main_w = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_widget_set_name(main_w, "grpn");

   /*create the box that everyone goes in */
   vbox = gtk_vbox_new(FALSE, 0);
   gtk_container_add(GTK_CONTAINER(main_w), vbox);
   gtk_widget_show(vbox);

   /* set up the menu bar */
   menu = setup_menu(vbox);
#endif

   /* handle window manager close */
   gtk_signal_connect(GTK_OBJECT(main_w), "delete_event",
      GTK_SIGNAL_FUNC(delete_event), NULL);
   gtk_signal_connect(GTK_OBJECT(main_w), "destroy",
      GTK_SIGNAL_FUNC(destroy), NULL);

   /* create the varrious subsystems */
   mdisp = setupModeDisplay(vbox);
   if(drawButtons) btns = setupButtons(vbox);
   lcd = setupLCD(vbox, rows, cols, disp_font);

   /* Create pixmap of depth 1 (bitmap) for icon */
   gtk_widget_realize(main_w);
   icon_bitmap = gdk_bitmap_create_from_data(main_w->window,
      icon_bitmap_bits, icon_bitmap_width, icon_bitmap_height);
   gdk_window_set_icon(main_w->window, NULL, icon_bitmap, NULL);

   gtk_widget_show(main_w);

   gtk_main();

}
GtkWidget*
create_rs232 (void)
{
  GtkWidget *rs232;
  GtkWidget *eventbox1;
  GtkWidget *vbox1;
  GtkWidget *hbox5;
  GtkWidget *exit;
  GtkWidget *swap;
  GtkWidget *clean_data_area;
  GtkWidget *label7;
  GtkWidget *label8;
  GtkWidget *hseparator5;
  GtkWidget *hbox3;
  GtkWidget *vbox2;
  GtkWidget *hbox18;
  GtkWidget *label1;
  GtkWidget *combo1;
  GList *combo1_items = NULL;
  GtkWidget *combo_entry_baudrate;
  GtkWidget *hbox24;
  GtkWidget *label2;
  GtkWidget *entry5;
  GtkWidget *label20;
  GtkWidget *hbox19;
  GtkWidget *label3;
  GtkWidget *hbox25;
  GtkWidget *combo3;
  GList *combo3_items = NULL;
  GtkWidget *combo_entry_port;
  GtkWidget *hbox26;
  GtkWidget *label4;
  GtkWidget *entry2;
  GtkWidget *label21;
  GtkWidget *hbox27;
  GtkWidget *togglebutton1;
  GtkWidget *save_as_numeral;
  GtkWidget *entry1;
  GtkWidget *scrolledwindow1;
  GtkWidget *text1;
  GtkWidget *scrolledwindow2;
  GtkWidget *text2;
  GtkWidget *hseparator4;
  GtkWidget *hbox4;
  GtkWidget *label22;
  GSList *_4_group = NULL;
  GtkWidget *radiobutton1;
  guint radiobutton2_key;
  GtkWidget *radiobutton2;
  GtkWidget *hseparator6;
  GtkWidget *hbox29;
  GtkWidget *spectrum;
  GtkWidget *inspect;
  GtkWidget *hbox30;
  GtkWidget *big_spectrum;
  GtkWidget *optionmenu1;
  GtkWidget *optionmenu1_menu;
  GtkWidget *glade_menuitem;
  GtkWidget *print_spectrum;
  GtkWidget *label19;
  GtkWidget *printer_name;
  GtkWidget *hbox17;
  GtkWidget *label18;
  GtkWidget *point;
  GtkWidget *save_as_eps;
  GtkWidget *entry4;
  GtkWidget *hseparator1;
  GtkWidget *hbox9;
  GtkWidget *label9;
  GSList *_1_group = NULL;
  GtkWidget *specification_on;
  GtkWidget *coefficient_on;
  GtkWidget *hseparator3;
  GtkWidget *hbox6;
  GtkWidget *label11;
  GSList *_2_group = NULL;
  GtkWidget *move_average;
  GtkWidget *window;
  GtkWidget *butterworth;
  GtkWidget *chebyshev;
  GtkWidget *hbox8;
  GtkWidget *fs_label;
  GtkWidget *fs;
  GtkWidget *pass_edge_label;
  GtkWidget *pass_edge;
  GtkWidget *stop_edge_label;
  GtkWidget *stop_edge;
  GtkWidget *pass_ripple_label;
  GtkWidget *pass_ripple;
  GtkWidget *stop_ripple_label;
  GtkWidget *stop_ripple;
  GtkWidget *hseparator2;
  GtkWidget *hbox10;
  GtkWidget *label12;
  GSList *_3_group = NULL;
  GtkWidget *fir_input_coefficient;
  GtkWidget *iir_input_coefficient;
  GtkWidget *identify_stability;
  GtkWidget *hbox14;
  GtkWidget *label16;
  GtkWidget *a_value;
  GtkWidget *label17;
  GtkWidget *b_value;
  GtkWidget *appbar1;
  GtkWidget *hbox28;
  GtkWidget *statusbar1;
  GtkWidget *progressbar1;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  rs232 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_object_set_data (GTK_OBJECT (rs232), "rs232", rs232);
  gtk_window_set_title (GTK_WINDOW (rs232), _("\246\263\255\255\257\337\275\304\305T\300\263 FIR \244\316\265L\255\255\257\337\275\304\305T\300\263 IIR \252\272\300W\303\320\244\300\252R\300\263\245\316"));
  gtk_window_set_policy (GTK_WINDOW (rs232), FALSE, FALSE, TRUE);

  eventbox1 = gtk_event_box_new ();
  gtk_widget_ref (eventbox1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "eventbox1", eventbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (eventbox1);
  gtk_container_add (GTK_CONTAINER (rs232), eventbox1);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_ref (vbox1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "vbox1", vbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (eventbox1), vbox1);

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox5);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox5", hbox5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox5);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox5, TRUE, TRUE, 10);

  exit = gtk_button_new_with_label (_("\302\367\266}"));
  gtk_widget_ref (exit);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "exit", exit,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (exit);
  gtk_box_pack_start (GTK_BOX (hbox5), exit, FALSE, FALSE, 10);
  gtk_widget_set_usize (exit, 100, -2);

  swap = gtk_button_new_with_label (_("\261\265\246\254"));
  gtk_widget_ref (swap);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "swap", swap,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (swap);
  gtk_box_pack_start (GTK_BOX (hbox5), swap, FALSE, FALSE, 10);
  gtk_widget_set_usize (swap, 100, -2);
  gtk_tooltips_set_tip (tooltips, swap, _("\245i\261\265\246\254\245\321\246\352\246C\260\360\251\322\260e\250\323\252\272\270\352\256\306"), NULL);

  clean_data_area = gtk_button_new_with_label (_("\262M\260\243\270\352\256\306\261\265\246\254\260\317"));
  gtk_widget_ref (clean_data_area);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "clean_data_area", clean_data_area,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (clean_data_area);
  gtk_box_pack_start (GTK_BOX (hbox5), clean_data_area, FALSE, FALSE, 10);

  label7 = gtk_label_new (_("\255\354\251l\270\352\256\306"));
  gtk_widget_ref (label7);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label7", label7,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox5), label7, FALSE, FALSE, 89);

  label8 = gtk_label_new (_("\274\306\255\310\270\352\256\306"));
  gtk_widget_ref (label8);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label8", label8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label8);
  gtk_box_pack_start (GTK_BOX (hbox5), label8, FALSE, FALSE, 52);

  hseparator5 = gtk_hseparator_new ();
  gtk_widget_ref (hseparator5);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hseparator5", hseparator5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator5);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator5, TRUE, TRUE, 5);

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox3);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox3", hbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox3, TRUE, TRUE, 5);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_ref (vbox2);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "vbox2", vbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox2);
  gtk_box_pack_start (GTK_BOX (hbox3), vbox2, TRUE, TRUE, 0);

  hbox18 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox18);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox18", hbox18,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox18);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox18, TRUE, TRUE, 5);

  label1 = gtk_label_new (_("\266\307\277\351\300j\262v"));
  gtk_widget_ref (label1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label1", label1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label1);
  gtk_box_pack_start (GTK_BOX (hbox18), label1, FALSE, FALSE, 10);

  combo1 = gtk_combo_new ();
  gtk_widget_ref (combo1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "combo1", combo1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo1);
  gtk_box_pack_start (GTK_BOX (hbox18), combo1, TRUE, TRUE, 10);
  gtk_widget_set_usize (combo1, 1, -2);
  combo1_items = g_list_append (combo1_items, (gpointer) _("2400"));
  combo1_items = g_list_append (combo1_items, (gpointer) _("4800"));
  combo1_items = g_list_append (combo1_items, (gpointer) _("9600"));
  combo1_items = g_list_append (combo1_items, (gpointer) _("19200"));
  combo1_items = g_list_append (combo1_items, (gpointer) _("38400"));
  combo1_items = g_list_append (combo1_items, (gpointer) _("57600"));
  combo1_items = g_list_append (combo1_items, (gpointer) _("115200"));
  gtk_combo_set_popdown_strings (GTK_COMBO (combo1), combo1_items);
  g_list_free (combo1_items);

  combo_entry_baudrate = GTK_COMBO (combo1)->entry;
  gtk_widget_ref (combo_entry_baudrate);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "combo_entry_baudrate", combo_entry_baudrate,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_entry_baudrate);
  gtk_entry_set_editable (GTK_ENTRY (combo_entry_baudrate), FALSE);
  gtk_entry_set_text (GTK_ENTRY (combo_entry_baudrate), _("4800"));

  hbox24 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox24);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox24", hbox24,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox24);
  gtk_box_pack_start (GTK_BOX (hbox18), hbox24, TRUE, TRUE, 0);

  label2 = gtk_label_new (_("\270\352\256\306\252\370\253\327"));
  gtk_widget_ref (label2);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label2", label2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label2);
  gtk_box_pack_start (GTK_BOX (hbox24), label2, FALSE, FALSE, 15);

  entry5 = gtk_entry_new ();
  gtk_widget_ref (entry5);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "entry5", entry5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry5);
  gtk_box_pack_start (GTK_BOX (hbox24), entry5, TRUE, TRUE, 10);
  gtk_widget_set_usize (entry5, 1, -2);
  gtk_tooltips_set_tip (tooltips, entry5, _("\263\346\246\354\254O\246\354\244\270\262\325"), NULL);
  gtk_entry_set_text (GTK_ENTRY (entry5), _("16"));

  label20 = gtk_label_new (_("\246\354\244\270\262\325\274\306"));
  gtk_widget_ref (label20);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label20", label20,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label20);
  gtk_box_pack_start (GTK_BOX (hbox24), label20, FALSE, FALSE, 10);

  hbox19 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox19);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox19", hbox19,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox19);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox19, TRUE, TRUE, 5);

  label3 = gtk_label_new (_("\266\307\277\351\247\307\246C"));
  gtk_widget_ref (label3);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label3", label3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label3);
  gtk_box_pack_start (GTK_BOX (hbox19), label3, FALSE, FALSE, 10);

  hbox25 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox25);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox25", hbox25,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox25);
  gtk_box_pack_start (GTK_BOX (hbox19), hbox25, TRUE, TRUE, 0);

  combo3 = gtk_combo_new ();
  gtk_widget_ref (combo3);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "combo3", combo3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo3);
  gtk_box_pack_start (GTK_BOX (hbox25), combo3, TRUE, TRUE, 10);
  gtk_widget_set_usize (combo3, 1, -2);
  combo3_items = g_list_append (combo3_items, (gpointer) _("1"));
  combo3_items = g_list_append (combo3_items, (gpointer) _("2"));
  gtk_combo_set_popdown_strings (GTK_COMBO (combo3), combo3_items);
  g_list_free (combo3_items);

  combo_entry_port = GTK_COMBO (combo3)->entry;
  gtk_widget_ref (combo_entry_port);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "combo_entry_port", combo_entry_port,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_entry_port);
  gtk_entry_set_editable (GTK_ENTRY (combo_entry_port), FALSE);
  gtk_entry_set_text (GTK_ENTRY (combo_entry_port), _("1"));

  hbox26 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox26);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox26", hbox26,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox26);
  gtk_box_pack_start (GTK_BOX (hbox25), hbox26, TRUE, TRUE, 0);

  label4 = gtk_label_new (_("\270\352\256\306\301`\274\306"));
  gtk_widget_ref (label4);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label4", label4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label4);
  gtk_box_pack_start (GTK_BOX (hbox26), label4, FALSE, FALSE, 15);

  entry2 = gtk_entry_new ();
  gtk_widget_ref (entry2);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "entry2", entry2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry2);
  gtk_box_pack_start (GTK_BOX (hbox26), entry2, TRUE, TRUE, 10);
  gtk_widget_set_usize (entry2, 1, -2);
  gtk_entry_set_text (GTK_ENTRY (entry2), _("5"));

  label21 = gtk_label_new (_("\265\247\270\352\256\306\274\306"));
  gtk_widget_ref (label21);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label21", label21,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label21);
  gtk_box_pack_start (GTK_BOX (hbox26), label21, FALSE, FALSE, 10);

  hbox27 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox27);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox27", hbox27,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox27);
  gtk_box_pack_start (GTK_BOX (vbox2), hbox27, FALSE, FALSE, 5);

  togglebutton1 = gtk_toggle_button_new_with_label (_("\261j\250\356\274g\244J\300\311\256\327"));
  gtk_widget_ref (togglebutton1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "togglebutton1", togglebutton1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (togglebutton1);
  gtk_box_pack_start (GTK_BOX (hbox27), togglebutton1, FALSE, FALSE, 10);
  gtk_tooltips_set_tip (tooltips, togglebutton1, _("\244\243\272\336\253\374\251w\252\272\300\311\256\327\270\364\256|\244\247\300\311\246W\246s\246b\273P\247_\241A\244@\253\337\261j\250\356\274g\244J"), NULL);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (togglebutton1), TRUE);

  save_as_numeral = gtk_button_new_with_label (_("\300\311\256\327\270\364\256|"));
  gtk_widget_ref (save_as_numeral);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "save_as_numeral", save_as_numeral,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (save_as_numeral);
  gtk_box_pack_start (GTK_BOX (hbox27), save_as_numeral, FALSE, FALSE, 0);

  entry1 = gtk_entry_new ();
  gtk_widget_ref (entry1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "entry1", entry1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry1);
  gtk_box_pack_start (GTK_BOX (hbox27), entry1, TRUE, TRUE, 10);
  gtk_widget_set_usize (entry1, 1, -2);
  gtk_entry_set_text (GTK_ENTRY (entry1), _("/home/allways/numeral.txt"));

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_ref (scrolledwindow1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "scrolledwindow1", scrolledwindow1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scrolledwindow1);
  gtk_box_pack_start (GTK_BOX (hbox3), scrolledwindow1, TRUE, TRUE, 5);
  gtk_widget_set_usize (scrolledwindow1, 1, -2);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

  text1 = gtk_text_new (NULL, NULL);
  gtk_widget_ref (text1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "text1", text1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (text1);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), text1);
  gtk_tooltips_set_tip (tooltips, text1, _("\261q\246\352\246C\260\360\266\307\250\323\252\272\247\271\276\343\270\352\256\306"), NULL);

  scrolledwindow2 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_ref (scrolledwindow2);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "scrolledwindow2", scrolledwindow2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scrolledwindow2);
  gtk_box_pack_start (GTK_BOX (hbox3), scrolledwindow2, TRUE, TRUE, 5);
  gtk_widget_set_usize (scrolledwindow2, 1, -2);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow2), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

  text2 = gtk_text_new (NULL, NULL);
  gtk_widget_ref (text2);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "text2", text2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (text2);
  gtk_container_add (GTK_CONTAINER (scrolledwindow2), text2);
  gtk_tooltips_set_tip (tooltips, text2, _("\261q\247\271\276\343\270\352\256\306\251\322\261o\250\354\252\272\257\302\274\306\255\310\270\352\256\306"), NULL);

  hseparator4 = gtk_hseparator_new ();
  gtk_widget_ref (hseparator4);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hseparator4", hseparator4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator4);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator4, TRUE, TRUE, 5);

  hbox4 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox4);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox4", hbox4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox4);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox4, TRUE, TRUE, 5);

  label22 = gtk_label_new (_("\250\317\245\316\245\273\263n\305\351\244\247\302o\252i\276\271"));
  gtk_widget_ref (label22);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label22", label22,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label22);
  gtk_box_pack_start (GTK_BOX (hbox4), label22, FALSE, FALSE, 10);

  radiobutton1 = gtk_radio_button_new_with_label (_4_group, _("\254O"));
  _4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton1));
  gtk_widget_ref (radiobutton1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "radiobutton1", radiobutton1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton1);
  gtk_box_pack_start (GTK_BOX (hbox4), radiobutton1, FALSE, FALSE, 0);

  radiobutton2 = gtk_radio_button_new_with_label (_4_group, "");
  radiobutton2_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (radiobutton2)->child),
                                   _("\247_"));
  gtk_widget_add_accelerator (radiobutton2, "clicked", accel_group,
                              radiobutton2_key, GDK_MOD1_MASK, (GtkAccelFlags) 0);
  _4_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton2));
  gtk_widget_ref (radiobutton2);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "radiobutton2", radiobutton2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton2);
  gtk_box_pack_start (GTK_BOX (hbox4), radiobutton2, FALSE, FALSE, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiobutton2), TRUE);

  hseparator6 = gtk_hseparator_new ();
  gtk_widget_ref (hseparator6);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hseparator6", hseparator6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator6);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator6, TRUE, TRUE, 5);

  hbox29 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox29);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox29", hbox29,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox29);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox29, TRUE, TRUE, 5);

  spectrum = gtk_button_new_with_label (_("\266}\251l\303\270\273s\302o\252i\276\271\300W\303\320\271\317"));
  gtk_widget_ref (spectrum);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "spectrum", spectrum,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (spectrum);
  gtk_box_pack_start (GTK_BOX (hbox29), spectrum, FALSE, FALSE, 10);
  gtk_tooltips_set_tip (tooltips, spectrum, _("\267\355\246U\260\321\274\306\244\316\263]\251w\246n\244F\244\247\253\341\241A\264N\245i\245H\253\366\246\271\266s\250\323\303\270\273s\271\317\247\316\244F"), NULL);

  inspect = gtk_button_new_with_label (_("\300\313\265\370\271\317\300\311"));
  gtk_widget_ref (inspect);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "inspect", inspect,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (inspect);
  gtk_box_pack_start (GTK_BOX (hbox29), inspect, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, inspect, _("\245i\244\243\254O A \271\317\263\341\241I\254O\300W\303\320\271\317\260\325\241I"), NULL);

  hbox30 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox30);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox30", hbox30,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox30);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox30, TRUE, TRUE, 5);

  big_spectrum = gtk_toggle_button_new_with_label (_("\244j\261i\252\272\300W\303\320\271\317"));
  gtk_widget_ref (big_spectrum);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "big_spectrum", big_spectrum,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (big_spectrum);
  gtk_box_pack_start (GTK_BOX (hbox30), big_spectrum, FALSE, FALSE, 10);

  optionmenu1 = gtk_option_menu_new ();
  gtk_widget_ref (optionmenu1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "optionmenu1", optionmenu1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (optionmenu1);
  gtk_box_pack_start (GTK_BOX (hbox30), optionmenu1, FALSE, FALSE, 10);
  optionmenu1_menu = gtk_menu_new ();
  glade_menuitem = gtk_menu_item_new_with_label (_("          \300W\303\320\271\317\252\355\245\334\244\350\252k"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("X \266b\241G\274\306\246\354\300W\262v Y\241G\275u\251\312\274W\257q"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("X \266b\241G\274\306\246\354\300W\262v Y\241G\244\300\250\251\274W\257q"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("X \266b\241G\303\376\244\361\300W\262v Y\241G\275u\251\312\274W\257q"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("X \266b\241G\303\376\244\361\300W\262v Y\241G\244\300\250\251\274W\257q"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (optionmenu1_menu), glade_menuitem);
  gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu1), optionmenu1_menu);

  print_spectrum = gtk_toggle_button_new_with_label (_("\300W\303\320\271\317\245\316\246L\252\355\276\367\246L\245X"));
  gtk_widget_ref (print_spectrum);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "print_spectrum", print_spectrum,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (print_spectrum);
  gtk_box_pack_start (GTK_BOX (hbox30), print_spectrum, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, print_spectrum, _("\300W\303\320\271\317\273\335\255n\245\316\246L\252\355\276\367\303\270\273s\245X\250\323\252\272\256\311\255\324\241A\250\317\244\247\244U\250H\241A\260O\261o\246L\252\355\276\367\252\272\246W\272\331\255n\245[\263\341\241I"), NULL);

  label19 = gtk_label_new (_("\246L\252\355\276\367\252\272\271q\270\243\246W\272\331"));
  gtk_widget_ref (label19);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label19", label19,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label19);
  gtk_box_pack_start (GTK_BOX (hbox30), label19, FALSE, FALSE, 10);

  printer_name = gtk_entry_new ();
  gtk_widget_ref (printer_name);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "printer_name", printer_name,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (printer_name);
  gtk_box_pack_start (GTK_BOX (hbox30), printer_name, TRUE, TRUE, 10);
  gtk_widget_set_usize (printer_name, 1, -2);
  gtk_tooltips_set_tip (tooltips, printer_name, _("\264N\254O\246b\272\364\270\364\244W\246L\252\355\276\367\252\272\246W\246r\241A\245i\244\243\254O\245L\252\272\241\247\262\243\253~\246W\246r\241\250\263\341"), NULL);
  gtk_entry_set_text (GTK_ENTRY (printer_name), _("hp"));

  hbox17 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox17);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox17", hbox17,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox17);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox17, TRUE, TRUE, 5);

  label18 = gtk_label_new (_("\300W\303\320\271\317\245\255\267\306\253\327( X \266b )"));
  gtk_widget_ref (label18);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label18", label18,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label18);
  gtk_box_pack_start (GTK_BOX (hbox17), label18, FALSE, FALSE, 10);

  point = gtk_entry_new ();
  gtk_widget_ref (point);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "point", point,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (point);
  gtk_box_pack_start (GTK_BOX (hbox17), point, TRUE, TRUE, 0);
  gtk_widget_set_usize (point, 1, -2);
  gtk_tooltips_set_tip (tooltips, point, _("\264N\254O\247A\247\306\261\346 X \266b\257\340\260\367\244\300\246\250\264X\255\323\265\245\244\300\251O\241H"), NULL);
  gtk_entry_set_text (GTK_ENTRY (point), _("200"));

  save_as_eps = gtk_button_new_with_label (_("eps\241Bps\241Bpdf \300\311\300x\246s\270\364\256|\241A\275\320\245[\244W\260\306\300\311\246W"));
  gtk_widget_ref (save_as_eps);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "save_as_eps", save_as_eps,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (save_as_eps);
  gtk_box_pack_start (GTK_BOX (hbox17), save_as_eps, FALSE, FALSE, 10);

  entry4 = gtk_entry_new ();
  gtk_widget_ref (entry4);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "entry4", entry4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (entry4);
  gtk_box_pack_start (GTK_BOX (hbox17), entry4, TRUE, TRUE, 10);
  gtk_widget_set_usize (entry4, 1, -2);
  gtk_tooltips_set_tip (tooltips, entry4, _("\275\320\260O\261o\244@\251w\261o\247\342\271\317\300\311\252\272\260\306\300\311\246W\246\333\246\346\245[\244J\241C\246p eps ps pdf"), NULL);
  gtk_entry_set_text (GTK_ENTRY (entry4), _("/home/allways/spectrum.eps"));

  hseparator1 = gtk_hseparator_new ();
  gtk_widget_ref (hseparator1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hseparator1", hseparator1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator1);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, TRUE, TRUE, 5);

  hbox9 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox9);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox9", hbox9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox9);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox9, TRUE, TRUE, 5);

  label9 = gtk_label_new (_("\302o\252i\276\271\252\272\300W\303\320\271\317\262\243\245\315\244\350\246\241\241G"));
  gtk_widget_ref (label9);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label9", label9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox9), label9, FALSE, FALSE, 5);

  specification_on = gtk_radio_button_new_with_label (_1_group, _("\302o\252i\276\271\251\372\262\323\263W\256\346"));
  _1_group = gtk_radio_button_group (GTK_RADIO_BUTTON (specification_on));
  gtk_widget_ref (specification_on);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "specification_on", specification_on,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (specification_on);
  gtk_box_pack_start (GTK_BOX (hbox9), specification_on, FALSE, FALSE, 5);
  gtk_tooltips_set_tip (tooltips, specification_on, _("\247A\245i\245H\246\333\246\346\245\321\302o\252i\276\271\252\272\246U\255\323\260\321\274\306\244@\244@\277\351\244J\247A\255n\252\272\300W\261a\275d\263\362"), NULL);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (specification_on), TRUE);

  coefficient_on = gtk_radio_button_new_with_label (_1_group, _("\260\262\263]\244\247\253Y\274\306\261a\244J\302\340\262\276\250\347\246\241"));
  _1_group = gtk_radio_button_group (GTK_RADIO_BUTTON (coefficient_on));
  gtk_widget_ref (coefficient_on);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "coefficient_on", coefficient_on,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (coefficient_on);
  gtk_box_pack_start (GTK_BOX (hbox9), coefficient_on, FALSE, FALSE, 5);
  gtk_tooltips_set_tip (tooltips, coefficient_on, _("\247A\245i\245H\245\321\265\352\300\300\244@\255\323\302\340\262\276\250\347\274\306\252\272\253Y\274\306\250\323\261o\250\354\247A\255n\252\272\300W\303\320\271\317\241A\265\245\250\354\271\272\245X\250\323\252\272\256\311\255\324\241A\246A\245h\255\327\245\277\247A\252\272\253Y\274\306\241A\244]\254O\244@\272\330\244\350\252k"), NULL);

  hseparator3 = gtk_hseparator_new ();
  gtk_widget_ref (hseparator3);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hseparator3", hseparator3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator3);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator3, TRUE, TRUE, 5);

  hbox6 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox6);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox6", hbox6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox6);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox6, TRUE, TRUE, 5);

  label11 = gtk_label_new (_("\302o\252i\276\271\251\372\262\323\263W\256\346\241G"));
  gtk_widget_ref (label11);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label11", label11,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label11);
  gtk_box_pack_start (GTK_BOX (hbox6), label11, FALSE, FALSE, 5);

  move_average = gtk_radio_button_new_with_label (_2_group, _("FIR\241G\262\276\260\312\245\255\247\241\302o\252i\276\271"));
  _2_group = gtk_radio_button_group (GTK_RADIO_BUTTON (move_average));
  gtk_widget_ref (move_average);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "move_average", move_average,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (move_average);
  gtk_box_pack_start (GTK_BOX (hbox6), move_average, FALSE, FALSE, 0);

  window = gtk_radio_button_new_with_label (_2_group, _("FIR\241G\265\370\265\241\302o\252i\276\271"));
  _2_group = gtk_radio_button_group (GTK_RADIO_BUTTON (window));
  gtk_widget_ref (window);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "window", window,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (window);
  gtk_box_pack_start (GTK_BOX (hbox6), window, FALSE, FALSE, 0);

  butterworth = gtk_radio_button_new_with_label (_2_group, _("IIR\241G\245\244\252o\255\310\261o\302o\252i\276\271"));
  _2_group = gtk_radio_button_group (GTK_RADIO_BUTTON (butterworth));
  gtk_widget_ref (butterworth);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "butterworth", butterworth,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (butterworth);
  gtk_box_pack_start (GTK_BOX (hbox6), butterworth, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, butterworth, _("\250\344\271\352\264N\254O\244\332\257S\250U\264\376\260\325\241I"), NULL);

  chebyshev = gtk_radio_button_new_with_label (_2_group, _("IIR\241G\253\264\244\361\263\267\244\322\302o\252i\276\271"));
  _2_group = gtk_radio_button_group (GTK_RADIO_BUTTON (chebyshev));
  gtk_widget_ref (chebyshev);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "chebyshev", chebyshev,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (chebyshev);
  gtk_box_pack_start (GTK_BOX (hbox6), chebyshev, FALSE, FALSE, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chebyshev), TRUE);

  hbox8 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox8);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox8", hbox8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox8);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox8, TRUE, TRUE, 5);

  fs_label = gtk_label_new (_("\250\372\274\313\300W\262v"));
  gtk_widget_ref (fs_label);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "fs_label", fs_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fs_label);
  gtk_box_pack_start (GTK_BOX (hbox8), fs_label, FALSE, FALSE, 10);

  fs = gtk_entry_new ();
  gtk_widget_ref (fs);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "fs", fs,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fs);
  gtk_box_pack_start (GTK_BOX (hbox8), fs, TRUE, TRUE, 0);
  gtk_widget_set_usize (fs, 1, -2);
  gtk_tooltips_set_tip (tooltips, fs, _("\263\346\246\354\254\260\273\256\257\367"), NULL);
  gtk_entry_set_text (GTK_ENTRY (fs), _("20000"));

  pass_edge_label = gtk_label_new (_("\263q\261a\272I\244\356\300W\262v"));
  gtk_widget_ref (pass_edge_label);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "pass_edge_label", pass_edge_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pass_edge_label);
  gtk_box_pack_start (GTK_BOX (hbox8), pass_edge_label, FALSE, FALSE, 10);

  pass_edge = gtk_entry_new ();
  gtk_widget_ref (pass_edge);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "pass_edge", pass_edge,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pass_edge);
  gtk_box_pack_start (GTK_BOX (hbox8), pass_edge, TRUE, TRUE, 0);
  gtk_widget_set_usize (pass_edge, 1, -2);
  gtk_tooltips_set_tip (tooltips, pass_edge, _("\263\346\246\354\254\260\273\256\257\367"), NULL);
  gtk_entry_set_text (GTK_ENTRY (pass_edge), _("5000"));

  stop_edge_label = gtk_label_new (_("\244\356\261a\272I\244\356\300W\262v"));
  gtk_widget_ref (stop_edge_label);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "stop_edge_label", stop_edge_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (stop_edge_label);
  gtk_box_pack_start (GTK_BOX (hbox8), stop_edge_label, FALSE, FALSE, 10);

  stop_edge = gtk_entry_new ();
  gtk_widget_ref (stop_edge);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "stop_edge", stop_edge,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (stop_edge);
  gtk_box_pack_start (GTK_BOX (hbox8), stop_edge, TRUE, TRUE, 0);
  gtk_widget_set_usize (stop_edge, 1, -2);
  gtk_tooltips_set_tip (tooltips, stop_edge, _("\263\346\246\354\254\260\273\256\257\367"), NULL);
  gtk_entry_set_text (GTK_ENTRY (stop_edge), _("7500"));

  pass_ripple_label = gtk_label_new (_("\263q\261a\272\247\252i"));
  gtk_widget_ref (pass_ripple_label);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "pass_ripple_label", pass_ripple_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pass_ripple_label);
  gtk_box_pack_start (GTK_BOX (hbox8), pass_ripple_label, FALSE, FALSE, 10);

  pass_ripple = gtk_entry_new ();
  gtk_widget_ref (pass_ripple);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "pass_ripple", pass_ripple,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (pass_ripple);
  gtk_box_pack_start (GTK_BOX (hbox8), pass_ripple, TRUE, TRUE, 0);
  gtk_widget_set_usize (pass_ripple, 1, -2);
  gtk_tooltips_set_tip (tooltips, pass_ripple, _("\263\346\246\354\254\260\244\300\250\251\274W\257q"), NULL);
  gtk_entry_set_text (GTK_ENTRY (pass_ripple), _("1"));

  stop_ripple_label = gtk_label_new (_("\244\356\261a\272\247\252i"));
  gtk_widget_ref (stop_ripple_label);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "stop_ripple_label", stop_ripple_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (stop_ripple_label);
  gtk_box_pack_start (GTK_BOX (hbox8), stop_ripple_label, FALSE, FALSE, 10);

  stop_ripple = gtk_entry_new ();
  gtk_widget_ref (stop_ripple);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "stop_ripple", stop_ripple,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (stop_ripple);
  gtk_box_pack_start (GTK_BOX (hbox8), stop_ripple, TRUE, TRUE, 10);
  gtk_widget_set_usize (stop_ripple, 1, -2);
  gtk_tooltips_set_tip (tooltips, stop_ripple, _("\263\346\246\354\254\260\244\300\250\251\274W\257q"), NULL);
  gtk_entry_set_text (GTK_ENTRY (stop_ripple), _("32"));

  hseparator2 = gtk_hseparator_new ();
  gtk_widget_ref (hseparator2);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hseparator2", hseparator2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hseparator2);
  gtk_box_pack_start (GTK_BOX (vbox1), hseparator2, TRUE, TRUE, 5);

  hbox10 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox10);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox10", hbox10,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox10);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox10, TRUE, TRUE, 5);

  label12 = gtk_label_new (_("\260\262\263]\244\247\253Y\274\306\261a\244J\302\340\262\276\250\347\246\241\241G"));
  gtk_widget_ref (label12);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label12", label12,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label12);
  gtk_box_pack_start (GTK_BOX (hbox10), label12, FALSE, FALSE, 5);

  fir_input_coefficient = gtk_radio_button_new_with_label (_3_group, _("\246\263\255\255\257\337\275\304 FIR \302o\252i\276\271"));
  _3_group = gtk_radio_button_group (GTK_RADIO_BUTTON (fir_input_coefficient));
  gtk_widget_ref (fir_input_coefficient);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "fir_input_coefficient", fir_input_coefficient,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fir_input_coefficient);
  gtk_box_pack_start (GTK_BOX (hbox10), fir_input_coefficient, FALSE, FALSE, 10);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fir_input_coefficient), TRUE);

  iir_input_coefficient = gtk_radio_button_new_with_label (_3_group, _("\265L\255\255\257\337\275\304 IIR \302o\252i\276\271"));
  _3_group = gtk_radio_button_group (GTK_RADIO_BUTTON (iir_input_coefficient));
  gtk_widget_ref (iir_input_coefficient);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "iir_input_coefficient", iir_input_coefficient,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (iir_input_coefficient);
  gtk_box_pack_start (GTK_BOX (hbox10), iir_input_coefficient, FALSE, FALSE, 10);

  identify_stability = gtk_button_new_with_label (_("IIR \302o\252i\276\271\303\255\251w\253\327\305\262\251w(\245\274\247\271\246\250)"));
  gtk_widget_ref (identify_stability);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "identify_stability", identify_stability,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (identify_stability);
  gtk_box_pack_start (GTK_BOX (hbox10), identify_stability, FALSE, FALSE, 10);
  gtk_tooltips_set_tip (tooltips, identify_stability, _("\246]\254\260\247A\252\272\302\340\262\276\250\347\274\306\254O\260\262\263]\252\272\255\310\241A\251\322\245H\303\255\244\243\303\255\251w\247A\244]\244\243\275T\251w\241A\246\271\266s\245i\245H\247P\302_\244@\244U\241A\246]\254\260 FIR \244@\251w\254O\303\255\251w\252\272\241A\251\322\245H\244\243\245\316\264\372\244F\241C"), NULL);

  hbox14 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox14);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox14", hbox14,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox14);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox14, TRUE, TRUE, 5);

  label16 = gtk_label_new (_("\302\340\262\276\250\347\274\306\244\300\245\300 Y( n ) "));
  gtk_widget_ref (label16);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label16", label16,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label16);
  gtk_box_pack_start (GTK_BOX (hbox14), label16, FALSE, FALSE, 10);

  a_value = gtk_entry_new ();
  gtk_widget_ref (a_value);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "a_value", a_value,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (a_value);
  gtk_box_pack_start (GTK_BOX (hbox14), a_value, TRUE, TRUE, 10);
  gtk_widget_set_usize (a_value, 1, -2);
  gtk_tooltips_set_tip (tooltips, a_value, _("\264N\254O\302\340\262\276\250\347\274\306\244\244\252\272\244\300\245\300\263\241\245\367\241A\267\355\265M\263o\245u\246\263 IIR \244~\267|\246\263\252\272"), NULL);
  gtk_entry_set_text (GTK_ENTRY (a_value), _("1 -0.7757"));

  label17 = gtk_label_new (_("\302\340\262\276\250\347\274\306\244\300\244l X( n )"));
  gtk_widget_ref (label17);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "label17", label17,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label17);
  gtk_box_pack_start (GTK_BOX (hbox14), label17, FALSE, FALSE, 10);

  b_value = gtk_entry_new ();
  gtk_widget_ref (b_value);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "b_value", b_value,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (b_value);
  gtk_box_pack_start (GTK_BOX (hbox14), b_value, TRUE, TRUE, 10);
  gtk_widget_set_usize (b_value, 1, -2);
  gtk_entry_set_text (GTK_ENTRY (b_value), _("4.7 2.2 3.6 2.2 4.7"));

  appbar1 = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
  gtk_widget_ref (appbar1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "appbar1", appbar1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (appbar1);
  gtk_box_pack_start (GTK_BOX (vbox1), appbar1, TRUE, TRUE, 0);

  hbox28 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox28);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "hbox28", hbox28,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox28);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox28, TRUE, TRUE, 0);

  statusbar1 = gtk_statusbar_new ();
  gtk_widget_ref (statusbar1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "statusbar1", statusbar1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (statusbar1);
  gtk_box_pack_start (GTK_BOX (hbox28), statusbar1, FALSE, FALSE, 0);
  gtk_widget_set_usize (statusbar1, 629, -2);

  progressbar1 = gtk_progress_bar_new ();
  gtk_widget_ref (progressbar1);
  gtk_object_set_data_full (GTK_OBJECT (rs232), "progressbar1", progressbar1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (progressbar1);
  gtk_box_pack_start (GTK_BOX (hbox28), progressbar1, FALSE, FALSE, 0);
  gtk_progress_set_show_text (GTK_PROGRESS (progressbar1), TRUE);
  gtk_progress_set_format_string (GTK_PROGRESS (progressbar1), _("%P %% \247\271\246\250"));

  gtk_signal_connect (GTK_OBJECT (rs232), "delete_event",
                      GTK_SIGNAL_FUNC (on_rs232_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (rs232), "show",
                      GTK_SIGNAL_FUNC (on_rs232_show),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (exit), "clicked",
                      GTK_SIGNAL_FUNC (on_exit_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (swap), "clicked",
                      GTK_SIGNAL_FUNC (on_swap_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (clean_data_area), "clicked",
                      GTK_SIGNAL_FUNC (on_clean_data_area_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo_entry_baudrate), "changed",
                      GTK_SIGNAL_FUNC (on_combo_entry_baudrate_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (combo_entry_port), "changed",
                      GTK_SIGNAL_FUNC (on_combo_entry_port_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (save_as_numeral), "clicked",
                      GTK_SIGNAL_FUNC (on_save_as_numeral_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (spectrum), "clicked",
                      GTK_SIGNAL_FUNC (on_spectrum_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (inspect), "clicked",
                      GTK_SIGNAL_FUNC (on_inspect_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (print_spectrum), "toggled",
                      GTK_SIGNAL_FUNC (on_print_spectrum_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (save_as_eps), "clicked",
                      GTK_SIGNAL_FUNC (on_save_as_eps_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (specification_on), "clicked",
                      GTK_SIGNAL_FUNC (on_specification_on_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (coefficient_on), "clicked",
                      GTK_SIGNAL_FUNC (on_coefficient_on_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (move_average), "clicked",
                      GTK_SIGNAL_FUNC (on_move_average_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (window), "clicked",
                      GTK_SIGNAL_FUNC (on_window_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (butterworth), "clicked",
                      GTK_SIGNAL_FUNC (on_butterworth_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (chebyshev), "clicked",
                      GTK_SIGNAL_FUNC (on_chebyshev_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (fir_input_coefficient), "clicked",
                      GTK_SIGNAL_FUNC (on_fir_input_coefficient_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (iir_input_coefficient), "clicked",
                      GTK_SIGNAL_FUNC (on_iir_input_coefficient_clicked),
                      NULL);

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

  gtk_window_add_accel_group (GTK_WINDOW (rs232), accel_group);

  return rs232;
}
Beispiel #5
0
GtkWidget*
create_app (void)
{
  GtkWidget *app;
  GtkWidget *dock1;
  GtkWidget *toolbar1;
  GtkWidget *tmp_toolbar_icon;
  GtkWidget *button_new;
  GtkWidget *button_open;
  GtkWidget *button_save;
  GtkWidget *button_save_as;
  GtkWidget *hexentry;
  GtkWidget *button_upload;
  GtkWidget *radiobutton_spline;
  GtkWidget *radiobutton_linear;
  GtkWidget *radiobutton_free;
  GtkWidget *vbox1;
  GtkWidget *hbox1;
  GtkWidget *vbox2;
  GtkWidget *table1;
  GtkWidget *label1;
  GtkWidget *label2;
  GtkWidget *label3;
  GtkWidget *label4;
  GtkWidget *label5;
  GtkWidget *label6;
  GtkObject *minx_adj;
  GtkWidget *minx;
  GtkWidget *type;
  GList *type_items = NULL;
  GtkWidget *typeentry;
  GtkObject *maxx_adj;
  GtkWidget *maxx;
  GtkObject *miny_adj;
  GtkWidget *miny;
  GtkObject *maxy_adj;
  GtkWidget *maxy;
  GtkObject *count_adj;
  GtkWidget *count;
  GtkWidget *label10;
  GtkWidget *label11;
  GtkWidget *label12;
  GtkObject *scale_adj;
  GtkWidget *scale;
  GtkObject *base_adj;
  GtkWidget *base;
  GtkWidget *label13;
  GtkWidget *scrolledwindow1;
  GtkWidget *clist;
  GtkWidget *label8;
  GtkWidget *label9;
  GtkWidget *toolbar2;
  GtkWidget *list_open;
  GtkWidget *list_save;
  GtkWidget *list_add;
  GtkWidget *list_remove;
  GtkWidget *list_use;
  GtkWidget *curve;
  GtkWidget *appbar1;

  app = gnome_app_new ("Curvegen", _("PSXDEV Curve Generator"));
  gtk_object_set_data (GTK_OBJECT (app), "app", app);

  dock1 = GNOME_APP (app)->dock;
  gtk_widget_ref (dock1);
  gtk_object_set_data_full (GTK_OBJECT (app), "dock1", dock1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dock1);

  gnome_app_create_menus (GNOME_APP (app), menubar1_uiinfo);

  gtk_widget_ref (menubar1_uiinfo[0].widget);
  gtk_object_set_data_full (GTK_OBJECT (app), "file1",
                            menubar1_uiinfo[0].widget,
                            (GtkDestroyNotify) gtk_widget_unref);

  gtk_widget_ref (file1_menu_uiinfo[0].widget);
  gtk_object_set_data_full (GTK_OBJECT (app), "exit1",
                            file1_menu_uiinfo[0].widget,
                            (GtkDestroyNotify) gtk_widget_unref);

  gtk_widget_ref (menubar1_uiinfo[1].widget);
  gtk_object_set_data_full (GTK_OBJECT (app), "help1",
                            menubar1_uiinfo[1].widget,
                            (GtkDestroyNotify) gtk_widget_unref);

  gtk_widget_ref (help1_menu_uiinfo[0].widget);
  gtk_object_set_data_full (GTK_OBJECT (app), "about1",
                            help1_menu_uiinfo[0].widget,
                            (GtkDestroyNotify) gtk_widget_unref);

  toolbar1 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
  gtk_widget_ref (toolbar1);
  gtk_object_set_data_full (GTK_OBJECT (app), "toolbar1", toolbar1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (toolbar1);
  gnome_app_add_toolbar (GNOME_APP (app), GTK_TOOLBAR (toolbar1), "toolbar1",
                                GNOME_DOCK_ITEM_BEH_EXCLUSIVE,
                                GNOME_DOCK_TOP, 1, 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (toolbar1), 1);
  gtk_toolbar_set_space_size (GTK_TOOLBAR (toolbar1), 16);
  gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_SPACE_LINE);
  gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar1), GTK_RELIEF_NONE);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_NEW);
  button_new = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("New"),
                                _("New File"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (button_new);
  gtk_object_set_data_full (GTK_OBJECT (app), "button_new", button_new,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_new);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_OPEN);
  button_open = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Open"),
                                _("Open File"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (button_open);
  gtk_object_set_data_full (GTK_OBJECT (app), "button_open", button_open,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_open);
  gtk_widget_set_sensitive (button_open, FALSE);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_SAVE);
  button_save = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Save"),
                                _("Save File"), NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (button_save);
  gtk_object_set_data_full (GTK_OBJECT (app), "button_save", button_save,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_save);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_SAVE_AS);
  button_save_as = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Save As"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (button_save_as);
  gtk_object_set_data_full (GTK_OBJECT (app), "button_save_as", button_save_as,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_save_as);

  hexentry = gtk_entry_new ();
  gtk_widget_ref (hexentry);
  gtk_object_set_data_full (GTK_OBJECT (app), "hexentry", hexentry,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hexentry);
  gtk_toolbar_append_widget (GTK_TOOLBAR (toolbar1), hexentry, _("Address of curve in PlayStation memory..."), NULL);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_MAIL_FWD);
  button_upload = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Upload"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (button_upload);
  gtk_object_set_data_full (GTK_OBJECT (app), "button_upload", button_upload,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (button_upload);

  gtk_toolbar_append_space (GTK_TOOLBAR (toolbar1));

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_CONVERT);
  radiobutton_spline = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                NULL,
                                _("SPLINE"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (radiobutton_spline);
  gtk_object_set_data_full (GTK_OBJECT (app), "radiobutton_spline", radiobutton_spline,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton_spline);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (radiobutton_spline), FALSE);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_CONVERT);
  radiobutton_linear = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                radiobutton_spline,
                                _("LINEAR"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (radiobutton_linear);
  gtk_object_set_data_full (GTK_OBJECT (app), "radiobutton_linear", radiobutton_linear,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton_linear);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (radiobutton_linear), FALSE);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_CONVERT);
  radiobutton_free = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
                                GTK_TOOLBAR_CHILD_RADIOBUTTON,
                                radiobutton_spline,
                                _("FREE"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (radiobutton_free);
  gtk_object_set_data_full (GTK_OBJECT (app), "radiobutton_free", radiobutton_free,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (radiobutton_free);
  gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (radiobutton_free), FALSE);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_ref (vbox1);
  gtk_object_set_data_full (GTK_OBJECT (app), "vbox1", vbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox1);
  gnome_app_set_contents (GNOME_APP (app), vbox1);

  hbox1 = gtk_hbox_new (FALSE, 0);
  gtk_widget_ref (hbox1);
  gtk_object_set_data_full (GTK_OBJECT (app), "hbox1", hbox1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);

  vbox2 = gtk_vbox_new (FALSE, 0);
  gtk_widget_ref (vbox2);
  gtk_object_set_data_full (GTK_OBJECT (app), "vbox2", vbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox2);
  gtk_box_pack_start (GTK_BOX (hbox1), vbox2, FALSE, TRUE, 0);

  table1 = gtk_table_new (10, 2, FALSE);
  gtk_widget_ref (table1);
  gtk_object_set_data_full (GTK_OBJECT (app), "table1", table1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (vbox2), table1, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (table1), 4);
  gtk_table_set_row_spacings (GTK_TABLE (table1), 1);
  gtk_table_set_col_spacings (GTK_TABLE (table1), 2);

  label1 = gtk_label_new (_("Min X"));
  gtk_widget_ref (label1);
  gtk_object_set_data_full (GTK_OBJECT (app), "label1", label1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label1);
  gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label1), 7.45058e-09, 0.5);

  label2 = gtk_label_new (_("Max X"));
  gtk_widget_ref (label2);
  gtk_object_set_data_full (GTK_OBJECT (app), "label2", label2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label2);
  gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label2), 7.45058e-09, 0.5);

  label3 = gtk_label_new (_("Min Y"));
  gtk_widget_ref (label3);
  gtk_object_set_data_full (GTK_OBJECT (app), "label3", label3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label3);
  gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label3), 7.45058e-09, 0.5);

  label4 = gtk_label_new (_("Max Y"));
  gtk_widget_ref (label4);
  gtk_object_set_data_full (GTK_OBJECT (app), "label4", label4,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label4);
  gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label4), 7.45058e-09, 0.5);

  label5 = gtk_label_new (_("Count"));
  gtk_widget_ref (label5);
  gtk_object_set_data_full (GTK_OBJECT (app), "label5", label5,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label5);
  gtk_table_attach (GTK_TABLE (table1), label5, 0, 1, 8, 9,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);

  label6 = gtk_label_new (_("Type"));
  gtk_widget_ref (label6);
  gtk_object_set_data_full (GTK_OBJECT (app), "label6", label6,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label6);
  gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 9, 10,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);

  minx_adj = gtk_adjustment_new (0, -1e+13, 1e+13, 1, 10, 10);
  minx = gtk_spin_button_new (GTK_ADJUSTMENT (minx_adj), 1, 4);
  gtk_widget_ref (minx);
  gtk_object_set_data_full (GTK_OBJECT (app), "minx", minx,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (minx);
  gtk_table_attach (GTK_TABLE (table1), minx, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (minx), TRUE);

  type = gtk_combo_new ();
  gtk_widget_ref (type);
  gtk_object_set_data_full (GTK_OBJECT (app), "type", type,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (type);
  gtk_table_attach (GTK_TABLE (table1), type, 1, 2, 9, 10,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_combo_set_value_in_list (GTK_COMBO (type), TRUE, FALSE);
  gtk_combo_set_use_arrows_always (GTK_COMBO (type), TRUE);
  type_items = g_list_append (type_items, _("u_char"));
  type_items = g_list_append (type_items, _("char"));
  type_items = g_list_append (type_items, _("u_short"));
  type_items = g_list_append (type_items, _("short"));
  type_items = g_list_append (type_items, _("u_long"));
  type_items = g_list_append (type_items, _("long"));
  type_items = g_list_append (type_items, _("float"));
  type_items = g_list_append (type_items, _("double"));
  type_items = g_list_append (type_items, _("fixed (4+12)"));
  gtk_combo_set_popdown_strings (GTK_COMBO (type), type_items);
  g_list_free (type_items);

  typeentry = GTK_COMBO (type)->entry;
  gtk_widget_ref (typeentry);
  gtk_object_set_data_full (GTK_OBJECT (app), "typeentry", typeentry,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (typeentry);
  gtk_entry_set_editable (GTK_ENTRY (typeentry), FALSE);
  gtk_entry_set_text (GTK_ENTRY (typeentry), _("u_char"));

  maxx_adj = gtk_adjustment_new (1, -1e+13, 1e+13, 1, 10, 10);
  maxx = gtk_spin_button_new (GTK_ADJUSTMENT (maxx_adj), 1, 4);
  gtk_widget_ref (maxx);
  gtk_object_set_data_full (GTK_OBJECT (app), "maxx", maxx,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (maxx);
  gtk_table_attach (GTK_TABLE (table1), maxx, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (maxx), TRUE);

  miny_adj = gtk_adjustment_new (0, -1e+13, 1e+13, 1, 10, 10);
  miny = gtk_spin_button_new (GTK_ADJUSTMENT (miny_adj), 1, 4);
  gtk_widget_ref (miny);
  gtk_object_set_data_full (GTK_OBJECT (app), "miny", miny,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (miny);
  gtk_table_attach (GTK_TABLE (table1), miny, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (miny), TRUE);

  maxy_adj = gtk_adjustment_new (1, -1e+13, 1e+13, 1, 10, 10);
  maxy = gtk_spin_button_new (GTK_ADJUSTMENT (maxy_adj), 1, 4);
  gtk_widget_ref (maxy);
  gtk_object_set_data_full (GTK_OBJECT (app), "maxy", maxy,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (maxy);
  gtk_table_attach (GTK_TABLE (table1), maxy, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (maxy), TRUE);

  count_adj = gtk_adjustment_new (1, 1, 1e+22, 1, 10, 10);
  count = gtk_spin_button_new (GTK_ADJUSTMENT (count_adj), 1, 0);
  gtk_widget_ref (count);
  gtk_object_set_data_full (GTK_OBJECT (app), "count", count,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (count);
  gtk_table_attach (GTK_TABLE (table1), count, 1, 2, 8, 9,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label10 = gtk_label_new (_("Curve Interval:"));
  gtk_widget_ref (label10);
  gtk_object_set_data_full (GTK_OBJECT (app), "label10", label10,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label10);
  gtk_table_attach (GTK_TABLE (table1), label10, 0, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label10), 7.45058e-09, 0.5);

  label11 = gtk_label_new (_("Datatype:"));
  gtk_widget_ref (label11);
  gtk_object_set_data_full (GTK_OBJECT (app), "label11", label11,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label11);
  gtk_table_attach (GTK_TABLE (table1), label11, 0, 2, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label11), 7.45058e-09, 0.5);

  label12 = gtk_label_new (_("Scale"));
  gtk_widget_ref (label12);
  gtk_object_set_data_full (GTK_OBJECT (app), "label12", label12,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label12);
  gtk_table_attach (GTK_TABLE (table1), label12, 0, 1, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);

  scale_adj = gtk_adjustment_new (1, 1, 1e+22, 1, 10, 10);
  scale = gtk_spin_button_new (GTK_ADJUSTMENT (scale_adj), 1, 0);
  gtk_widget_ref (scale);
  gtk_object_set_data_full (GTK_OBJECT (app), "scale", scale,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scale);
  gtk_table_attach (GTK_TABLE (table1), scale, 1, 2, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  base_adj = gtk_adjustment_new (0, 0, 1e+22, 1, 10, 10);
  base = gtk_spin_button_new (GTK_ADJUSTMENT (base_adj), 1, 0);
  gtk_widget_ref (base);
  gtk_object_set_data_full (GTK_OBJECT (app), "base", base,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (base);
  gtk_table_attach (GTK_TABLE (table1), base, 1, 2, 7, 8,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label13 = gtk_label_new (_("Base"));
  gtk_widget_ref (label13);
  gtk_object_set_data_full (GTK_OBJECT (app), "label13", label13,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label13);
  gtk_table_attach (GTK_TABLE (table1), label13, 0, 1, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_ref (scrolledwindow1);
  gtk_object_set_data_full (GTK_OBJECT (app), "scrolledwindow1", scrolledwindow1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scrolledwindow1);
  gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow1, TRUE, TRUE, 0);
  gtk_widget_set_sensitive (scrolledwindow1, FALSE);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

  clist = gtk_clist_new (2);
  gtk_widget_ref (clist);
  gtk_object_set_data_full (GTK_OBJECT (app), "clist", clist,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (clist);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), clist);
  gtk_clist_set_column_width (GTK_CLIST (clist), 0, 28);
  gtk_clist_set_column_width (GTK_CLIST (clist), 1, 80);
  gtk_clist_column_titles_show (GTK_CLIST (clist));

  label8 = gtk_label_new (_("Type"));
  gtk_widget_ref (label8);
  gtk_object_set_data_full (GTK_OBJECT (app), "label8", label8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label8);
  gtk_clist_set_column_widget (GTK_CLIST (clist), 0, label8);

  label9 = gtk_label_new (_("Name"));
  gtk_widget_ref (label9);
  gtk_object_set_data_full (GTK_OBJECT (app), "label9", label9,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (label9);
  gtk_clist_set_column_widget (GTK_CLIST (clist), 1, label9);

  toolbar2 = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
  gtk_widget_ref (toolbar2);
  gtk_object_set_data_full (GTK_OBJECT (app), "toolbar2", toolbar2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (toolbar2);
  gtk_box_pack_start (GTK_BOX (vbox2), toolbar2, FALSE, FALSE, 0);
  gtk_widget_set_sensitive (toolbar2, FALSE);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_OPEN);
  list_open = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Open"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (list_open);
  gtk_object_set_data_full (GTK_OBJECT (app), "list_open", list_open,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (list_open);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_SAVE);
  list_save = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Save"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (list_save);
  gtk_object_set_data_full (GTK_OBJECT (app), "list_save", list_save,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (list_save);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_ADD);
  list_add = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Add"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (list_add);
  gtk_object_set_data_full (GTK_OBJECT (app), "list_add", list_add,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (list_add);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_REMOVE);
  list_remove = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Remove"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (list_remove);
  gtk_object_set_data_full (GTK_OBJECT (app), "list_remove", list_remove,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (list_remove);

  tmp_toolbar_icon = gnome_stock_pixmap_widget (app, GNOME_STOCK_PIXMAP_EXEC);
  list_use = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar2),
                                GTK_TOOLBAR_CHILD_BUTTON,
                                NULL,
                                _("Use"),
                                NULL, NULL,
                                tmp_toolbar_icon, NULL, NULL);
  gtk_widget_ref (list_use);
  gtk_object_set_data_full (GTK_OBJECT (app), "list_use", list_use,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (list_use);

  curve = gtk_curve_new ();
  gtk_widget_ref (curve);
  gtk_object_set_data_full (GTK_OBJECT (app), "curve", curve,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (curve);
  gtk_box_pack_start (GTK_BOX (hbox1), curve, TRUE, TRUE, 0);
  gtk_widget_set_usize (curve, 256, 256);
  gtk_curve_set_range (GTK_CURVE (curve), 0, 1, 0, 1);

  appbar1 = gnome_appbar_new (FALSE, TRUE, GNOME_PREFERENCES_NEVER);
  gtk_widget_ref (appbar1);
  gtk_object_set_data_full (GTK_OBJECT (app), "appbar1", appbar1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (appbar1);
  gnome_app_set_statusbar (GNOME_APP (app), appbar1);

  gtk_signal_connect (GTK_OBJECT (app), "delete_event",
                      GTK_SIGNAL_FUNC (on_app_delete_event),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_new), "clicked",
                      GTK_SIGNAL_FUNC (on_button_new_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_open), "clicked",
                      GTK_SIGNAL_FUNC (on_button_open_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_save), "clicked",
                      GTK_SIGNAL_FUNC (on_button_save_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_save_as), "clicked",
                      GTK_SIGNAL_FUNC (on_button_save_as_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (button_upload), "clicked",
                      GTK_SIGNAL_FUNC (on_button_upload_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (radiobutton_spline), "clicked",
                      GTK_SIGNAL_FUNC (on_radiobutton_spline_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (radiobutton_linear), "clicked",
                      GTK_SIGNAL_FUNC (on_radiobutton_linear_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (radiobutton_free), "clicked",
                      GTK_SIGNAL_FUNC (on_radiobutton_free_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (minx), "changed",
                      GTK_SIGNAL_FUNC (on_minx_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (maxx), "changed",
                      GTK_SIGNAL_FUNC (on_maxx_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (miny), "changed",
                      GTK_SIGNAL_FUNC (on_miny_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (maxy), "changed",
                      GTK_SIGNAL_FUNC (on_maxy_changed),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (list_open), "clicked",
                      GTK_SIGNAL_FUNC (on_list_open_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (list_save), "clicked",
                      GTK_SIGNAL_FUNC (on_list_save_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (list_add), "clicked",
                      GTK_SIGNAL_FUNC (on_list_add_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (list_remove), "clicked",
                      GTK_SIGNAL_FUNC (on_list_remove_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (list_use), "clicked",
                      GTK_SIGNAL_FUNC (on_list_use_clicked),
                      NULL);

  return app;
}
Beispiel #6
0
static void main_window_create_appbar(void)
{
	main_window.appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
	gtk_widget_show (main_window.appbar);
	gnome_app_set_statusbar (GNOME_APP (main_window.window), main_window.appbar);
}
Beispiel #7
0
static void
create_app_helper (GtkWidget *widget, gpointer data)
{
	GtkWidget *app;
	GtkWidget *vbox;
	GtkWidget *frame;
	GtkWidget *vbox2;
	GtkWidget *w;
	GtkWidget *popup;
        GnomeAppBar *bar;
	GnomeCanvasItem *item;

	app = gnome_app_new ("testGNOME", "GnomeAppHelper test");
	gnome_app_create_menus (GNOME_APP (app), helper_main_menu);
	gnome_app_create_toolbar (GNOME_APP (app), helper_toolbar);

        bar = GNOME_APPBAR(gnome_appbar_new(FALSE, TRUE, GNOME_PREFERENCES_USER));
        gnome_app_set_statusbar(GNOME_APP(app), GTK_WIDGET(bar));

        gnome_app_install_appbar_menu_hints(GNOME_APPBAR(bar), helper_main_menu);

	vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
	gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL);

	/* Shared popup menu */

	popup = gnome_popup_menu_new (helper_shared_popup);

	frame = gtk_frame_new ("Shared popup menu");
	gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
	gtk_widget_show (frame);

	vbox2 = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
	gtk_container_set_border_width (GTK_CONTAINER (vbox2), GNOME_PAD_SMALL);
	gtk_container_add (GTK_CONTAINER (frame), vbox2);
	gtk_widget_show (vbox2);

	w = gtk_entry_new ();
	gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, FALSE, 0);
	gtk_widget_show (w);
	gnome_popup_menu_attach (popup, w, w);
	
	w = gtk_entry_new ();
	gtk_box_pack_start (GTK_BOX (vbox2), w, FALSE, FALSE, 0);
	gtk_widget_show (w);
	gnome_popup_menu_attach (popup, w, w);

	/* Popup menu explicitly popped */

	popup = gnome_popup_menu_new (helper_explicit_popup);

	frame = gtk_frame_new ("Explicit popup menu");
	gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
	gtk_widget_show (frame);

	w = gnome_canvas_new ();
	gtk_widget_set_size_request ((w), 200, 100);
	gnome_canvas_set_scroll_region (GNOME_CANVAS (w), 0.0, 0.0, 200.0, 100.0);
	gtk_container_add (GTK_CONTAINER (frame), w);
	gtk_widget_show (w);

	g_signal_connect (w, "destroy",
			  G_CALLBACK (delete_event),
			  popup);

	item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (w)),
				      gnome_canvas_ellipse_get_type (),
				      "x1", 5.0,
				      "y1", 5.0,
				      "x2", 95.0,
				      "y2", 95.0,
				      "fill_color", "white",
				      "outline_color", "black",
				      NULL);
	g_signal_connect (item, "event",
			  G_CALLBACK (item_event),
			  popup);

	item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (w)),
				      gnome_canvas_ellipse_get_type (),
				      "x1", 105.0,
				      "y1", 0.0,
				      "x2", 195.0,
				      "y2", 95.0,
				      "fill_color", "white",
				      "outline_color", "black",
				      NULL);
	g_signal_connect (item, "event",
			  G_CALLBACK (item_event),
			  popup);

	gnome_app_set_contents (GNOME_APP (app), vbox);
	gtk_widget_show (app);
}
Beispiel #8
0
/**
 * @fn GtkWidget* create_mainwin (void)
 * Crea la ventana principal
 */
GtkWidget* create_mainwin (void)
{
	GtkWidget *app1;
	GtkWidget *dock1;
	GtkWidget *eventbox1;
	GtkWidget *viewport1;
	GtkWidget *vbox_main;
	GtkWidget *vbox_paned;
	GtkWidget *scrolledwindow;
	GtkWidget *paned;
	GtkWidget *text;
	GtkWidget *inputline;
	GtkWidget *sw;
	GtkWidget *ahbox;

	app1 = gnome_app_new ( PACKAGE, "Tenes Empanadas Graciela");
	gtk_object_set_data (GTK_OBJECT (app1), "app1", app1);
	gtk_window_set_default_size (GTK_WINDOW (app1), 664, 640);
	gtk_window_set_policy (GTK_WINDOW (app1), TRUE, TRUE, FALSE);

	dock1 = GNOME_APP (app1)->dock;
	gtk_widget_ref (dock1);
	gtk_object_set_data_full (GTK_OBJECT (app1), "dock1", dock1,
		(GtkDestroyNotify) gtk_widget_unref);
	gtk_widget_show (dock1);

	gnome_app_create_menus (GNOME_APP (app1), menubar_uiinfo);
	gnome_app_create_toolbar(GNOME_APP(app1), toolbar_main);

	/* TODO: ask in GNOME if this is wanted */
	/* gtk_menu_item_right_justify( GTK_MENU_ITEM(menubar_uiinfo[4].widget)); */

	gtk_widget_realize (app1);

	gtk_signal_connect ( GTK_OBJECT(app1), "destroy",
		GTK_SIGNAL_FUNC( on_exit_activate ), NULL );

	gtk_signal_connect ( GTK_OBJECT(app1), "delete_event",
		GTK_SIGNAL_FUNC( on_exit_activate ), NULL );


	SensiData.connect_button = toolbar_main[0].widget;
	SensiData.start_button = toolbar_main[1].widget;
	/* 2 is a separator */
	SensiData.enviarfichas_button = toolbar_main[3].widget;
	SensiData.reagrupe_button = toolbar_main[4].widget;
	SensiData.getcard_button = toolbar_main[5].widget;
	SensiData.endturn_button = toolbar_main[6].widget;
	/* 7 is a separator */
	SensiData.status_button = toolbar_main[8].widget;

	eventbox1 = gtk_event_box_new ();
	gtk_widget_ref (eventbox1);
	gtk_object_set_data_full (GTK_OBJECT (app1), "eventbox1", eventbox1,
		(GtkDestroyNotify) gtk_widget_unref);
	gtk_widget_show (eventbox1);
	gnome_app_set_contents (GNOME_APP (app1), eventbox1);

	viewport1 = gtk_viewport_new (NULL, NULL);
	gtk_widget_show (viewport1);
	gtk_container_add (GTK_CONTAINER (eventbox1), viewport1);

	vbox_main = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox_main);
	gtk_container_add (GTK_CONTAINER (viewport1), vbox_main);

	/* status map */
	if( mainstatus_create(&window_mainstatus) != TEG_STATUS_SUCCESS )
		goto error;
	gtk_box_pack_start( GTK_BOX(vbox_main), window_mainstatus, FALSE,FALSE,0);

	/* paned */
	paned = gtk_vpaned_new();
	gtk_box_pack_start( GTK_BOX( vbox_main ), paned, TRUE, TRUE, 0 );
	vbox_paned = gtk_vbox_new (FALSE, 0);
	gtk_paned_add1(GTK_PANED(paned), vbox_paned);
	gtk_widget_show (vbox_paned);

	/* map */
	scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
	gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scrolledwindow),
			GTK_POLICY_AUTOMATIC,
			GTK_POLICY_AUTOMATIC);
	gtk_widget_set_usize(scrolledwindow, 640, 394);

	if( canvas_create_map() != TEG_STATUS_SUCCESS )
		goto error;

	gtk_container_add(GTK_CONTAINER(scrolledwindow), canvas_map);
	gtk_container_add(GTK_CONTAINER(vbox_paned),scrolledwindow);
	gtk_widget_show (canvas_map);
	gtk_widget_show (scrolledwindow);


	/* text */
	ahbox = gtk_hbox_new(FALSE, 2);
	gtk_paned_pack2(GTK_PANED(paned), ahbox, TRUE, TRUE);

	sw = gtk_scrolled_window_new(NULL, NULL);

	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC,
					 GTK_POLICY_ALWAYS);
	gtk_box_pack_start(GTK_BOX(ahbox), sw, TRUE, TRUE, 0);

	gtk_widget_set_size_request(sw, 620, 60);

	text = gtk_text_view_new();
	gtk_text_view_set_editable(GTK_TEXT_VIEW(text), FALSE);
	gtk_container_add(GTK_CONTAINER(sw), text);

	gtk_widget_set_name(text, "chatline");

	gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
	gtk_widget_realize(text);
	gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text), 5);

	main_message_area = GTK_TEXT_VIEW(text);

/*	set_output_window_text(_("Tenes Empanadas Graciela")); */

	gtk_widget_show(text);
	gtk_widget_show(sw);
	gtk_widget_show(ahbox);
	gtk_widget_show(paned);

	/* the chat line */
	inputline = gtk_entry_new();
	gtk_box_pack_start( GTK_BOX( vbox_main ), inputline, FALSE, FALSE, 0 );
	gtk_widget_show(inputline);
	g_signal_connect(inputline, "activate", G_CALLBACK(inputline_return), NULL);


	chatline_init();


	/* status bar */
	statusbar = gnome_appbar_new (FALSE, TRUE, GNOME_PREFERENCES_NEVER);
	gtk_widget_ref (statusbar);
	gtk_object_set_data_full (GTK_OBJECT (app1), "statusbar", statusbar,
		(GtkDestroyNotify) gtk_widget_unref);
	gtk_widget_show (statusbar);
	gnome_app_set_statusbar (GNOME_APP (app1), statusbar);

	gtk_box_pack_start(GTK_BOX(statusbar),
		ministatus_build(), FALSE, TRUE, 0);


	gnome_appbar_set_status(GNOME_APPBAR(statusbar),
				_("Welcome to TEG!"));

	gnome_app_install_menu_hints( GNOME_APP(app1), menubar_uiinfo );

	/* icono */
	{
		GdkBitmap *mask;
		GdkPixmap *icono;
		#include "../teg_pix/teg_icono.xpm"
		gtk_widget_realize (app1);
		icono = gdk_pixmap_create_from_xpm_d( app1->window, &mask, &app1->style->bg[GTK_STATE_NORMAL],teg_icono_xpm );
		gdk_window_set_icon (app1->window, NULL, icono , mask );
	}

	gtk_widget_show(app1);
	return app1;

error:
	g_error(_("Unable to create map!"));
	return NULL;
}
Beispiel #9
0
GtkWidget* create_gifmain (void)
{
        GtkWidget *toolbar;
        GtkWidget *tmp_toolbar_icon;
        GtkWidget *butConnect,*butAdd, *butConf, *butOffline;
        GtkWidget *appbar;
        char pathname[MAX_PATH_LENGTH];

        gifmain = gnome_app_new ("gchat", "gchat");
        gtk_window_set_position (GTK_WINDOW (gifmain), GTK_WIN_POS_CENTER);
        gtk_window_set_default_size (GTK_WINDOW (gifmain), 205, 400);

        strcpy(pathname,COMMON_PATH_PREFIX);
        strcat(pathname,"client/pixmaps/icon.png");
        gtk_window_set_icon(GTK_WINDOW(gifmain), create_pixbuf(pathname));

        gnome_app_create_menus (GNOME_APP (gifmain), menubar_uiinfo);
        gtk_widget_set_sensitive (conn_menu_uiinfo[1].widget, FALSE);
        gtk_widget_set_sensitive (mnuContacts_menu_uiinfo[0].widget, FALSE);
        gtk_widget_set_sensitive (mnuContacts_menu_uiinfo[1].widget, FALSE);
        gtk_widget_set_sensitive (mnuContacts_menu_uiinfo[3].widget, FALSE);

        toolbar = gtk_toolbar_new ();
        gtk_widget_show (toolbar);
        gnome_app_add_toolbar (GNOME_APP (gifmain), GTK_TOOLBAR (toolbar), "toolbar",
                               BONOBO_DOCK_ITEM_BEH_EXCLUSIVE,
                               BONOBO_DOCK_TOP, 1, 0, 0);
        gtk_container_set_border_width (GTK_CONTAINER (toolbar), 1);
        gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH);

        tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-jump-to", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar)));
        butConnect = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                        GTK_TOOLBAR_CHILD_BUTTON,
                        NULL,
                        _("C_onn"),
                        _("Connect to the server"), NULL,
                        tmp_toolbar_icon, NULL, NULL);
        gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
        gtk_widget_show (butConnect);

        tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-add", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar)));
        butAdd = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                             GTK_TOOLBAR_CHILD_BUTTON,
                                             NULL,
                                             _("_Add"),
                                             _("Add new contacts"), NULL,
                                             tmp_toolbar_icon, NULL, NULL);
        gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
        gtk_widget_show (butAdd);
        gtk_widget_set_sensitive (butAdd, FALSE);

        tmp_toolbar_icon = gtk_image_new_from_stock ("gnome-stock-scores", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar)));
        butConf = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                                              GTK_TOOLBAR_CHILD_BUTTON,
                                              NULL,
                                              _("Con_f"),
                                              _("Make a conference"), NULL,
                                              tmp_toolbar_icon, NULL, NULL);
        gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
        gtk_widget_show (butConf);
        gtk_widget_set_sensitive (butConf, FALSE);

        tmp_toolbar_icon = gtk_image_new_from_stock ("gnome-stock-mail", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar)));
        butOffline = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
                        GTK_TOOLBAR_CHILD_BUTTON,
                        NULL,
                        _("Off_line"),
                        _("View offline messages"), NULL,
                        tmp_toolbar_icon, NULL, NULL);
        gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar)->children)->data))->label), TRUE);
        gtk_widget_show (butOffline);
        gtk_widget_set_sensitive (butOffline, FALSE);

        scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
        gtk_widget_show (scrolledwindow1);
        gnome_app_set_contents (GNOME_APP (gifmain), scrolledwindow1);
        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

        appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
        gtk_widget_show (appbar);
        gnome_app_set_statusbar (GNOME_APP (gifmain), appbar);

        gnome_app_install_menu_hints (GNOME_APP (gifmain), menubar_uiinfo);

        gtk_widget_show(gifmain);
        gtk_signal_connect (GTK_OBJECT (butConnect), "clicked", G_CALLBACK (on_Connect), NULL);
        gtk_signal_connect (GTK_OBJECT (butAdd), "clicked", G_CALLBACK (on_Add), NULL);
        gtk_signal_connect (GTK_OBJECT (butConf), "clicked", G_CALLBACK (on_butConf_clicked), NULL);
        gtk_signal_connect (GTK_OBJECT (butOffline), "clicked", G_CALLBACK (on_Offline), NULL);

        /* Store pointers to all widgets, for use by lookup_widget(). */
        GLADE_HOOKUP_OBJECT_NO_REF (gifmain, gifmain, "gifmain");
        GLADE_HOOKUP_OBJECT (gifmain, menubar_uiinfo[0].widget, "conn");
        GLADE_HOOKUP_OBJECT (gifmain, conn_menu_uiinfo[0].widget, "mnuConnect");
        GLADE_HOOKUP_OBJECT (gifmain, conn_menu_uiinfo[1].widget, "mnuDisconect");
        GLADE_HOOKUP_OBJECT (gifmain, conn_menu_uiinfo[2].widget, "separator1");
        GLADE_HOOKUP_OBJECT (gifmain, conn_menu_uiinfo[3].widget, "mnuQuit");
        GLADE_HOOKUP_OBJECT (gifmain, menubar_uiinfo[1].widget, "mnuContacts");
        GLADE_HOOKUP_OBJECT (gifmain, mnuContacts_menu_uiinfo[0].widget, "mnuAdd");
        GLADE_HOOKUP_OBJECT (gifmain, mnuContacts_menu_uiinfo[1].widget, "mnuDelete");
        GLADE_HOOKUP_OBJECT (gifmain, mnuContacts_menu_uiinfo[2].widget, "separator2");
        GLADE_HOOKUP_OBJECT (gifmain, mnuContacts_menu_uiinfo[3].widget, "mnuOffline");
        GLADE_HOOKUP_OBJECT (gifmain, menubar_uiinfo[2].widget, "mnuHelp");
        GLADE_HOOKUP_OBJECT (gifmain, mnuHelp_menu_uiinfo[0].widget, "mnuAbout");
        GLADE_HOOKUP_OBJECT (gifmain, toolbar, "toolbar");
        GLADE_HOOKUP_OBJECT (gifmain, butConnect, "butConnect");
        GLADE_HOOKUP_OBJECT (gifmain, butAdd, "butAdd");
        GLADE_HOOKUP_OBJECT (gifmain, butConf, "butConf");
        GLADE_HOOKUP_OBJECT (gifmain, butOffline, "butOffline");
        GLADE_HOOKUP_OBJECT (gifmain, scrolledwindow1, "scrolledwindow1");
        GLADE_HOOKUP_OBJECT (gifmain, appbar, "appbar");

        return gifmain;
}