pidgin/gtkmain.c

branch
soc.2013.gobjectification.plugins
changeset 36823
661347ff47e6
parent 36688
e49025233301
child 36825
2f4439558507
equal deleted inserted replaced
36822:7f6509afc91e 36823:661347ff47e6
70 #include "pidginstock.h" 70 #include "pidginstock.h"
71 #include "gtkwhiteboard.h" 71 #include "gtkwhiteboard.h"
72 72
73 #ifdef HAVE_SIGNAL_H 73 #ifdef HAVE_SIGNAL_H
74 # include <signal.h> 74 # include <signal.h>
75 #endif
76
77 #ifdef ENABLE_INTROSPECTION
78 # include <girepository.h>
75 #endif 79 #endif
76 80
77 #include <getopt.h> 81 #include <getopt.h>
78 82
79 83
460 gboolean debug_enabled, debug_colored; 464 gboolean debug_enabled, debug_colored;
461 GList *active_accounts; 465 GList *active_accounts;
462 GStatBuf st; 466 GStatBuf st;
463 467
464 struct option long_options[] = { 468 struct option long_options[] = {
465 {"config", required_argument, NULL, 'c'}, 469 {"config", required_argument, NULL, 'c'},
466 {"debug", optional_argument, NULL, 'd'}, 470 {"debug", optional_argument, NULL, 'd'},
467 {"force-online", no_argument, NULL, 'f'}, 471 {"force-online", no_argument, NULL, 'f'},
468 {"help", no_argument, NULL, 'h'}, 472 {"help", no_argument, NULL, 'h'},
469 {"login", optional_argument, NULL, 'l'}, 473 {"login", optional_argument, NULL, 'l'},
470 {"multiple", no_argument, NULL, 'm'}, 474 {"multiple", no_argument, NULL, 'm'},
471 {"nologin", no_argument, NULL, 'n'}, 475 {"nologin", no_argument, NULL, 'n'},
472 {"session", required_argument, NULL, 's'}, 476 {"session", required_argument, NULL, 's'},
473 {"version", no_argument, NULL, 'v'}, 477 {"version", no_argument, NULL, 'v'},
474 {"display", required_argument, NULL, 'D'}, 478 {"display", required_argument, NULL, 'D'},
475 {"sync", no_argument, NULL, 'S'}, 479 {"sync", no_argument, NULL, 'S'},
480 #ifdef ENABLE_INTROSPECTION
481 {"introspect-dump", required_argument, NULL, 'i'},
482 #endif
476 {0, 0, 0, 0} 483 {0, 0, 0, 0}
477 }; 484 };
478 485
479 debug_colored = FALSE; 486 debug_colored = FALSE;
480 #ifdef DEBUG 487 #ifdef DEBUG
610 617
611 /* scan command-line options */ 618 /* scan command-line options */
612 opterr = 1; 619 opterr = 1;
613 while ((opt = getopt_long(argc, argv, 620 while ((opt = getopt_long(argc, argv,
614 #ifndef _WIN32 621 #ifndef _WIN32
615 "c:dfhmnl::s:v", 622 "c:dfhmnl::s:vi:",
616 #else 623 #else
617 "c:dfhmnl::v", 624 "c:dfhmnl::vi:",
618 #endif 625 #endif
619 long_options, NULL)) != -1) { 626 long_options, NULL)) != -1) {
620 switch (opt) { 627 switch (opt) {
621 case 'c': /* config dir */ 628 case 'c': /* config dir */
622 g_free(opt_config_dir_arg); 629 g_free(opt_config_dir_arg);
654 break; 661 break;
655 case 'D': /* --display */ 662 case 'D': /* --display */
656 case 'S': /* --sync */ 663 case 'S': /* --sync */
657 /* handled by gtk_init_check below */ 664 /* handled by gtk_init_check below */
658 break; 665 break;
666 #ifdef ENABLE_INTROSPECTION
667 case 'i': /* introspection */
668 g_irepository_dump(optarg, NULL);
669 return 0;
670 break;
671 #endif
659 case '?': /* show terse help */ 672 case '?': /* show terse help */
660 default: 673 default:
661 show_usage(argv[0], TRUE); 674 show_usage(argv[0], TRUE);
662 #ifdef HAVE_SIGNAL_H 675 #ifdef HAVE_SIGNAL_H
663 g_free(segfault_message); 676 g_free(segfault_message);

mercurial