It's the worlds ugliest highlighting code!!!! The result is okay so long

Thu May 17 16:20:04 2001  Jonathan Blandford  <jrb@redhat.com>

	* demos/gtk-demo/main.c (fontify): It's the worlds ugliest
	highlighting code!!!!  The result is okay so long as you don't try
	to stress it.  It also highlights a bug in the TextView so it's in
	an unproportional font right now until it's fixed.

	*demos/gtk-demo/*.c: Clean up code a bit to make it
	ugly-parser(TM) friendly. (-:
This commit is contained in:
Jonathan Blandford
2001-05-18 16:28:30 +00:00
committed by Jonathan Blandford
parent 288ff7e058
commit 009212ad28
18 changed files with 858 additions and 502 deletions

View File

@ -10,7 +10,8 @@ static GtkWidget *entry1 = NULL;
static GtkWidget *entry2 = NULL;
static void
message_dialog_clicked (GtkButton *button, gpointer user_data)
message_dialog_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dialog;
static gint i = 1;
@ -28,7 +29,8 @@ message_dialog_clicked (GtkButton *button, gpointer user_data)
}
static void
interactive_dialog_clicked (GtkButton *button, gpointer user_data)
interactive_dialog_clicked (GtkButton *button,
gpointer user_data)
{
GtkWidget *dialog;
GtkWidget *hbox;
@ -59,7 +61,7 @@ interactive_dialog_clicked (GtkButton *button, gpointer user_data)
gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);
label = gtk_label_new_with_mnemonic ("_Entry 1");
gtk_table_attach_defaults (GTK_TABLE (table),
label,
label,
0, 1, 0, 1);
local_entry1 = gtk_entry_new ();
gtk_entry_set_text (GTK_ENTRY (local_entry1), gtk_entry_get_text (GTK_ENTRY (entry1)));
@ -68,7 +70,7 @@ interactive_dialog_clicked (GtkButton *button, gpointer user_data)
label = gtk_label_new_with_mnemonic ("E_ntry 2");
gtk_table_attach_defaults (GTK_TABLE (table),
label,
label,
0, 1, 1, 2);
local_entry2 = gtk_entry_new ();
@ -142,8 +144,8 @@ do_dialog (void)
label = gtk_label_new_with_mnemonic ("_Entry 1");
gtk_table_attach_defaults (GTK_TABLE (table),
label,
0, 1, 0, 1);
label,
0, 1, 0, 1);
entry1 = gtk_entry_new ();
gtk_table_attach_defaults (GTK_TABLE (table), entry1, 1, 2, 0, 1);
@ -152,8 +154,8 @@ do_dialog (void)
label = gtk_label_new_with_mnemonic ("E_ntry 2");
gtk_table_attach_defaults (GTK_TABLE (table),
label,
0, 1, 1, 2);
label,
0, 1, 1, 2);
entry2 = gtk_entry_new ();
gtk_table_attach_defaults (GTK_TABLE (table), entry2, 1, 2, 1, 2);
@ -165,7 +167,7 @@ do_dialog (void)
gtk_widget_show_all (window);
}
else
{
{
gtk_widget_destroy (window);
window = NULL;
}