Esempio n. 1
0
void GTKMusicBrowser::CreateToolbar(GtkWidget *vbox)
{
    toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL,
                                         GTK_TOOLBAR_BOTH);
    gtk_toolbar_set_button_relief(GTK_TOOLBAR(toolbar), GTK_RELIEF_NONE);
    gtk_toolbar_set_space_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_SPACE_LINE);

    gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "New Playlist",
                            "Start Editing a new Playlist",
                            "Toolbar/New", NewPixmap(new_pic),
                            GTK_SIGNAL_FUNC(new_plist_tool), this);

    gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Save Playlist",
                            "Save the Current Playlist to Disk",
                            "Toolbar/Save", NewPixmap(save_pic),
                            GTK_SIGNAL_FUNC(save_list_tool), this);

    gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));

    gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Import Items",
                            "Import a Playlist or Track into My Music",
                            "Toolbar/Import", NewPixmap(import_pic),
                            GTK_SIGNAL_FUNC(import_tool), this);

    toolRemove = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Remove Track",
                                         "Remove a Track from the Playlist",
                                         "Toolbar/Remove", NewPixmap(trash_pic),
                                         GTK_SIGNAL_FUNC(remove_tool), this);

    gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Edit",
                            "Edit a Track or Playlist",
                            "Toolbar/Edit", NewPixmap(edit_pic),
                            GTK_SIGNAL_FUNC(edit_tool), this);

    gtk_toolbar_append_space(GTK_TOOLBAR(toolbar));

    addTrack = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Add Items",
                            "Add Music from My Music to the Playlist",
                            "Toolbar/AddItem", NewPixmap(add_track_pic),
                            GTK_SIGNAL_FUNC(add_track_tool), this);

    addFile = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Add File",
                            "Add a File to the Playlist",
                            "Toolbar/Add", NewPixmap(add_file),
                            GTK_SIGNAL_FUNC(add_tool), this);

    toolUp = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Move Up",
                            "Move The Currently Selected Track in the Playlist Up",
                            "Toolbar/Up", NewPixmap(up_pic),
                            GTK_SIGNAL_FUNC(move_up_tool), this);

    toolDown = gtk_toolbar_append_item(GTK_TOOLBAR(toolbar), "Move Down",
                            "Move the Currently Selected Track in the Playlist Down",
                            "Toolbar/Down", NewPixmap(down_pic),
                            GTK_SIGNAL_FUNC(move_down_tool), this);

    gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, TRUE, 0);
    SetToolbarType();
    gtk_widget_show(toolbar);
}
Esempio n. 2
0
bool wxToolBar::Create( wxWindow *parent,
                        wxWindowID id,
                        const wxPoint& pos,
                        const wxSize& size,
                        long style,
                        const wxString& name )
{
    m_needParent = true;
    m_insertCallback = (wxInsertChildFunction)wxInsertChildInToolBar;

    if ( !PreCreation( parent, pos, size ) ||
         !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
    {
        wxFAIL_MSG( wxT("wxToolBar creation failed") );

        return false;
    }

    FixupStyle();

    GtkOrientation orient;
    GtkToolbarStyle gtkStyle;
    GetGtkStyle(style, &orient, &gtkStyle);

    m_toolbar = GTK_TOOLBAR( gtk_toolbar_new(orient, gtkStyle) );

    SetToolSeparation(7);

    if (style & wxTB_DOCKABLE)
    {
        m_widget = gtk_handle_box_new();
        gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
        gtk_widget_show( GTK_WIDGET(m_toolbar) );

        if (style & wxTB_FLAT)
            gtk_handle_box_set_shadow_type( GTK_HANDLE_BOX(m_widget), GTK_SHADOW_NONE );
    }
    else
    {
        m_widget = gtk_event_box_new();
        gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_toolbar) );
        ConnectWidget( m_widget );
        gtk_widget_show(GTK_WIDGET(m_toolbar));
    }

    gtk_toolbar_set_tooltips( GTK_TOOLBAR(m_toolbar), TRUE );

    if (style & wxTB_FLAT)
        gtk_toolbar_set_button_relief( GTK_TOOLBAR(m_toolbar), GTK_RELIEF_NONE );

    m_parent->DoAddChild( this );

    PostCreation(size);

    return true;
}
Esempio n. 3
0
static GtkWidget *
thumbview_create_toolbar (ThumbView * tv)
{
    GtkWidget *toolbar;
    GtkWidget *iconw;

    g_return_val_if_fail (tv, NULL);

#ifdef USE_GTK2
    toolbar = gtk_toolbar_new ();
#else
    toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS);
    gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NONE);
    gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar),
				 GTK_TOOLBAR_SPACE_LINE);
    gtk_toolbar_set_space_size (GTK_TOOLBAR (toolbar), 16);
#endif

    /*
     * refresh
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (refresh_xpm);
    tv->toolbar_refresh_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("Refresh"), NULL, iconw,
				 GTK_SIGNAL_FUNC (cb_thumbview_refresh), tv);
    /*
     * previous 
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (left_xpm);
    tv->toolbar_previous_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("Previous Image/Movie"), NULL, iconw,
				 GTK_SIGNAL_FUNC (cb_thumbview_previous), tv);
    /*
     * next 
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (right_xpm);
    tv->toolbar_next_btn = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
						    NULL,
						    _("Next Image/Movie"),
						    NULL,
						    iconw,
						    GTK_SIGNAL_FUNC
						    (cb_thumbview_next), tv);

    /*
     * first 
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (first_xpm);
    tv->toolbar_first_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("First Image/Movie"), NULL, iconw,
				 GTK_SIGNAL_FUNC (cb_thumbview_first), tv);

    /*
     * last
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (last_xpm);
    tv->toolbar_last_btn = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
						    NULL,
						    _("Last Image/Movie"),
						    NULL,
						    iconw,
						    GTK_SIGNAL_FUNC
						    (cb_thumbview_last), tv);


    gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));

    /*
     * info
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (info_xpm);
    tv->toolbar_info_btn = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
						    NULL,
						    _("Properties"),
						    NULL,
						    iconw,
						    GTK_SIGNAL_FUNC
						    (cb_thumbview_info), tv);
    gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));


    /*
     * view thumbs
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (view_thumbs_xpm);
    tv->toolbar_thumbs_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("View Thumbs"), NULL, iconw,
				 GTK_SIGNAL_FUNC
				 (cb_thumbview_toggle_mode), tv);

    /*
     * view list
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (view_list_xpm);
    tv->toolbar_list_btn = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
						    NULL, _("View List"),
						    NULL, iconw,
						    GTK_SIGNAL_FUNC
						    (cb_thumbview_toggle_mode),
						    tv);

    gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));

    /*
     * view fullscreen
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (fullscreen_xpm);
    tv->toolbar_view_btn = gtk_toolbar_append_item (GTK_TOOLBAR (toolbar),
						    NULL,
						    _("Fullscreen"),
						    NULL, iconw,
						    GTK_SIGNAL_FUNC
						    (cb_thumbview_fullscreen_view),
						    tv);

    /*
     * slideshow
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (slideshow_xpm);
    tv->toolbar_slideshow_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("Slideshow"), NULL, iconw,
				 GTK_SIGNAL_FUNC
				 (cb_thumbview_slideshow_view), tv);

    gtk_toolbar_append_space (GTK_TOOLBAR (toolbar));

    /*
     * no zoom
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (no_zoom_xpm);
    tv->toolbar_no_zoom_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("No Zoom"), NULL, iconw,
				 GTK_SIGNAL_FUNC (cb_thumbview_no_zoom), tv);

    /*
     * auto zoom
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (zoom_fit_xpm);
    tv->toolbar_zoom_auto_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("Auto Zoom"), NULL, iconw,
				 GTK_SIGNAL_FUNC (cb_thumbview_zoom_auto),
				 tv);

    /*
     * zoom in
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (zoom_in_xpm);
    tv->toolbar_zoom_in_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("Zoom In"), NULL, iconw,
				 GTK_SIGNAL_FUNC (cb_thumbview_zoom_in), tv);

    /*
     * zoom out
     */
    iconw = pixbuf_create_pixmap_from_xpm_data (zoom_out_xpm);
    tv->toolbar_zoom_out_btn =
	gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
				 _("Zoom Out"), NULL, iconw,
				 GTK_SIGNAL_FUNC (cb_thumbview_zoom_out), tv);

    gtk_widget_show_all (toolbar);
    gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);

    return toolbar;
}
Esempio n. 4
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;
}