medit/moo/mooedit/glade/mooeditgotoline.c

118 lines
4.1 KiB
C
Raw Normal View History

2005-06-22 11:20:32 -07:00
/*
* 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 "mooeditgotoline.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_dialog (void)
{
GtkWidget *dialog;
GtkWidget *dialog_vbox1;
GtkWidget *vbox1;
GtkWidget *label5;
GtkWidget *hbox2;
GtkWidget *scale;
GtkObject *spin_adj;
GtkWidget *spin;
GtkWidget *dialog_action_area1;
GtkWidget *cancel_btn;
GtkWidget *ok_btn;
dialog = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (dialog), _("Go to Line"));
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER_ON_PARENT);
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), TRUE);
gtk_window_set_skip_pager_hint (GTK_WINDOW (dialog), TRUE);
gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
dialog_vbox1 = GTK_DIALOG (dialog)->vbox;
gtk_widget_show (dialog_vbox1);
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 6);
label5 = gtk_label_new (_("Go to line:"));
gtk_widget_show (label5);
gtk_box_pack_start (GTK_BOX (vbox1), label5, FALSE, FALSE, 0);
gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);
hbox2 = gtk_hbox_new (FALSE, 3);
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (vbox1), hbox2, FALSE, FALSE, 0);
scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 20, 1, 10, 1)));
gtk_widget_show (scale);
gtk_box_pack_start (GTK_BOX (hbox2), scale, TRUE, TRUE, 0);
gtk_scale_set_draw_value (GTK_SCALE (scale), FALSE);
spin_adj = gtk_adjustment_new (1, 1, 20, 1, 10, 10);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (spin_adj), 1, 0);
gtk_widget_show (spin);
gtk_box_pack_start (GTK_BOX (hbox2), spin, TRUE, TRUE, 0);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spin), TRUE);
dialog_action_area1 = GTK_DIALOG (dialog)->action_area;
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
cancel_btn = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_show (cancel_btn);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), cancel_btn, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancel_btn, GTK_CAN_DEFAULT);
gtk_button_set_focus_on_click (GTK_BUTTON (cancel_btn), FALSE);
ok_btn = gtk_button_new_from_stock ("gtk-ok");
gtk_widget_show (ok_btn);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog), ok_btn, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (ok_btn, GTK_CAN_DEFAULT);
gtk_button_set_focus_on_click (GTK_BUTTON (ok_btn), FALSE);
g_signal_connect_swapped ((gpointer) spin, "activate",
G_CALLBACK (gtk_button_clicked),
GTK_OBJECT (ok_btn));
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (dialog, dialog, "dialog");
GLADE_HOOKUP_OBJECT_NO_REF (dialog, dialog_vbox1, "dialog_vbox1");
GLADE_HOOKUP_OBJECT (dialog, vbox1, "vbox1");
GLADE_HOOKUP_OBJECT (dialog, label5, "label5");
GLADE_HOOKUP_OBJECT (dialog, hbox2, "hbox2");
GLADE_HOOKUP_OBJECT (dialog, scale, "scale");
GLADE_HOOKUP_OBJECT (dialog, spin, "spin");
GLADE_HOOKUP_OBJECT_NO_REF (dialog, dialog_action_area1, "dialog_action_area1");
GLADE_HOOKUP_OBJECT (dialog, cancel_btn, "cancel_btn");
GLADE_HOOKUP_OBJECT (dialog, ok_btn, "ok_btn");
gtk_widget_grab_focus (spin);
gtk_widget_grab_default (ok_btn);
return dialog;
}