comparison pidgin/gtkmain.c @ 21030:3cc856ca2338

Add a --with-extraversion option to ./configure so packagers can fine tune the version displayed to the end user to assist in support and things. Fixes #3681
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 27 Oct 2007 13:56:54 +0000
parents 787b3897ba9f
children 7710a871fabf
comparison
equal deleted inserted replaced
21029:3a12f08b2185 21030:3cc856ca2338
381 show_usage(const char *name, gboolean terse) 381 show_usage(const char *name, gboolean terse)
382 { 382 {
383 char *text; 383 char *text;
384 384
385 if (terse) { 385 if (terse) {
386 text = g_strdup_printf(_("%s %s. Try `%s -h' for more information.\n"), PIDGIN_NAME, VERSION, name); 386 text = g_strdup_printf(_("%s %s. Try `%s -h' for more information.\n"), PIDGIN_NAME, DISPLAY_VERSION, name);
387 } else { 387 } else {
388 text = g_strdup_printf(_("%s %s\n" 388 text = g_strdup_printf(_("%s %s\n"
389 "Usage: %s [OPTION]...\n\n" 389 "Usage: %s [OPTION]...\n\n"
390 " -c, --config=DIR use DIR for config files\n" 390 " -c, --config=DIR use DIR for config files\n"
391 " -d, --debug print debugging messages to stdout\n" 391 " -d, --debug print debugging messages to stdout\n"
395 " -l, --login[=NAME] automatically login (optional argument NAME specifies\n" 395 " -l, --login[=NAME] automatically login (optional argument NAME specifies\n"
396 " account(s) to use, separated by commas)\n" 396 " account(s) to use, separated by commas)\n"
397 #ifndef WIN32 397 #ifndef WIN32
398 " --display=DISPLAY X display to use\n" 398 " --display=DISPLAY X display to use\n"
399 #endif 399 #endif
400 " -v, --version display the current version and exit\n"), PIDGIN_NAME, VERSION, name); 400 " -v, --version display the current version and exit\n"), PIDGIN_NAME, DISPLAY_VERSION, name);
401 } 401 }
402 402
403 purple_print_utf8_to_console(stdout, text); 403 purple_print_utf8_to_console(stdout, text);
404 g_free(text); 404 g_free(text);
405 } 405 }
525 "%swiki/GetABacktrace\n\n" 525 "%swiki/GetABacktrace\n\n"
526 "If you need further assistance, please IM either SeanEgn or \n" 526 "If you need further assistance, please IM either SeanEgn or \n"
527 "LSchiere (via AIM). Contact information for Sean and Luke \n" 527 "LSchiere (via AIM). Contact information for Sean and Luke \n"
528 "on other protocols is at\n" 528 "on other protocols is at\n"
529 "%swiki/DeveloperPages\n"), 529 "%swiki/DeveloperPages\n"),
530 PIDGIN_NAME, VERSION, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE 530 PIDGIN_NAME, DISPLAY_VERSION, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE, PURPLE_DEVEL_WEBSITE
531 ); 531 );
532 532
533 /* we have to convert the message (UTF-8 to console 533 /* we have to convert the message (UTF-8 to console
534 charset) early because after a segmentation fault 534 charset) early because after a segmentation fault
535 it's not a good practice to allocate memory */ 535 it's not a good practice to allocate memory */
652 #endif 652 #endif
653 return 0; 653 return 0;
654 } 654 }
655 /* show version message */ 655 /* show version message */
656 if (opt_version) { 656 if (opt_version) {
657 printf("%s %s\n", PIDGIN_NAME, VERSION); 657 printf("%s %s\n", PIDGIN_NAME, DISPLAY_VERSION);
658 #ifdef HAVE_SIGNAL_H 658 #ifdef HAVE_SIGNAL_H
659 g_free(segfault_message); 659 g_free(segfault_message);
660 #endif 660 #endif
661 return 0; 661 return 0;
662 } 662 }
689 689
690 gui_check = gtk_init_check(&argc, &argv); 690 gui_check = gtk_init_check(&argc, &argv);
691 if (!gui_check) { 691 if (!gui_check) {
692 char *display = gdk_get_display(); 692 char *display = gdk_get_display();
693 693
694 printf("%s %s\n", PIDGIN_NAME, VERSION); 694 printf("%s %s\n", PIDGIN_NAME, DISPLAY_VERSION);
695 695
696 g_warning("cannot open display: %s", display ? display : "unset"); 696 g_warning("cannot open display: %s", display ? display : "unset");
697 g_free(display); 697 g_free(display);
698 #ifdef HAVE_SIGNAL_H 698 #ifdef HAVE_SIGNAL_H
699 g_free(segfault_message); 699 g_free(segfault_message);