212 lines
8.3 KiB
C
212 lines
8.3 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 "mootermprefs.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_term_prefs_window (void)
|
|
{
|
|
GtkWidget *term_prefs_window;
|
|
GtkWidget *notebook;
|
|
GtkWidget *hbox7;
|
|
GtkWidget *cursor_blinks;
|
|
GtkWidget *label1;
|
|
GtkObject *cursor_blink_time_adj;
|
|
GtkWidget *cursor_blink_time;
|
|
GtkWidget *label2;
|
|
GtkWidget *alignment27;
|
|
GtkWidget *hseparator4;
|
|
GtkWidget *alignment21;
|
|
GtkWidget *table11;
|
|
GtkWidget *label13;
|
|
GtkWidget *label16;
|
|
GtkWidget *foreground;
|
|
GtkWidget *background;
|
|
GtkWidget *alignment29;
|
|
GtkWidget *hseparator5;
|
|
GtkWidget *hbox9;
|
|
GtkWidget *label64;
|
|
GtkWidget *font;
|
|
|
|
term_prefs_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
gtk_window_set_title (GTK_WINDOW (term_prefs_window), _("Terminal Preferences"));
|
|
|
|
notebook = gtk_vbox_new (FALSE, 0);
|
|
gtk_widget_show (notebook);
|
|
gtk_container_add (GTK_CONTAINER (term_prefs_window), notebook);
|
|
|
|
hbox7 = gtk_hbox_new (FALSE, 0);
|
|
gtk_widget_show (hbox7);
|
|
gtk_box_pack_start (GTK_BOX (notebook), hbox7, FALSE, FALSE, 0);
|
|
|
|
cursor_blinks = gtk_check_button_new_with_mnemonic (_("_Cursor blinks "));
|
|
gtk_widget_show (cursor_blinks);
|
|
gtk_box_pack_start (GTK_BOX (hbox7), cursor_blinks, FALSE, FALSE, 0);
|
|
gtk_button_set_focus_on_click (GTK_BUTTON (cursor_blinks), FALSE);
|
|
|
|
label1 = gtk_label_new_with_mnemonic (_("_Freq.: "));
|
|
gtk_widget_show (label1);
|
|
gtk_box_pack_start (GTK_BOX (hbox7), label1, FALSE, FALSE, 0);
|
|
|
|
cursor_blink_time_adj = gtk_adjustment_new (1, 0, 100000, 1, 10, 10);
|
|
cursor_blink_time = gtk_spin_button_new (GTK_ADJUSTMENT (cursor_blink_time_adj), 1, 0);
|
|
gtk_widget_show (cursor_blink_time);
|
|
gtk_box_pack_start (GTK_BOX (hbox7), cursor_blink_time, FALSE, FALSE, 0);
|
|
|
|
label2 = gtk_label_new (_(" ms"));
|
|
gtk_widget_show (label2);
|
|
gtk_box_pack_start (GTK_BOX (hbox7), label2, FALSE, FALSE, 0);
|
|
|
|
alignment27 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
|
gtk_widget_show (alignment27);
|
|
gtk_box_pack_start (GTK_BOX (notebook), alignment27, FALSE, FALSE, 0);
|
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment27), 3, 3, 0, 0);
|
|
|
|
hseparator4 = gtk_hseparator_new ();
|
|
gtk_widget_show (hseparator4);
|
|
gtk_container_add (GTK_CONTAINER (alignment27), hseparator4);
|
|
|
|
alignment21 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
|
gtk_widget_show (alignment21);
|
|
gtk_box_pack_start (GTK_BOX (notebook), alignment21, TRUE, TRUE, 0);
|
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment21), 3, 3, 3, 3);
|
|
|
|
table11 = gtk_table_new (4, 2, FALSE);
|
|
gtk_widget_show (table11);
|
|
gtk_container_add (GTK_CONTAINER (alignment21), table11);
|
|
|
|
label13 = gtk_label_new (_("Foreground color: "));
|
|
gtk_widget_show (label13);
|
|
gtk_table_attach (GTK_TABLE (table11), label13, 0, 1, 2, 3,
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);
|
|
|
|
label16 = gtk_label_new (_("Background color: "));
|
|
gtk_widget_show (label16);
|
|
gtk_table_attach (GTK_TABLE (table11), label16, 0, 1, 3, 4,
|
|
(GtkAttachOptions) (GTK_FILL),
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
gtk_misc_set_alignment (GTK_MISC (label16), 0, 0.5);
|
|
|
|
foreground = gtk_color_button_new ();
|
|
gtk_widget_show (foreground);
|
|
gtk_table_attach (GTK_TABLE (table11), foreground, 1, 2, 2, 3,
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
gtk_color_button_set_title (GTK_COLOR_BUTTON (foreground), _("Pick Terminal Foreground Color"));
|
|
gtk_button_set_focus_on_click (GTK_BUTTON (foreground), FALSE);
|
|
|
|
background = gtk_color_button_new ();
|
|
gtk_widget_show (background);
|
|
gtk_table_attach (GTK_TABLE (table11), background, 1, 2, 3, 4,
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
gtk_color_button_set_title (GTK_COLOR_BUTTON (background), _("Pick Terminal Background Color"));
|
|
gtk_button_set_focus_on_click (GTK_BUTTON (background), FALSE);
|
|
|
|
alignment29 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
|
gtk_widget_show (alignment29);
|
|
gtk_table_attach (GTK_TABLE (table11), alignment29, 0, 2, 1, 2,
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment29), 3, 3, 0, 0);
|
|
|
|
hseparator5 = gtk_hseparator_new ();
|
|
gtk_widget_show (hseparator5);
|
|
gtk_container_add (GTK_CONTAINER (alignment29), hseparator5);
|
|
|
|
hbox9 = gtk_hbox_new (FALSE, 0);
|
|
gtk_widget_show (hbox9);
|
|
gtk_table_attach (GTK_TABLE (table11), hbox9, 0, 2, 0, 1,
|
|
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
|
(GtkAttachOptions) (0), 0, 0);
|
|
|
|
label64 = gtk_label_new_with_mnemonic (_("F_ont: "));
|
|
gtk_widget_show (label64);
|
|
gtk_box_pack_start (GTK_BOX (hbox9), label64, FALSE, FALSE, 0);
|
|
|
|
font = gtk_font_button_new ();
|
|
gtk_widget_show (font);
|
|
gtk_box_pack_start (GTK_BOX (hbox9), font, TRUE, TRUE, 0);
|
|
gtk_font_button_set_use_font (GTK_FONT_BUTTON (font), TRUE);
|
|
gtk_font_button_set_use_size (GTK_FONT_BUTTON (font), TRUE);
|
|
gtk_button_set_focus_on_click (GTK_BUTTON (font), FALSE);
|
|
|
|
g_signal_connect ((gpointer) cursor_blinks, "moo_prefs_key",
|
|
G_CALLBACK (MOO_TERM_PREFS_CURSOR_BLINKS),
|
|
NULL);
|
|
g_signal_connect ((gpointer) label1, "moo_sensitive",
|
|
G_CALLBACK (cursor_blinks),
|
|
NULL);
|
|
g_signal_connect ((gpointer) cursor_blink_time, "moo_prefs_key",
|
|
G_CALLBACK (MOO_TERM_PREFS_CURSOR_BLINK_TIME),
|
|
NULL);
|
|
g_signal_connect ((gpointer) cursor_blink_time, "moo_sensitive",
|
|
G_CALLBACK (cursor_blinks),
|
|
NULL);
|
|
g_signal_connect ((gpointer) label2, "moo_sensitive",
|
|
G_CALLBACK (cursor_blinks),
|
|
NULL);
|
|
g_signal_connect ((gpointer) foreground, "moo_prefs_key",
|
|
G_CALLBACK (MOO_TERM_PREFS_FOREGROUND),
|
|
NULL);
|
|
g_signal_connect ((gpointer) background, "moo_prefs_key",
|
|
G_CALLBACK (MOO_TERM_PREFS_BACKGROUND),
|
|
NULL);
|
|
g_signal_connect ((gpointer) font, "moo_prefs_key",
|
|
G_CALLBACK (MOO_TERM_PREFS_FONT),
|
|
NULL);
|
|
|
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label1), cursor_blink_time);
|
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label64), font);
|
|
|
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
|
GLADE_HOOKUP_OBJECT_NO_REF (term_prefs_window, term_prefs_window, "term_prefs_window");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, notebook, "notebook");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, hbox7, "hbox7");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, cursor_blinks, "cursor_blinks");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, label1, "label1");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, cursor_blink_time, "cursor_blink_time");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, label2, "label2");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, alignment27, "alignment27");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, hseparator4, "hseparator4");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, alignment21, "alignment21");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, table11, "table11");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, label13, "label13");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, label16, "label16");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, foreground, "foreground");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, background, "background");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, alignment29, "alignment29");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, hseparator5, "hseparator5");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, hbox9, "hbox9");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, label64, "label64");
|
|
GLADE_HOOKUP_OBJECT (term_prefs_window, font, "font");
|
|
|
|
return term_prefs_window;
|
|
}
|
|
|