File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -211,10 +211,16 @@ def main
211
211
exit
212
212
end
213
213
214
+ # load and check GUI availability
215
+ begin
216
+ require 'gtk2'
217
+ rescue
218
+ opt . no_gui = true
219
+ end
220
+
214
221
if ( opt . no_gui || ARGV . size >= 3 )
215
222
RbPhoto ::Import ::Cui . new ( opt )
216
223
else
217
- require 'gtk2'
218
224
RbPhoto ::Import ::Gui . new ( opt )
219
225
end
220
226
end
Original file line number Diff line number Diff line change @@ -4,8 +4,9 @@ rbphoto (0.2.1) unstable; urgency=low
4
4
* Change 'help' and 'version' instance method to class method on
5
5
RbPhoto::Import class
6
6
* Change load timing for gtk library
7
+ * Check GUI availability and fallback to CUI mode
7
8
8
- -- Taku YASUI <
[email protected] > Mon, 08 Jun 2009 22:
27:19 +0900
9
+ -- Taku YASUI <
[email protected] > Mon, 08 Jun 2009 22:
38:28 +0900
9
10
10
11
rbphoto (0.2.0) unstable; urgency=low
11
12
You can’t perform that action at this time.
0 commit comments