Skip to content

Commit

Permalink
gui: Add rotation option
Browse files Browse the repository at this point in the history
Signed-off-by: Yan Burman <[email protected]>
  • Loading branch information
yanburman committed May 7, 2017
1 parent 162e648 commit 3d1df28
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 59 deletions.
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v1.2.0
* Added support for stills taken in rotated orientation
* Added support for stills taken in rotated orientation (in GUI as well)
* Add full support for crop FOV in M20 and SJ5000x
* Add support for non-zero stride
* Some slight performance optimizations
Expand Down
8 changes: 7 additions & 1 deletion gui/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def __init__(self, *args, **kwds):
self.tiff_checkbox = wx.CheckBox(self, wx.ID_ANY, _("TIFF"))
self.dng_checkbox = wx.CheckBox(self, wx.ID_ANY, _("DNG"))
self.thumb_checkbox = wx.CheckBox(self, wx.ID_ANY, _("Thumbnail"))
self.rotate_checkbox = wx.CheckBox(self, wx.ID_ANY, _("Rotation"))
self.convert_button = wx.Button(self, wx.ID_ANY, _("Convert"))
self.status_text_ctrl = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
self.abort_button = wx.Button(self, wx.ID_ANY, _("Abort"))
Expand Down Expand Up @@ -156,13 +157,14 @@ def __set_properties(self):
self.dng_checkbox.SetToolTip(wx.ToolTip(_("Convert to DNG")))
self.dng_checkbox.SetValue(1)
self.thumb_checkbox.SetToolTip(wx.ToolTip(_("Create thumbnail (needed by some editors e.g. darktable)")))
self.rotate_checkbox.SetToolTip(wx.ToolTip(_("Check if images were taken with rotation enabled in camera")))
self.abort_button.Enable(False)
# end wxGlade

def __do_layout(self):
# begin wxGlade: MainFrame.__do_layout
grid_sizer_1 = wx.FlexGridSizer(5, 2, 0, 0)
grid_sizer_2 = wx.GridSizer(1, 3, 0, 0)
grid_sizer_2 = wx.GridSizer(1, 4, 0, 0)
grid_sizer_1.Add((20, 20), 0, 0, 0)
grid_sizer_1.Add(self.logo_bitmap, 0, wx.ALIGN_CENTER, 0)
grid_sizer_1.Add(self.src_dir_text_ctrl, 0, wx.EXPAND, 0)
Expand All @@ -172,6 +174,7 @@ def __do_layout(self):
grid_sizer_2.Add(self.tiff_checkbox, 0, 0, 0)
grid_sizer_2.Add(self.dng_checkbox, 0, 0, 0)
grid_sizer_2.Add(self.thumb_checkbox, 0, 0, 0)
grid_sizer_2.Add(self.rotate_checkbox, 0, 0, 0)
grid_sizer_1.Add(grid_sizer_2, 1, 0, 0)
grid_sizer_1.Add(self.convert_button, 0, wx.ALL | wx.EXPAND, 2)
grid_sizer_1.Add(self.status_text_ctrl, 0, wx.EXPAND, 0)
Expand Down Expand Up @@ -218,6 +221,9 @@ def OnConvert(self, event): # wxGlade: MainFrame.<event_handler>
if self.thumb_checkbox.IsChecked():
args.append('-m')

if self.rotate_checkbox.IsChecked():
args.append('-r')

if not self.dest_dir_text_ctrl.IsEmpty():
args.append('-o')
args.append(self.dest_dir_text_ctrl.GetValue())
Expand Down
10 changes: 9 additions & 1 deletion gui/converter.wxg
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<object class="wxGridSizer" name="grid_sizer_2" base="EditGridSizer">
<hgap>0</hgap>
<rows>1</rows>
<cols>3</cols>
<cols>4</cols>
<vgap>0</vgap>
<object class="sizeritem">
<border>0</border>
Expand All @@ -126,6 +126,14 @@
<tooltip>Create thumbnail (needed by some editors e.g. darktable)</tooltip>
</object>
</object>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="wxCheckBox" name="rotate_checkbox" base="EditCheckBox">
<label>Rotation</label>
<tooltip>Check if images were taken with rotation enabled in camera</tooltip>
</object>
</object>
</object>
</object>
<object class="sizeritem">
Expand Down
Binary file modified gui/locale/en/LC_MESSAGES/converter.mo
Binary file not shown.
34 changes: 21 additions & 13 deletions gui/locale/en/LC_MESSAGES/converter.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-13 17:19+0300\n"
"PO-Revision-Date: 2017-04-13 17:19+0300\n"
"POT-Creation-Date: 2017-05-07 10:25+0300\n"
"PO-Revision-Date: 2017-05-07 10:26+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en\n"
Expand All @@ -30,35 +30,39 @@ msgstr ""
msgid "&Help"
msgstr ""

#: converter.py:132
#: converter.py:133
msgid "Abort"
msgstr ""

#: converter.py:42 converter.py:117
msgid "About"
msgstr ""

#: converter.py:194
#: converter.py:160
msgid "Check if images were taken with rotation enabled in camera"
msgstr ""

#: converter.py:197
msgid "Choose destination folder"
msgstr ""

#: converter.py:187
#: converter.py:190
msgid "Choose source folder"
msgstr ""

#: converter.py:130
#: converter.py:131
msgid "Convert"
msgstr ""

#: converter.py:156
#: converter.py:157
msgid "Convert to DNG"
msgstr ""

#: converter.py:155
#: converter.py:156
msgid "Convert to TIFF"
msgstr ""

#: converter.py:158
#: converter.py:159
msgid "Create thumbnail (needed by some editors e.g. darktable)"
msgstr ""

Expand All @@ -74,23 +78,27 @@ msgstr ""
msgid "E&xit\tCtrl-Q"
msgstr ""

#: converter.py:204 converter.py:226
#: converter.py:207 converter.py:232
msgid "Error!"
msgstr ""

#: converter.py:113
msgid "Exit"
msgstr ""

#: converter.py:204
#: converter.py:207
msgid "Must select at least one output format (DNG/TIFF)"
msgstr ""

#: converter.py:226
#: converter.py:232
msgid "Must select source folder"
msgstr ""

#: converter.py:152
#: converter.py:130
msgid "Rotation"
msgstr ""

#: converter.py:153
msgid "SJCAM RAW Converter"
msgstr ""

Expand Down
Binary file modified gui/locale/he/LC_MESSAGES/converter.mo
Binary file not shown.
36 changes: 22 additions & 14 deletions gui/locale/he/LC_MESSAGES/converter.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-13 17:20+0300\n"
"PO-Revision-Date: 2017-04-13 17:27+0300\n"
"POT-Creation-Date: 2017-05-07 10:27+0300\n"
"PO-Revision-Date: 2017-05-07 10:29+0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: he\n"
Expand All @@ -30,35 +30,39 @@ msgstr "&קובץ"
msgid "&Help"
msgstr "&עזרא"

#: converter.py:132
#: converter.py:133
msgid "Abort"
msgstr "הפסק"

#: converter.py:42 converter.py:117
msgid "About"
msgstr "אודות"

#: converter.py:194
#: converter.py:160
msgid "Check if images were taken with rotation enabled in camera"
msgstr "יש לבחור אם רוטציה הופעלה במצלמה"

#: converter.py:197
msgid "Choose destination folder"
msgstr "בחר תיקיית יעד"

#: converter.py:187
#: converter.py:190
msgid "Choose source folder"
msgstr "בחר תיקיית מקור"

#: converter.py:130
#: converter.py:131
msgid "Convert"
msgstr "המר"

#: converter.py:156
#: converter.py:157
msgid "Convert to DNG"
msgstr "המר ל-DNG"

#: converter.py:155
#: converter.py:156
msgid "Convert to TIFF"
msgstr "המר ל-TIFF"

#: converter.py:158
#: converter.py:159
msgid "Create thumbnail (needed by some editors e.g. darktable)"
msgstr "ייצר thumbnail (דרוש ע\"י תוכנות מסוימות כגון darktable )"

Expand All @@ -74,23 +78,27 @@ msgstr "תיקיית יעד"
msgid "E&xit\tCtrl-Q"
msgstr "&יציאה\tCTRL-Q"

#: converter.py:204 converter.py:226
#: converter.py:207 converter.py:232
msgid "Error!"
msgstr "שגיאה!"

#: converter.py:113
msgid "Exit"
msgstr "יציאה"

#: converter.py:204
#: converter.py:207
msgid "Must select at least one output format (DNG/TIFF)"
msgstr "יש לבחור לפחות פורמט אחד (DNG/TIFF)"

#: converter.py:226
#: converter.py:232
msgid "Must select source folder"
msgstr "תיקיית מקור לא נבחרה"

#: converter.py:152
#: converter.py:130
msgid "Rotation"
msgstr "רוטציה"

#: converter.py:153
msgid "SJCAM RAW Converter"
msgstr "ממיר SJCAM RAW"

Expand All @@ -108,7 +116,7 @@ msgstr ""

#: converter.py:129
msgid "Thumbnail"
msgstr ""
msgstr "תמונה ממוזערת"

#~ msgid "Convert to TIFF as well as DNG"
#~ msgstr "המר ל-TIFF בנוסף ל-DNG"
32 changes: 20 additions & 12 deletions gui/locale/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-04-13 17:17+0300\n"
"POT-Creation-Date: 2017-05-07 10:24+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand All @@ -29,35 +29,39 @@ msgstr ""
msgid "&Help"
msgstr ""

#: converter.py:132
#: converter.py:133
msgid "Abort"
msgstr ""

#: converter.py:42 converter.py:117
msgid "About"
msgstr ""

#: converter.py:194
#: converter.py:160
msgid "Check if images were taken with rotation enabled in camera"
msgstr ""

#: converter.py:197
msgid "Choose destination folder"
msgstr ""

#: converter.py:187
#: converter.py:190
msgid "Choose source folder"
msgstr ""

#: converter.py:130
#: converter.py:131
msgid "Convert"
msgstr ""

#: converter.py:156
#: converter.py:157
msgid "Convert to DNG"
msgstr ""

#: converter.py:155
#: converter.py:156
msgid "Convert to TIFF"
msgstr ""

#: converter.py:158
#: converter.py:159
msgid "Create thumbnail (needed by some editors e.g. darktable)"
msgstr ""

Expand All @@ -73,23 +77,27 @@ msgstr ""
msgid "E&xit\tCtrl-Q"
msgstr ""

#: converter.py:204 converter.py:226
#: converter.py:207 converter.py:232
msgid "Error!"
msgstr ""

#: converter.py:113
msgid "Exit"
msgstr ""

#: converter.py:204
#: converter.py:207
msgid "Must select at least one output format (DNG/TIFF)"
msgstr ""

#: converter.py:226
#: converter.py:232
msgid "Must select source folder"
msgstr ""

#: converter.py:152
#: converter.py:130
msgid "Rotation"
msgstr ""

#: converter.py:153
msgid "SJCAM RAW Converter"
msgstr ""

Expand Down
Binary file modified gui/locale/ru/LC_MESSAGES/converter.mo
Binary file not shown.
Loading

0 comments on commit 3d1df28

Please sign in to comment.