aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-07-16 10:19:47 +0200
committerThomas White <taw@bitwiz.org.uk>2011-07-16 10:19:47 +0200
commit27747f19e4de3a44884a74c2569872b84211445b (patch)
treeb9c9377e506bd99fea2e2bc0a61aec43827d367e /src
parent33a08e17fada81e6998576c21c166fb20365c214 (diff)
Stylesheet window stuff
Diffstat (limited to 'src')
-rw-r--r--src/stylesheet.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c
index 3e3ba80..dba4a5b 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -64,13 +64,16 @@ static void do_text(struct _stylesheetwindow *s, GtkWidget *b)
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Label");
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), "Title");
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
- gtk_widget_set_size_request(GTK_WIDGET(combo), 200, -1);
+ gtk_widget_set_size_request(GTK_WIDGET(combo), 300, -1);
+ gtk_table_set_row_spacing(GTK_TABLE(table), 0, 20);
label = gtk_label_new("Font:");
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
font = gtk_font_button_new_with_font("Sans 12");
- gtk_table_attach_defaults(GTK_TABLE(table), font, 1, 2, 1, 2);
+ box = gtk_hbox_new(FALSE, 0);
+ gtk_table_attach_defaults(GTK_TABLE(table), box, 1, 2, 1, 2);
+ gtk_box_pack_start(GTK_BOX(box), font, FALSE, FALSE, 0);
label = gtk_label_new("Colour:");
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
@@ -79,8 +82,14 @@ static void do_text(struct _stylesheetwindow *s, GtkWidget *b)
box = gtk_hbox_new(FALSE, 0);
gtk_table_attach_defaults(GTK_TABLE(table), box, 1, 2, 2, 3);
gtk_box_pack_start(GTK_BOX(box), colour, FALSE, FALSE, 0);
+}
+static gint destroy_stylesheet_sig(GtkWidget *w, struct _stylesheetwindow *s)
+{
+ s->p->stylesheetwindow = NULL;
+ free(s);
+ return FALSE;
}
@@ -118,6 +127,11 @@ StylesheetWindow *open_stylesheet(struct presentation *p)
gtk_notebook_append_page(GTK_NOTEBOOK(nb), background_box,
gtk_label_new("Background"));
+ g_signal_connect(G_OBJECT(s->window), "destroy",
+ G_CALLBACK(destroy_stylesheet_sig), s);
+ g_signal_connect(G_OBJECT(s->window), "response",
+ G_CALLBACK(gtk_widget_destroy), NULL);
+
gtk_widget_show_all(s->window);
return s;