rules.c: consistent indentation
This commit is contained in:
parent
88feee2703
commit
105a828c30
49
src/rules.c
49
src/rules.c
@ -11,27 +11,28 @@
|
||||
#include "gtkutils.h"
|
||||
|
||||
/* Show dialog box with game rules*/
|
||||
void show_rules(GtkWidget *widget, gpointer data) {
|
||||
GtkWidget *window;
|
||||
GtkWidget *vbox, *hbox, *button_box;
|
||||
GtkWidget *label;
|
||||
GtkWidget *frame;
|
||||
GtkWidget *separator;
|
||||
GtkWidget *ok_button;
|
||||
void show_rules (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
GtkWidget * window;
|
||||
GtkWidget * vbox, * hbox, * button_box;
|
||||
GtkWidget * label;
|
||||
GtkWidget * frame;
|
||||
GtkWidget * separator;
|
||||
GtkWidget * ok_button;
|
||||
|
||||
window=ut_window_new(_("Rules"), "GtkBalls_Rules", "GtkBalls", TRUE, FALSE, FALSE, 5);
|
||||
window = ut_window_new(_("Rules"), "GtkBalls_Rules", "GtkBalls", TRUE, FALSE, FALSE, 5);
|
||||
|
||||
vbox=gtk_vbox_new(FALSE, 0);
|
||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
||||
vbox = gtk_vbox_new (FALSE, 0);
|
||||
gtk_container_add (GTK_CONTAINER(window), vbox);
|
||||
|
||||
frame=gtk_frame_new(_("Rules"));
|
||||
gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 3);
|
||||
frame = gtk_frame_new (_("Rules"));
|
||||
gtk_box_pack_start (GTK_BOX(vbox), frame, TRUE, TRUE, 3);
|
||||
|
||||
hbox=gtk_hbox_new(FALSE, 0);
|
||||
gtk_container_set_border_width(GTK_CONTAINER(hbox), 10);
|
||||
gtk_container_add(GTK_CONTAINER(frame), hbox);
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
gtk_container_set_border_width (GTK_CONTAINER(hbox), 10);
|
||||
gtk_container_add (GTK_CONTAINER(frame), hbox);
|
||||
|
||||
label=gtk_label_new(_("The standard play area of GtkBalls is a 9x9\n" \
|
||||
label = gtk_label_new (_("The standard play area of GtkBalls is a 9x9\n" \
|
||||
"grid (it can be changed through \"Rules\"\n" \
|
||||
"option in ingame menu). When GtkBalls is\n" \
|
||||
"first started a number of balls are placed\n" \
|
||||
@ -61,16 +62,16 @@ void show_rules(GtkWidget *widget, gpointer data) {
|
||||
"is an indicator on top of the grid that shows\n" \
|
||||
"what colors the next balls that will appear on\n" \
|
||||
"the grid will be."));
|
||||
gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 5);
|
||||
gtk_box_pack_start (GTK_BOX(hbox), label, TRUE, TRUE, 5);
|
||||
|
||||
separator=gtk_hseparator_new();
|
||||
gtk_box_pack_start(GTK_BOX(vbox), separator, FALSE, FALSE, 5);
|
||||
separator = gtk_hseparator_new ();
|
||||
gtk_box_pack_start (GTK_BOX(vbox), separator, FALSE, FALSE, 5);
|
||||
|
||||
button_box=gtk_hbox_new(FALSE, 0);
|
||||
gtk_box_pack_start(GTK_BOX(vbox), button_box, TRUE, TRUE, 2);
|
||||
button_box = gtk_hbox_new (FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX(vbox), button_box, TRUE, TRUE, 2);
|
||||
|
||||
ok_button=ut_button_new_stock_swap(GTK_STOCK_CLOSE, gtk_widget_destroy, window, button_box);
|
||||
ok_button = ut_button_new_stock_swap (GTK_STOCK_CLOSE, gtk_widget_destroy, window, button_box);
|
||||
|
||||
gtk_widget_grab_default(ok_button);
|
||||
gtk_widget_show_all(window);
|
||||
gtk_widget_grab_default (ok_button);
|
||||
gtk_widget_show_all (window);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user