113 lines
4.0 KiB
C
113 lines
4.0 KiB
C
/*
|
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
# include <config.h>
|
|
#endif
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <unistd.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
#include <gdk/gdkkeysyms.h>
|
|
#include <gtk/gtk.h>
|
|
|
|
#include "callbacks.h"
|
|
#include "about.h"
|
|
#include "support.h"
|
|
|
|
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
|
|
g_object_set_data_full (G_OBJECT (component), name, \
|
|
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
|
|
|
|
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
|
|
g_object_set_data (G_OBJECT (component), name, widget)
|
|
|
|
GtkWidget*
|
|
create_about_dialog (void)
|
|
{
|
|
GtkWidget *about_dialog;
|
|
GtkWidget *dialog_vbox1;
|
|
GtkWidget *alignment1;
|
|
GtkWidget *vbox2;
|
|
GtkWidget *logo;
|
|
GtkWidget *name_label;
|
|
GtkWidget *comment_label;
|
|
GtkWidget *copyright_label;
|
|
GtkWidget *dialog_action_area1;
|
|
GtkWidget *button;
|
|
|
|
about_dialog = gtk_dialog_new ();
|
|
gtk_window_set_title (GTK_WINDOW (about_dialog), _("About GGAP"));
|
|
gtk_window_set_resizable (GTK_WINDOW (about_dialog), FALSE);
|
|
gtk_window_set_type_hint (GTK_WINDOW (about_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
|
|
|
|
dialog_vbox1 = GTK_DIALOG (about_dialog)->vbox;
|
|
gtk_widget_show (dialog_vbox1);
|
|
|
|
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
|
gtk_widget_show (alignment1);
|
|
gtk_box_pack_start (GTK_BOX (dialog_vbox1), alignment1, TRUE, TRUE, 0);
|
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 20, 20, 20, 20);
|
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
|
gtk_widget_show (vbox2);
|
|
gtk_container_add (GTK_CONTAINER (alignment1), vbox2);
|
|
|
|
logo = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_DIALOG);
|
|
gtk_widget_show (logo);
|
|
gtk_box_pack_start (GTK_BOX (vbox2), logo, FALSE, FALSE, 0);
|
|
|
|
name_label = gtk_label_new (_("<b>name</b>"));
|
|
gtk_widget_show (name_label);
|
|
gtk_box_pack_start (GTK_BOX (vbox2), name_label, FALSE, FALSE, 0);
|
|
gtk_label_set_use_markup (GTK_LABEL (name_label), TRUE);
|
|
|
|
comment_label = gtk_label_new (_("<b>comment</b>"));
|
|
gtk_widget_show (comment_label);
|
|
gtk_box_pack_start (GTK_BOX (vbox2), comment_label, FALSE, FALSE, 0);
|
|
gtk_label_set_use_markup (GTK_LABEL (comment_label), TRUE);
|
|
|
|
copyright_label = gtk_label_new (_("<b>copyright</b>"));
|
|
gtk_widget_show (copyright_label);
|
|
gtk_box_pack_start (GTK_BOX (vbox2), copyright_label, FALSE, FALSE, 0);
|
|
gtk_label_set_use_markup (GTK_LABEL (copyright_label), TRUE);
|
|
|
|
dialog_action_area1 = GTK_DIALOG (about_dialog)->action_area;
|
|
gtk_widget_show (dialog_action_area1);
|
|
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
|
|
|
|
button = gtk_button_new_from_stock ("gtk-close");
|
|
gtk_widget_show (button);
|
|
gtk_dialog_add_action_widget (GTK_DIALOG (about_dialog), button, GTK_RESPONSE_CANCEL);
|
|
GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
|
|
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
|
gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
|
|
|
|
g_signal_connect_swapped ((gpointer) about_dialog, "delete_event",
|
|
G_CALLBACK (gtk_widget_hide),
|
|
GTK_OBJECT (about_dialog));
|
|
g_signal_connect_swapped ((gpointer) button, "clicked",
|
|
G_CALLBACK (gtk_widget_hide),
|
|
GTK_OBJECT (about_dialog));
|
|
|
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
|
GLADE_HOOKUP_OBJECT_NO_REF (about_dialog, about_dialog, "about_dialog");
|
|
GLADE_HOOKUP_OBJECT_NO_REF (about_dialog, dialog_vbox1, "dialog_vbox1");
|
|
GLADE_HOOKUP_OBJECT (about_dialog, alignment1, "alignment1");
|
|
GLADE_HOOKUP_OBJECT (about_dialog, vbox2, "vbox2");
|
|
GLADE_HOOKUP_OBJECT (about_dialog, logo, "logo");
|
|
GLADE_HOOKUP_OBJECT (about_dialog, name_label, "name_label");
|
|
GLADE_HOOKUP_OBJECT (about_dialog, comment_label, "comment_label");
|
|
GLADE_HOOKUP_OBJECT (about_dialog, copyright_label, "copyright_label");
|
|
GLADE_HOOKUP_OBJECT_NO_REF (about_dialog, dialog_action_area1, "dialog_action_area1");
|
|
GLADE_HOOKUP_OBJECT (about_dialog, button, "button");
|
|
|
|
gtk_widget_grab_default (button);
|
|
return about_dialog;
|
|
}
|
|
|