~kokoto-java/kazam/depencie-and-stuff

« back to all changes in this revision

Viewing changes to bin/kazam

  • Committer: David Klasinc
  • Date: 2012-11-11 19:36:05 UTC
  • mfrom: (193.2.82 unstable)
  • Revision ID: bigwhale@lubica.net-20121111193605-vh3fxglxwfhyh8ne
Merged from unstable branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
                        help = "silent start",
89
89
                        default = False)
90
90
 
 
91
    parser.add_argument("-f", "--fullscreen",
 
92
                        action = "store_true",
 
93
                        help = "instant screenshot of full screen",
 
94
                        default = False)
 
95
 
 
96
    parser.add_argument("-a", "--area",
 
97
                        action = "store_true",
 
98
                        help = "instant screenshot of preselected screen area",
 
99
                        default = False)
 
100
 
 
101
    parser.add_argument("-w", "--window",
 
102
                        action = "store_true",
 
103
                        help = "instant screenshot of active window",
 
104
                        default = False)
 
105
 
 
106
    parser.add_argument("-p", "--preferences",
 
107
                        action = "store_true",
 
108
                        help = "show preferences window",
 
109
                        default = False)
 
110
 
 
111
    parser.add_argument("-g", "--godmode",
 
112
                        action = "store_true",
 
113
                        help = "god mode of capture",
 
114
                        default = False)
 
115
 
91
116
    args = parser.parse_args()
92
117
    if args.debug:
93
118
        logger.setLevel(logging.DEBUG)
94
119
    else:
95
120
        logger.setLevel(logging.INFO)
96
121
 
97
 
    from kazam.app import KazamApp
98
 
 
99
122
    logger.debug("Starting ...")
100
 
    appWindow = KazamApp(datadir, dist, args.debug, args.test, args.nosound, args.silent)
 
123
 
 
124
    if args.fullscreen:
 
125
        from kazam.instant import InstantApp
 
126
        app = InstantApp(datadir, dist, args.debug, 1) # MODE_ALL
 
127
    elif args.area:
 
128
        from kazam.instant import InstantApp
 
129
        app = InstantApp(datadir, dist, args.debug, 2) # MODE_AREA
 
130
    elif args.window:
 
131
        from kazam.instant import InstantApp
 
132
        app = InstantApp(datadir, dist, args.debug, 4) # MODE_ACTIVE
 
133
    elif args.godmode:
 
134
        from kazam.instant import InstantApp
 
135
        app = InstantApp(datadir, dist, args.debug, 666) # MODE_ACTIVE
 
136
    elif args.preferences:
 
137
        from kazam.instant import InstantApp
 
138
        app = InstantApp(datadir, dist, args.debug, 0, preferences=True)
 
139
    else:
 
140
        from kazam.app import KazamApp
 
141
        appWindow = KazamApp(datadir, dist, args.debug, args.test, args.nosound, args.silent)
 
142
 
101
143
    Gtk.main()
102
144
    logger.debug("Finishing ...")