Logo Search packages:      
Sourcecode: jmp version File versions  Download package

about_dialog.c

#include <gtk/gtk.h>
#include <jmp.h>

/** Originally create by glade, which seems like a nice tool... 
 */
GtkWidget* create_about_dialog (void) {
    GtkWidget *about_dialog;
    GtkWidget *dialog_vbox1;
    GtkWidget *label1;
    GtkWidget *dialog_action_area1;
    GtkWidget *hbuttonbox2;
    guint button6_key;
    GtkWidget *button6;
    GtkAccelGroup *accel_group;

    accel_group = gtk_accel_group_new ();

    about_dialog = gtk_dialog_new ();
    gtk_object_set_data (GTK_OBJECT (about_dialog), "about_dialog", about_dialog);
    gtk_window_set_title (GTK_WINDOW (about_dialog), _("About JMP"));
    gtk_window_set_policy (GTK_WINDOW (about_dialog), TRUE, TRUE, FALSE);

    dialog_vbox1 = GTK_DIALOG (about_dialog)->vbox;
    gtk_object_set_data (GTK_OBJECT (about_dialog), "dialog_vbox1", dialog_vbox1);

    label1 = gtk_label_new (_("JMP - A java profiler by\n"
                        "  Robert 'Ernimril' Olofsson - robo@khelekore.org  \n"
                        "  Bodo Pfelzer \n"
                        "  Marco Walther \n"
                        "  and others"));
    gtk_widget_ref (label1);
    gtk_object_set_data_full (GTK_OBJECT (about_dialog), "label1", label1,
                        (GtkDestroyNotify) gtk_widget_unref);
    gtk_box_pack_start (GTK_BOX (dialog_vbox1), label1, FALSE, FALSE, 0);

    dialog_action_area1 = GTK_DIALOG (about_dialog)->action_area;
    gtk_object_set_data (GTK_OBJECT (about_dialog), "dialog_action_area1", dialog_action_area1);
    gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area1), 10);

    hbuttonbox2 = gtk_hbutton_box_new ();
    gtk_widget_ref (hbuttonbox2);
    gtk_object_set_data_full (GTK_OBJECT (about_dialog), "hbuttonbox2", hbuttonbox2,
                        (GtkDestroyNotify) gtk_widget_unref);
    gtk_box_pack_start (GTK_BOX (dialog_action_area1), hbuttonbox2, TRUE, TRUE, 0);

    button6 = gtk_button_new_with_label ("");
    button6_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (button6)->child),
                               _("_Ok"));
    gtk_widget_add_accelerator (button6, "clicked", accel_group,
                        button6_key, GDK_MOD1_MASK, 0);
    gtk_widget_ref (button6);
    gtk_object_set_data_full (GTK_OBJECT (about_dialog), "button6", button6,
                        (GtkDestroyNotify) gtk_widget_unref);
    gtk_container_add (GTK_CONTAINER (hbuttonbox2), button6);
    GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT);

    gtk_signal_connect_object (GTK_OBJECT (button6), "clicked",
                         GTK_SIGNAL_FUNC (gtk_widget_hide),
                         GTK_OBJECT (about_dialog));

    gtk_window_add_accel_group (GTK_WINDOW (about_dialog), accel_group);
    return about_dialog;
}

/* Emacs Local Variables: */
/* Emacs mode:C */
/* Emacs c-indentation-style:"gnu" */
/* Emacs c-hanging-braces-alist:((brace-list-open)(brace-entry-open)(defun-open after)(substatement-open after)(block-close . c-snug-do-while)(extern-lang-open after)) */
/* Emacs c-cleanup-list:(brace-else-brace brace-elseif-brace space-before-funcall) */
/* Emacs c-basic-offset:4 */
/* Emacs End: */

Generated by  Doxygen 1.6.0   Back to index