X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/219dc95cf771d5ba07aa19a3b33002a649682060..c3df9503faeb30706042d9add6b9db39b38ec164:/disobedience/disobedience.c?ds=sidebyside diff --git a/disobedience/disobedience.c b/disobedience/disobedience.c index dc80d0c..2a39a15 100644 --- a/disobedience/disobedience.c +++ b/disobedience/disobedience.c @@ -69,12 +69,12 @@ int volume_r; double goesupto = 10; /* volume upper bound */ -/** @brief Break up choose tab by initial letter */ -int choosealpha; - /** @brief True if a NOP is in flight */ static int nop_in_flight; +/** @brief Global tooltip group */ +GtkTooltips *tips; + /* Window creation --------------------------------------------------------- */ /* Note that all the client operations kicked off from here will only complete @@ -124,6 +124,8 @@ static GtkWidget *notebook(void) { gtk_label_new("Recent")); gtk_notebook_append_page(GTK_NOTEBOOK(tabs), choose_widget(), gtk_label_new("Choose")); + gtk_notebook_append_page(GTK_NOTEBOOK(tabs), added_widget(), + gtk_label_new("Added")); return tabs; } @@ -315,7 +317,6 @@ static const struct option options[] = { { "version", no_argument, 0, 'V' }, { "config", required_argument, 0, 'c' }, { "tufnel", no_argument, 0, 't' }, - { "choosealpha", no_argument, 0, 'C' }, { "debug", no_argument, 0, 'd' }, { 0, 0, 0, 0 } }; @@ -359,14 +360,13 @@ int main(int argc, char **argv) { if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale"); gtk_init(&argc, &argv); gtk_rc_parse_string(style); - while((n = getopt_long(argc, argv, "hVc:dtH", options, 0)) >= 0) { + while((n = getopt_long(argc, argv, "hVc:dtHC", options, 0)) >= 0) { switch(n) { case 'h': help(); case 'V': version(); case 'c': configfile = optarg; break; case 'd': debugging = 1; break; case 't': goesupto = 11; break; - case 'C': choosealpha = 1; break; /* not well tested any more */ default: fatal(0, "invalid option"); } } @@ -374,7 +374,7 @@ int main(int argc, char **argv) { /* create the event loop */ D(("create main loop")); mainloop = g_main_loop_new(0, 0); - if(config_read()) fatal(0, "cannot read configuration"); + if(config_read(0)) fatal(0, "cannot read configuration"); /* create the clients */ if(!(client = gtkclient()) || !(logclient = gtkclient())) @@ -389,6 +389,8 @@ int main(int argc, char **argv) { * unresponsiveness. It's not very useful in production use. */ if(0) g_timeout_add(1000/*milliseconds*/, heartbeat, 0); + /* global tooltips */ + tips = gtk_tooltips_new(); make_toplevel_window(); /* reset styles now everything has its name */ gtk_rc_reset_styles(gtk_settings_get_for_screen(gdk_screen_get_default()));