X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/348ef7809bd9e7eda327e3c4cec0a963b245f0fb..d5b6ffd76a65b9a09a4aef9e39e342e1462f5eea:/disobedience/properties.c diff --git a/disobedience/properties.c b/disobedience/properties.c index ddcaa4d..e9f61a2 100644 --- a/disobedience/properties.c +++ b/disobedience/properties.c @@ -130,10 +130,23 @@ static const struct pref { static const struct button { const gchar *stock; void (*clicked)(GtkButton *button, gpointer userdata); + const char *tip; } buttons[] = { - { GTK_STOCK_OK, properties_ok }, - { GTK_STOCK_APPLY, properties_apply }, - { GTK_STOCK_CANCEL, properties_cancel }, + { + GTK_STOCK_OK, + properties_ok, + "Apply all changes and close window" + }, + { + GTK_STOCK_APPLY, + properties_apply, + "Apply all changes and keep window open" + }, + { + GTK_STOCK_CANCEL, + properties_cancel, + "Discard all changes and close window" + }, }; #define NBUTTONS (int)(sizeof buttons / sizeof *buttons) @@ -158,12 +171,15 @@ static void propagate_clicked(GtkButton attribute((unused)) *button, } } -void properties(int ntracks, char **tracks) { +void properties(int ntracks, const char **tracks) { int n, m; struct prefdata *f; GtkWidget *hbox, *vbox, *button, *label, *entry, *propagate, *content; GdkPixbuf *pb; - + + /* If no tracks, do nothign */ + if(!ntracks) + return; /* If there is a properties window open then just bring it to the * front. It might not have the right values in... */ if(properties_window) { @@ -256,6 +272,7 @@ void properties(int ntracks, char **tracks) { g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(buttons[n].clicked), 0); gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 1); + gtk_tooltips_set_tip(tips, button, buttons[n].tip, ""); } /* Put it all together */ vbox = gtk_vbox_new(FALSE, 1);