Browse Source

Add 'source selection' dialog

Add a 'source selection' dialog to replace the 'enter a name' dialog.
This new dialog allows you to make new instances of pre-existing sources
so that you can add a pre-existing source to a different scene, or in to
the same scene more than once.

Also started implementing locale.

Comtemplating switching to JSON-based locale later, so we can add things
like descriptions/disambiguation, and so we can use jansson's built-in
hash table when doing the string lookup.
jp9000 11 years ago
parent
commit
345c70138e

+ 109 - 74
build/data/obs-studio/locale/en.txt

@@ -1,76 +1,111 @@
+# Language and language region of this file
 Language="English"
-
-DesktopDevice1="Desktop Audio"
-DesktopDevice2="Desktop Audio 2"
-AuxDevice1="Mic/Aux"
-AuxDevice2="Mic/Aux 2"
-AuxDevice3="Mic/Aux 3"
-AuxDevice4="Mic/Aux 4"
-
-Studio.Basic.Scene="Scene"
-Studio.Basic.DisplayCapture="Display Capture"
-
-MainMenu.File="File"
-
-MainMenu.File.New="New"
-MainMenu.File.Open="Open"
-MainMenu.FIle.Save="Save"
-
-MainWindow.AddSceneDlg.Title="Add Scene"
-MainWindow.AddSceneDlg.Text="Please enter the name of the scene"
-
-MainWindow.AddSourceDlg.Title="Add Source"
-MainWindow.AddSourceDlg.Text="Please enter the name of the source"
-
-MainWindow.NameExists.Title="Name already exists"
-MainWindow.NameExists.Text="The name is already in use by another source."
-
-MainWindow.NoNameEntered="Please enter a valid name"
-
-MainWindow.Exit="Exit"
-MainWindow.Lock="Lock Preview"
-MainWindow.Preview="Enable Preview"
-MainWindow.Scenes="Scenes:"
-MainWindow.Settings="Settings"
-MainWindow.Sources="Sources:"
-MainWindow.StartRecording="Start Recording"
-MainWindow.StartStream="Start Stream"
-MainWindow.StopRecording="Stop Recording"
-MainWindow.StopStream="Stop Stream"
-MainWindow.Volume="Volume:"
-
+Region="United States"
+
+# commonly shared locale
+OK="OK"
+Apply="Apply"
+Cancel="Cancel"
+Yes="Yes"
+No="No"
+Add="Add"
+Remove="Remove"
+Properties="Properties"
+MoveUp="Move Up"
+MoveDown="Move Down"
 Settings="Settings"
-
-Settings.ProgramRestart="The program must be restarted for these settings to take effect."
-Settings.ConfirmTitle="Confirm Changes"
-Settings.Confirm="You have unsaved changes.  Save changes?"
-
-Settings.General="General"
-Settings.General.Language="Language:"
-
-Settings.Streams="Streams"
-Settings.Streams.AddName.Title="Add Stream"
-Settings.Streams.AddName.Text="Please enter the name of the stream"
-Settings.Streams.Exists.Title="Stream already exists"
-Settings.Streams.Exists.Text="The name is already in use by another stream"
-
-Settings.Outputs="Outputs"
-
-Settings.Video="Video"
-Settings.Video.Adapter="Video Adapter:"
-Settings.Video.BaseRes="Base Resolution:"
-Settings.Video.OutputRes="Output Resolution:"
-Settings.Video.DownscaleFilter="Downscale Filter:"
-Settings.Video.DisableAeroWindows="Disable Aero (Windows only)"
-Settings.Video.FPS="FPS:"
-Settings.Video.FPS.Common="Common FPS Values"
-Settings.Video.FPS.Integer="Integer FPS Value"
-Settings.Video.FPS.Fraction="Fractional FPS Value"
-Settings.Video.FPS.Nanoseconds="Frame Interval (nanoseconds)"
-Settings.Video.FPS.Numerator="Numerator:"
-Settings.Video.FPS.Denominator="Denominator:"
-Settings.Video.Renderer="Renderer:"
-Settings.Video.InvalidResolution="Invalid resolution value.  Must be [width]x[height] (i.e. 1920x1080)"
-Settings.Video.CurrentlyActive="Video output is currently active.  Please turn off any outputs to change video settings."
-
-Settings.Audio="Audio"
+Exit="Exit"
+Volume="Volume"
+Browse="Browse"
+Mono="Mono"
+Stereo="Stereo"
+
+# "name already exists" dialog box
+NameExists.Title="Name already exists"
+NameExists.Text="The name is already in use."
+
+NoNameEntered="Please enter a valid name"
+
+# audio device names
+Basic.DesktopDevice1="Desktop Audio"
+Basic.DesktopDevice2="Desktop Audio 2"
+Basic.AuxDevice1="Mic/Aux"
+Basic.AuxDevice2="Mic/Aux 2"
+Basic.AuxDevice3="Mic/Aux 3"
+Basic.AuxDevice4="Mic/Aux 4"
+
+# startup scene/capture
+Basic.Scene="Scene"
+Basic.DisplayCapture="Display Capture"
+
+# add scene dialog
+Basic.Main.AddSceneDlg.Title="Add Scene"
+Basic.Main.AddSceneDlg.Text="Please enter the name of the scene"
+
+# add source dialog
+Basic.SourceSelect.CreateNew="Create new"
+Basic.SourceSelect.AddExisting="Add Existing"
+
+# basic mode main window
+Basic.Main.Scenes="Scenes"
+Basic.Main.Sources="Sources"
+Basic.Main.StartRecording="Start Recording"
+Basic.Main.StartStreaming="Start Streaming"
+Basic.Main.StopRecording="Stop Recording"
+Basic.Main.StopStreaming="Stop Streaming"
+
+# basic mode menu
+Basic.MainMenu.File="&File"
+Basic.MainMenu.File.Export="&Export"
+Basic.MainMenu.File.Import="&Import"
+Basic.MainMenu.File.Settings="&Settings"
+Basic.MainMenu.File.Exit="E&xit"
+
+# basic mode settings dialog
+Basic.Settings.ProgramRestart="The program must be restarted for these settings to take effect."
+Basic.Settings.ConfirmTitle="Confirm Changes"
+Basic.Settings.Confirm="You have unsaved changes.  Save changes?"
+
+# basic mode 'general' settings
+Basic.Settings.General="General"
+Basic.Settings.General.Language="Language:"
+
+# basic mode 'stream' settings
+Basic.Settings.Stream="Stream"
+Basic.Settings.Stream.StreamType="Stream Type"
+
+# basic mode 'output' settings
+Basic.Settings.Output="Output"
+Basic.Settings.Output.Mode="Output Mode"
+Basic.Settings.Output.Mode.Simple="Simple (Stream and/or record)"
+Basic.Settings.Output.Mode.Advanced="Advanced (Custom output type)"
+Basic.Settings.Output.Simple.SavePath="Recording Path"
+Basic.Settings.Output.Simple.VideoBitrate="Video Bitrate"
+Basic.Settings.output.Simple.AudioBitrate="Audio Bitrate"
+
+# basic mode 'video' settings
+Basic.Settings.Video="Video"
+Basic.Settings.Video.Adapter="Video Adapter:"
+Basic.Settings.Video.BaseResolution="Base Resolution:"
+Basic.Settings.Video.ScaledResolution="Scaled Resolution:"
+Basic.Settings.Video.DownscaleFilter="Downscale Filter:"
+Basic.Settings.Video.DisableAeroWindows="Disable Aero (Windows only)"
+Basic.Settings.Video.FPS="FPS:"
+Basic.Settings.Video.FPSCommon="Common FPS Values"
+Basic.Settings.Video.FPSInteger="Integer FPS Value"
+Basic.Settings.Video.FPSFraction="Fractional FPS Value"
+Basic.Settings.Video.Numerator="Numerator:"
+Basic.Settings.Video.Denominator="Denominator:"
+Basic.Settings.Video.Renderer="Renderer:"
+Basic.Settings.Video.InvalidResolution="Invalid resolution value.  Must be [width]x[height] (i.e. 1920x1080)"
+Basic.Settings.Video.CurrentlyActive="Video output is currently active.  Please turn off any outputs to change video settings."
+
+# basic mode 'audio' settings
+Basic.Settings.Audio="Audio"
+Basic.Settings.Audio.SampleRate="Sample Rate"
+Basic.Settings.Audio.Channels="Channels"
+Basic.Settings.Audio.DesktopDevice="Desktop Audio Device"
+Basic.Settings.Audio.DesktopDevice2="Desktop Audio Device 2"
+Basic.Settings.Audio.AuxDevice="Mic/Auxilary Audio Device"
+Basic.Settings.Audio.AuxDevice2="Mic/Auxilary Audio Device 2"
+Basic.Settings.Audio.AuxDevice3="Mic/Auxilary Audio Device 3"

+ 3 - 0
obs/CMakeLists.txt

@@ -57,6 +57,7 @@ set(obs_SOURCES
 	window-basic-main.cpp
 	window-basic-settings.cpp
 	window-basic-properties.cpp
+	window-basic-source-select.cpp
 	window-namedialog.cpp
 	properties-view.cpp
 	volume-control.cpp
@@ -69,6 +70,7 @@ set(obs_HEADERS
 	window-basic-main.hpp
 	window-basic-settings.hpp
 	window-basic-properties.hpp
+	window-basic-source-select.hpp
 	window-namedialog.hpp
 	properties-view.hpp
 	display-helpers.hpp
@@ -80,6 +82,7 @@ set(obs_UI
 	forms/NameDialog.ui
 	forms/OBSBasic.ui
 	forms/OBSBasicSettings.ui
+	forms/OBSBasicSourceSelect.ui
 	forms/OBSBasicProperties.ui)
 
 set(obs_QRC

+ 24 - 25
obs/forms/OBSBasic.ui

@@ -24,7 +24,7 @@
    </size>
   </property>
   <property name="windowTitle">
-   <string>MainWindow</string>
+   <string>.MainWindow</string>
   </property>
   <widget class="QWidget" name="centralwidget">
    <layout class="QVBoxLayout" name="verticalLayout">
@@ -107,7 +107,7 @@
           <item>
            <widget class="QLabel" name="label">
             <property name="text">
-             <string>Scenes</string>
+             <string>Basic.Main.Scenes</string>
             </property>
            </widget>
           </item>
@@ -215,7 +215,7 @@
           <item>
            <widget class="QLabel" name="label_2">
             <property name="text">
-             <string>Sources</string>
+             <string>Basic.Main.Sources</string>
             </property>
            </widget>
           </item>
@@ -322,7 +322,7 @@
               <rect>
                <x>0</x>
                <y>0</y>
-               <width>233</width>
+               <width>148</width>
                <height>16</height>
               </rect>
              </property>
@@ -391,7 +391,7 @@
              <bool>true</bool>
             </property>
             <property name="text">
-             <string>Start Streaming</string>
+             <string>Basic.Main.StartStreaming</string>
             </property>
             <property name="checkable">
              <bool>false</bool>
@@ -404,7 +404,7 @@
              <bool>false</bool>
             </property>
             <property name="text">
-             <string>Start Recording</string>
+             <string>Basic.Main.StartRecording</string>
             </property>
            </widget>
           </item>
@@ -436,16 +436,15 @@
      <x>0</x>
      <y>0</y>
      <width>927</width>
-     <height>24</height>
+     <height>22</height>
     </rect>
    </property>
    <widget class="QMenu" name="menu_File">
     <property name="title">
-     <string>&amp;File</string>
+     <string>Basic.MainMenu.File</string>
     </property>
-    <addaction name="action_New"/>
-    <addaction name="action_Open"/>
     <addaction name="action_Save"/>
+    <addaction name="action_Open"/>
     <addaction name="separator"/>
     <addaction name="action_Settings"/>
     <addaction name="separator"/>
@@ -460,7 +459,7 @@
      <normaloff>:/res/images/add.ico</normaloff>:/res/images/add.ico</iconset>
    </property>
    <property name="text">
-    <string>AddScene</string>
+    <string>Add</string>
    </property>
   </action>
   <action name="actionAddSource">
@@ -469,7 +468,7 @@
      <normaloff>:/res/images/add.ico</normaloff>:/res/images/add.ico</iconset>
    </property>
    <property name="text">
-    <string>AddSource</string>
+    <string>Add</string>
    </property>
   </action>
   <action name="actionRemoveScene">
@@ -478,7 +477,7 @@
      <normaloff>:/res/images/list_remove.png</normaloff>:/res/images/list_remove.png</iconset>
    </property>
    <property name="text">
-    <string>RemoveScene</string>
+    <string>Remove</string>
    </property>
   </action>
   <action name="actionRemoveSource">
@@ -487,7 +486,7 @@
      <normaloff>:/res/images/list_remove.png</normaloff>:/res/images/list_remove.png</iconset>
    </property>
    <property name="text">
-    <string>RemoveSource</string>
+    <string>Remove</string>
    </property>
   </action>
   <action name="actionSceneProperties">
@@ -499,7 +498,7 @@
      <normaloff>:/res/images/properties.ico</normaloff>:/res/images/properties.ico</iconset>
    </property>
    <property name="text">
-    <string>SceneProperties</string>
+    <string>Properties</string>
    </property>
   </action>
   <action name="actionSourceProperties">
@@ -511,7 +510,7 @@
      <normaloff>:/res/images/properties.ico</normaloff>:/res/images/properties.ico</iconset>
    </property>
    <property name="text">
-    <string>SourceProperties</string>
+    <string>Properties</string>
    </property>
   </action>
   <action name="actionSceneUp">
@@ -523,7 +522,7 @@
      <normaloff>:/res/images/up.ico</normaloff>:/res/images/up.ico</iconset>
    </property>
    <property name="text">
-    <string>SceneMoveUp</string>
+    <string>Basic.Main.MoveUp</string>
    </property>
   </action>
   <action name="actionSourceUp">
@@ -535,7 +534,7 @@
      <normaloff>:/res/images/up.ico</normaloff>:/res/images/up.ico</iconset>
    </property>
    <property name="text">
-    <string>SourceMoveUp</string>
+    <string>MoveUp</string>
    </property>
   </action>
   <action name="actionSceneDown">
@@ -547,7 +546,7 @@
      <normaloff>:/res/images/down.ico</normaloff>:/res/images/down.ico</iconset>
    </property>
    <property name="text">
-    <string>SceneMoveDown</string>
+    <string>Basic.Main.MoveDown</string>
    </property>
   </action>
   <action name="actionSourceDown">
@@ -559,32 +558,32 @@
      <normaloff>:/res/images/down.ico</normaloff>:/res/images/down.ico</iconset>
    </property>
    <property name="text">
-    <string>SourceMoveDown</string>
+    <string>MoveDown</string>
    </property>
   </action>
   <action name="action_New">
    <property name="text">
-    <string>&amp;New</string>
+    <string>Basic.MainMenu.SwitchMode</string>
    </property>
   </action>
   <action name="action_Open">
    <property name="text">
-    <string>&amp;Open</string>
+    <string>Basic.MainMenu.File.Export</string>
    </property>
   </action>
   <action name="action_Save">
    <property name="text">
-    <string>&amp;Save</string>
+    <string>Basic.MainMenu.File.Import</string>
    </property>
   </action>
   <action name="action_Settings">
    <property name="text">
-    <string>Settings</string>
+    <string>Basic.MainMenu.File.Settings</string>
    </property>
   </action>
   <action name="actionE_xit">
    <property name="text">
-    <string>E&amp;xit</string>
+    <string>Basic.MainMenu.File.Exit</string>
    </property>
   </action>
  </widget>

+ 50 - 38
obs/forms/OBSBasicSettings.ui

@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>752</width>
+    <width>770</width>
     <height>602</height>
    </rect>
   </property>
@@ -17,7 +17,7 @@
    </sizepolicy>
   </property>
   <property name="windowTitle">
-   <string>Settings</string>
+   <string>Basic.Settings</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
@@ -44,7 +44,7 @@
        </property>
        <item>
         <property name="text">
-         <string>General</string>
+         <string>Basic.Settings.General</string>
         </property>
         <property name="icon">
          <iconset resource="obs.qrc">
@@ -53,7 +53,7 @@
        </item>
        <item>
         <property name="text">
-         <string>Stream</string>
+         <string>Basic.Settings.Stream</string>
         </property>
         <property name="icon">
          <iconset resource="obs.qrc">
@@ -62,7 +62,7 @@
        </item>
        <item>
         <property name="text">
-         <string>Output</string>
+         <string>Basic.Settings.Output</string>
         </property>
         <property name="icon">
          <iconset resource="obs.qrc">
@@ -71,7 +71,7 @@
        </item>
        <item>
         <property name="text">
-         <string>Audio</string>
+         <string>Basic.Settings.Audio</string>
         </property>
         <property name="icon">
          <iconset resource="obs.qrc">
@@ -80,7 +80,7 @@
        </item>
        <item>
         <property name="text">
-         <string>Video</string>
+         <string>Basic.Settings.Video</string>
         </property>
         <property name="icon">
          <iconset resource="obs.qrc">
@@ -92,10 +92,13 @@
      <item>
       <widget class="QStackedWidget" name="settingsPages">
        <property name="currentIndex">
-        <number>2</number>
+        <number>0</number>
        </property>
        <widget class="QWidget" name="generalPage">
         <layout class="QFormLayout" name="formLayout_2">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+         </property>
          <property name="labelAlignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
@@ -119,12 +122,12 @@
           <widget class="QLabel" name="label">
            <property name="minimumSize">
             <size>
-             <width>150</width>
+             <width>170</width>
              <height>0</height>
             </size>
            </property>
            <property name="text">
-            <string>Language:</string>
+            <string>Basic.Settings.General.Language</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -204,7 +207,7 @@
                      </size>
                     </property>
                     <property name="text">
-                     <string>Stream Type</string>
+                     <string>Basic.Settings.Stream.StreamType</string>
                     </property>
                     <property name="alignment">
                      <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -267,7 +270,7 @@
                </size>
               </property>
               <property name="text">
-               <string>Mode</string>
+               <string>Basic.Settings.Output.Mode</string>
               </property>
               <property name="alignment">
                <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -290,12 +293,12 @@
               </property>
               <item>
                <property name="text">
-                <string>Simple</string>
+                <string>Basic.Settings.Output.Mode.Simple</string>
                </property>
               </item>
               <item>
                <property name="text">
-                <string>Custom</string>
+                <string>Basic.Settings.Output.Mode.Custom</string>
                </property>
               </item>
              </widget>
@@ -368,7 +371,7 @@
                       </size>
                      </property>
                      <property name="text">
-                      <string>Save Path</string>
+                      <string>Basic.Settings.Output.Simple.SavePath</string>
                      </property>
                      <property name="alignment">
                       <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -399,7 +402,7 @@
                    <item row="1" column="0">
                     <widget class="QLabel" name="label_19">
                      <property name="text">
-                      <string>Video Bitrate</string>
+                      <string>Basic.Settings.Output.Simple.VideoBitrate</string>
                      </property>
                     </widget>
                    </item>
@@ -419,7 +422,7 @@
                    <item row="2" column="0">
                     <widget class="QLabel" name="label_20">
                      <property name="text">
-                      <string>Audio Bitrate</string>
+                      <string>Basic.Settings.Output.Simple.AudioBitrate</string>
                      </property>
                     </widget>
                    </item>
@@ -485,13 +488,16 @@
        </widget>
        <widget class="QWidget" name="audioPage">
         <layout class="QFormLayout" name="formLayout">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+         </property>
          <property name="labelAlignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
          <item row="0" column="0">
           <widget class="QLabel" name="label_14">
            <property name="text">
-            <string>Sample Rate:</string>
+            <string>Basic.Settings.Audio.SampleRate</string>
            </property>
           </widget>
          </item>
@@ -523,17 +529,17 @@
          <item row="1" column="0">
           <widget class="QLabel" name="label_15">
            <property name="text">
-            <string>Channels:</string>
+            <string>Basic.Settings.Audio.Channels</string>
            </property>
           </widget>
          </item>
          <item row="1" column="1">
           <widget class="QComboBox" name="channelSetup">
            <property name="currentText">
-            <string>Stereo</string>
+            <string>Mono</string>
            </property>
            <property name="currentIndex">
-            <number>1</number>
+            <number>0</number>
            </property>
            <item>
             <property name="text">
@@ -556,7 +562,7 @@
             </size>
            </property>
            <property name="text">
-            <string>Desktop Audio Device 1:</string>
+            <string>Basic.Settings.Audio.DesktopDevice</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -573,7 +579,7 @@
          <item row="3" column="0">
           <widget class="QLabel" name="label_3">
            <property name="text">
-            <string>Desktop Audio Device 2:</string>
+            <string>Basic.Settings.Audio.DesktopDevice2</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -590,7 +596,7 @@
          <item row="4" column="0">
           <widget class="QLabel" name="label_4">
            <property name="text">
-            <string>Mic/Aux Audio Device 1:</string>
+            <string>Basic.Settings.Audio.AuxDevice</string>
            </property>
           </widget>
          </item>
@@ -604,7 +610,7 @@
          <item row="5" column="0">
           <widget class="QLabel" name="label_5">
            <property name="text">
-            <string>Mic/Aux Audio Device 2:</string>
+            <string>Basic.Settings.Audio.AuxDevice2</string>
            </property>
           </widget>
          </item>
@@ -618,7 +624,7 @@
          <item row="6" column="0">
           <widget class="QLabel" name="label_6">
            <property name="text">
-            <string>Mic/Aux Audio Device 3:</string>
+            <string>Basic.Settings.Audio.AuxDevice3</string>
            </property>
           </widget>
          </item>
@@ -646,13 +652,16 @@
        </widget>
        <widget class="QWidget" name="videoPage">
         <layout class="QFormLayout" name="formLayout_3">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+         </property>
          <property name="labelAlignment">
           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
          </property>
          <item row="0" column="0">
           <widget class="QLabel" name="label_9">
            <property name="text">
-            <string>Renderer:</string>
+            <string>Basic.Settings.Video.Renderer</string>
            </property>
           </widget>
          </item>
@@ -672,7 +681,7 @@
             </size>
            </property>
            <property name="text">
-            <string>Video Adapter:</string>
+            <string>Basic.Settings.Video.Adapter</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -692,7 +701,7 @@
          <item row="2" column="0">
           <widget class="QLabel" name="label_8">
            <property name="text">
-            <string>Base Resolution:</string>
+            <string>Basic.Settings.Video.BaseResolution</string>
            </property>
           </widget>
          </item>
@@ -715,7 +724,7 @@
          <item row="3" column="0">
           <widget class="QLabel" name="label_10">
            <property name="text">
-            <string>Output Resolution:</string>
+            <string>Basic.Settings.Video.ScaledResolution</string>
            </property>
           </widget>
          </item>
@@ -739,7 +748,7 @@
          <item row="4" column="0">
           <widget class="QLabel" name="label_11">
            <property name="text">
-            <string>Downscale Filter:</string>
+            <string>Basic.Settings.Video.DownscaleFilter</string>
            </property>
           </widget>
          </item>
@@ -752,24 +761,24 @@
             </sizepolicy>
            </property>
            <property name="currentText">
-            <string>FPS (Common)</string>
+            <string>Basic.Settings.Video.FPSCommon</string>
            </property>
            <property name="sizeAdjustPolicy">
             <enum>QComboBox::AdjustToContents</enum>
            </property>
            <item>
             <property name="text">
-             <string>FPS (Common)</string>
+             <string>Basic.Settings.Video.FPSCommon</string>
             </property>
            </item>
            <item>
             <property name="text">
-             <string>FPS (Integer)</string>
+             <string>Basic.Settings.Video.FPSInteger</string>
             </property>
            </item>
            <item>
             <property name="text">
-             <string>FPS (Fractional)</string>
+             <string>Basic.Settings.Video.FPSFraction</string>
             </property>
            </item>
           </widget>
@@ -777,7 +786,7 @@
          <item row="5" column="1">
           <widget class="QStackedWidget" name="fpsTypes">
            <property name="currentIndex">
-            <number>0</number>
+            <number>2</number>
            </property>
            <widget class="QWidget" name="page">
             <layout class="QHBoxLayout" name="horizontalLayout_2">
@@ -871,6 +880,9 @@
            </widget>
            <widget class="QWidget" name="page_2">
             <layout class="QFormLayout" name="formLayout_4">
+             <property name="fieldGrowthPolicy">
+              <enum>QFormLayout::ExpandingFieldsGrow</enum>
+             </property>
              <property name="labelAlignment">
               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
              </property>
@@ -912,14 +924,14 @@
              <item row="0" column="0">
               <widget class="QLabel" name="label_12">
                <property name="text">
-                <string>Numerator:</string>
+                <string>Basic.Settings.Video.Numerator</string>
                </property>
               </widget>
              </item>
              <item row="1" column="0">
               <widget class="QLabel" name="label_13">
                <property name="text">
-                <string>Denomniator:</string>
+                <string>Basic.Settings.Video.Denominator</string>
                </property>
               </widget>
              </item>

+ 98 - 0
obs/forms/OBSBasicSourceSelect.ui

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>OBSBasicSourceSelect</class>
+ <widget class="QDialog" name="OBSBasicSourceSelect">
+  <property name="windowModality">
+   <enum>Qt::WindowModal</enum>
+  </property>
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>352</width>
+    <height>314</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Basic.SourceSelect</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <widget class="QRadioButton" name="radioButton">
+       <property name="text">
+        <string>Basic.SourceSelect.CreateNew</string>
+       </property>
+       <property name="checked">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="sourceName"/>
+     </item>
+     <item>
+      <widget class="QRadioButton" name="selectExisting">
+       <property name="text">
+        <string>Basic.SourceSelect.AddExisting</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QListWidget" name="sourceList">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="sortingEnabled">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="standardButtons">
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>radioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>sourceName</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>79</x>
+     <y>29</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>108</x>
+     <y>53</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>selectExisting</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>sourceList</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>51</x>
+     <y>80</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>65</x>
+     <y>128</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>

+ 16 - 2
obs/obs-app.cpp

@@ -163,8 +163,6 @@ OBSApp::OBSApp(int &argc, char **argv)
 		throw "Failed to initialize global config";
 	if (!InitLocale())
 		throw "Failed to load locale";
-
-	mainWindow = move(unique_ptr<OBSBasic>(new OBSBasic()));
 }
 
 const char *OBSApp::GetRenderModule() const
@@ -180,6 +178,7 @@ const char *OBSApp::GetRenderModule() const
 
 void OBSApp::OBSInit()
 {
+	mainWindow = move(unique_ptr<OBSBasic>(new OBSBasic()));
 	mainWindow->OBSInit();
 }
 
@@ -204,6 +203,19 @@ const char *OBSApp::OutputAudioSource() const
 	return OUTPUT_AUDIO_SOURCE;
 }
 
+QString OBSTranslator::translate(const char *context, const char *sourceText,
+		const char *disambiguation, int n) const
+{
+	const char *out = nullptr;
+	if (!text_lookup_getstr(App()->GetTextLookup(), sourceText, &out))
+		return QString();
+
+	UNUSED_PARAMETER(context);
+	UNUSED_PARAMETER(disambiguation);
+	UNUSED_PARAMETER(n);
+	return QT_UTF8(out);
+}
+
 struct NoFocusFrameStyle : QProxyStyle
 {
 	void drawControl(ControlElement element, const QStyleOption *option,
@@ -239,6 +251,8 @@ int main(int argc, char *argv[])
 
 	try {
 		OBSApp program(argc, argv);
+		OBSTranslator test;
+		program.installTranslator(&test);
 		program.setStyle(new NoFocusFrameStyle);
 		program.OBSInit();
 		ret = program.exec();

+ 13 - 0
obs/obs-app.hpp

@@ -18,12 +18,23 @@
 #pragma once
 
 #include <QApplication>
+#include <QTranslator>
 #include <util/util.hpp>
 #include <string>
 #include <memory>
 
 #include "window-main.hpp"
 
+class OBSTranslator : public QTranslator {
+	Q_OBJECT
+
+public:
+	virtual bool isEmpty() const override {return false;}
+
+	virtual QString translate(const char *context, const char *sourceText,
+			const char *disambiguation, int n) const override;
+};
+
 class OBSApp : public QApplication {
 	Q_OBJECT
 
@@ -51,6 +62,8 @@ public:
 		return locale.c_str();
 	}
 
+	inline lookup_t GetTextLookup() const {return textLookup;}
+
 	inline const char *GetString(const char *lookupVal) const
 	{
 		return textLookup.GetString(lookupVal);

+ 10 - 48
obs/window-basic-main.cpp

@@ -28,6 +28,7 @@
 #include "platform.hpp"
 #include "window-basic-settings.hpp"
 #include "window-namedialog.hpp"
+#include "window-basic-source-select.hpp"
 #include "window-basic-main.hpp"
 #include "window-basic-properties.hpp"
 #include "qt-wrappers.hpp"
@@ -153,8 +154,6 @@ void OBSBasic::CreateDefaultScene()
 			Str("Studio.Basic.DisplayCapture"), NULL);
 
 	if (source) {
-		sourceSceneRefs[source] = 0;
-
 		obs_scene_add(scene, source);
 		obs_add_source(source);
 		obs_source_release(source);
@@ -652,12 +651,15 @@ void OBSBasic::SceneItemRemoved(void *data, calldata_t params)
 
 void OBSBasic::SourceAdded(void *data, calldata_t params)
 {
+	OBSBasic *window = static_cast<OBSBasic*>(data);
 	obs_source_t source = (obs_source_t)calldata_ptr(params, "source");
 
 	if (obs_scene_fromsource(source) != NULL)
-		QMetaObject::invokeMethod(static_cast<OBSBasic*>(data),
+		QMetaObject::invokeMethod(window,
 				"AddScene",
 				Q_ARG(OBSSource, OBSSource(source)));
+	else
+		window->sourceSceneRefs[source] = 0;
 }
 
 void OBSBasic::SourceRemoved(void *data, calldata_t params)
@@ -1029,59 +1031,19 @@ void OBSBasic::on_sources_customContextMenuRequested(const QPoint &pos)
 	UNUSED_PARAMETER(pos);
 }
 
-void OBSBasic::AddSource(obs_scene_t scene, const char *id)
+void OBSBasic::AddSource(const char *id)
 {
-	string name;
-
-	bool success = false;
-	while (!success) {
-		bool accepted = NameDialog::AskForName(this,
-				Str("MainWindow.AddSourceDlg.Title"),
-				Str("MainWindow.AddSourceDlg.Text"),
-				name);
-
-		if (!accepted)
-			break;
-
-		if (name.empty()) {
-			QMessageBox::information(this,
-					QTStr("MainWindow.NoNameEntered"),
-					QTStr("MainWindow.NoNameEntered"));
-			continue;
-		}
-
-		obs_source_t source = obs_get_source_by_name(name.c_str());
-		if (!source) {
-			success = true;
-			break;
-		} else {
-			QMessageBox::information(this,
-					QTStr("MainWindow.NameExists.Title"),
-					QTStr("MainWindow.NameExists.Text"));
-			obs_source_release(source);
-		}
-	}
-
-	if (success) {
-		obs_source_t source = obs_source_create(OBS_SOURCE_TYPE_INPUT,
-				id, name.c_str(), NULL);
-
-		sourceSceneRefs[source] = 0;
-
-		obs_add_source(source);
-		obs_scene_add(scene, source);
-		obs_source_release(source);
-	}
+	OBSBasicSourceSelect sourceSelect(this, id);
+	sourceSelect.exec();
 }
 
 void OBSBasic::AddSourcePopupMenu(const QPoint &pos)
 {
-	OBSScene scene = GetCurrentScene();
 	const char *type;
 	bool foundValues = false;
 	size_t idx = 0;
 
-	if (!scene)
+	if (!GetCurrentScene())
 		return;
 
 	QMenu popup;
@@ -1103,7 +1065,7 @@ void OBSBasic::AddSourcePopupMenu(const QPoint &pos)
 	if (foundValues) {
 		QAction *ret = popup.exec(pos);
 		if (ret)
-			AddSource(scene, ret->data().toString().toUtf8());
+			AddSource(ret->data().toString().toUtf8());
 	}
 }
 

+ 1 - 1
obs/window-basic-main.hpp

@@ -124,7 +124,7 @@ private:
 
 	void ResizePreview(uint32_t cx, uint32_t cy);
 
-	void AddSource(obs_scene_t scene, const char *id);
+	void AddSource(const char *id);
 	void AddSourcePopupMenu(const QPoint &pos);
 
 public:

+ 9 - 7
obs/window-basic-settings.cpp

@@ -363,7 +363,8 @@ void OBSBasicSettings::LoadVideoSettings()
 
 	if (video_output_active(obs_video())) {
 		ui->videoPage->setEnabled(false);
-		ui->videoMsg->setText(QTStr("Settings.Video.CurrentlyActive"));
+		ui->videoMsg->setText(
+				QTStr("Basic.Settings.Video.CurrentlyActive"));
 	}
 
 	LoadRendererList();
@@ -634,8 +635,8 @@ bool OBSBasicSettings::QueryChanges()
 	QMessageBox::StandardButton button;
 
 	button = QMessageBox::question(this,
-			QTStr("Settings.ConfirmTitle"),
-			QTStr("Settings.Confirm"),
+			QTStr("Basic.Settings.ConfirmTitle"),
+			QTStr("Basic.Settings.Confirm"),
 			QMessageBox::Yes | QMessageBox::No |
 			QMessageBox::Cancel);
 
@@ -711,6 +712,8 @@ static inline bool StreamExists(const char *name)
 	return obs_get_service_by_name(name) != nullptr;
 }
 
+#define INVALID_RES_STR "Basic.Settings.Video.InvalidResolution"
+
 static bool ValidResolutions(Ui::OBSBasicSettings *ui)
 {
 	QString baseRes   = ui->baseResolution->lineEdit()->text();
@@ -720,8 +723,7 @@ static bool ValidResolutions(Ui::OBSBasicSettings *ui)
 	if (!ConvertResText(QT_TO_UTF8(baseRes), cx, cy) ||
 	    !ConvertResText(QT_TO_UTF8(outputRes), cx, cy)) {
 
-		ui->videoMsg->setText(
-				QTStr("Settings.Video.InvalidResolution"));
+		ui->videoMsg->setText(QTStr(INVALID_RES_STR));
 		return false;
 	}
 
@@ -762,7 +764,7 @@ void OBSBasicSettings::AudioChangedRestart()
 {
 	if (!loading) {
 		audioChanged = true;
-		ui->audioMsg->setText(QTStr("Settings.ProgramRestart"));
+		ui->audioMsg->setText(QTStr("Basic.Settings.ProgramRestart"));
 	}
 }
 
@@ -770,7 +772,7 @@ void OBSBasicSettings::VideoChangedRestart()
 {
 	if (!loading) {
 		videoChanged = true;
-		ui->videoMsg->setText(QTStr("Settings.ProgramRestart"));
+		ui->videoMsg->setText(QTStr("Basic.Settings.ProgramRestart"));
 	}
 }
 

+ 147 - 0
obs/window-basic-source-select.cpp

@@ -0,0 +1,147 @@
+/******************************************************************************
+    Copyright (C) 2014 by Hugh Bailey <[email protected]>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+******************************************************************************/
+
+#include "window-basic-main.hpp"
+#include "window-basic-source-select.hpp"
+#include "qt-wrappers.hpp"
+
+bool OBSBasicSourceSelect::EnumSources(void *data, obs_source_t source)
+{
+	OBSBasicSourceSelect *window = static_cast<OBSBasicSourceSelect*>(data);
+	const char *name = obs_source_getname(source);
+	const char *type;
+
+	obs_source_gettype(source, nullptr, &type);
+
+	if (strcmp(type, window->type) == 0)
+		window->ui->sourceList->addItem(QT_UTF8(name));
+
+	return true;
+}
+
+void OBSBasicSourceSelect::OBSSourceAdded(void *data, calldata_t calldata)
+{
+	OBSBasicSourceSelect *window = static_cast<OBSBasicSourceSelect*>(data);
+	obs_source_t source = (obs_source_t)calldata_ptr(calldata, "source");
+
+	QMetaObject::invokeMethod(window, "SourceAdded",
+			Q_ARG(OBSSource, source));
+}
+
+void OBSBasicSourceSelect::OBSSourceRemoved(void *data, calldata_t calldata)
+{
+	OBSBasicSourceSelect *window = static_cast<OBSBasicSourceSelect*>(data);
+	obs_source_t source = (obs_source_t)calldata_ptr(calldata, "source");
+
+	QMetaObject::invokeMethod(window, "SourceRemoved",
+			Q_ARG(OBSSource, source));
+}
+
+void OBSBasicSourceSelect::SourceAdded(OBSSource source)
+{
+	const char *name = obs_source_getname(source);
+	const char *sourceType;
+
+	obs_source_gettype(source, nullptr, &sourceType);
+	if (strcmp(sourceType, type) != 0)
+		return;
+
+	ui->sourceList->addItem(name);
+}
+
+void OBSBasicSourceSelect::SourceRemoved(OBSSource source)
+{
+	const char *name = obs_source_getname(source);
+	const char *sourceType;
+
+	obs_source_gettype(source, nullptr, &sourceType);
+	if (strcmp(sourceType, type) != 0)
+		return;
+
+	QList<QListWidgetItem*> items =
+		ui->sourceList->findItems(name, Qt::MatchFixedString);
+
+	if (!items.count())
+		return;
+
+	delete items[0];
+}
+
+static void AddExisting(const char *name)
+{
+	obs_source_t source = obs_get_output_source(0);
+	obs_scene_t  scene  = obs_scene_fromsource(source);
+	if (!scene)
+		return;
+
+	source = obs_get_source_by_name(name);
+	if (source) {
+		obs_scene_add(scene, source);
+		obs_source_release(source);
+	}
+
+	obs_scene_release(scene);
+}
+
+void AddNew(const char *id, const char *name)
+{
+	obs_source_t source = obs_get_output_source(0);
+	obs_scene_t  scene  = obs_scene_fromsource(source);
+	if (!scene)
+		return;
+
+	source = obs_source_create(OBS_SOURCE_TYPE_INPUT,
+			id, name, NULL);
+
+	obs_add_source(source);
+	obs_scene_add(scene, source);
+	obs_source_release(source);
+
+	obs_scene_release(scene);
+}
+
+void OBSBasicSourceSelect::on_buttonBox_accepted()
+{
+	bool useExisting = ui->selectExisting->isChecked();
+
+	if (useExisting) {
+		QListWidgetItem *item = ui->sourceList->currentItem();
+		if (!item)
+			return;
+
+		AddExisting(QT_TO_UTF8(item->text()));
+	} else {
+		AddNew(type, QT_TO_UTF8(ui->sourceName->text()));
+	}
+
+	done(DialogCode::Accepted);
+}
+
+void OBSBasicSourceSelect::on_buttonBox_rejected()
+{
+	done(DialogCode::Rejected);
+}
+
+OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *type_)
+	: QDialog (parent),
+	  ui      (new Ui::OBSBasicSourceSelect),
+	  type    (type_)
+{
+	ui->setupUi(this);
+
+	obs_enum_sources(EnumSources, this);
+}

+ 48 - 0
obs/window-basic-source-select.hpp

@@ -0,0 +1,48 @@
+/******************************************************************************
+    Copyright (C) 2014 by Hugh Bailey <[email protected]>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+******************************************************************************/
+
+#pragma once
+
+#include <obs.hpp>
+#include <memory>
+
+#include "ui_OBSBasicSourceSelect.h"
+
+class OBSBasic;
+
+class OBSBasicSourceSelect : public QDialog {
+	Q_OBJECT
+
+private:
+	std::unique_ptr<Ui::OBSBasicSourceSelect> ui;
+	const char *type;
+
+	static bool EnumSources(void *data, obs_source_t source);
+
+	static void OBSSourceRemoved(void *data, calldata_t calldata);
+	static void OBSSourceAdded(void *data, calldata_t calldata);
+
+private slots:
+	void on_buttonBox_accepted();
+	void on_buttonBox_rejected();
+
+	void SourceAdded(OBSSource source);
+	void SourceRemoved(OBSSource source);
+
+public:
+	OBSBasicSourceSelect(OBSBasic *parent, const char *type);
+};

+ 48 - 0
vs/2013/obs-studio/obs-studio.vcxproj

@@ -22,6 +22,25 @@
     <ClInclude Include="..\..\..\libobs\obs-ui.h" />
     <ClInclude Include="..\..\..\obs\display-helpers.hpp" />
     <ClInclude Include="..\..\..\obs\platform.hpp" />
+    <CustomBuild Include="..\..\..\obs\window-basic-source-select.hpp">
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing window-basic-source-select.hpp...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\..\..\libobs" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I.\..\..\..\obs"</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing window-basic-source-select.hpp...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\..\..\libobs" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I.\..\..\..\obs"</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing window-basic-source-select.hpp...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\..\..\libobs" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I.\..\..\..\obs"</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing window-basic-source-select.hpp...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\..\..\libobs" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I.\..\..\..\obs"</Command>
+    </CustomBuild>
+    <ClInclude Include="GeneratedFiles\ui_OBSBasicSourceSelect.h" />
     <CustomBuild Include="..\..\..\obs\qt-display.hpp">
       <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing qt-display.hpp...</Message>
@@ -199,6 +218,7 @@
     <ClCompile Include="..\..\..\obs\window-basic-main.cpp" />
     <ClCompile Include="..\..\..\obs\window-basic-properties.cpp" />
     <ClCompile Include="..\..\..\obs\window-basic-settings.cpp" />
+    <ClCompile Include="..\..\..\obs\window-basic-source-select.cpp" />
     <ClCompile Include="..\..\..\obs\window-namedialog.cpp" />
     <ClCompile Include="GeneratedFiles\Debug\moc_obs-app.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -228,6 +248,10 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="GeneratedFiles\Debug\moc_window-basic-source-select.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="GeneratedFiles\Debug\moc_window-main.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
@@ -274,6 +298,10 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="GeneratedFiles\Release\moc_window-basic-source-select.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="GeneratedFiles\Release\moc_window-main.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -457,6 +485,26 @@
       <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
     </CustomBuild>
   </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="..\..\..\obs\forms\OBSBasicSourceSelect.ui">
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Uic%27ing %(Identity)...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Uic%27ing %(Identity)...</Message>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
+    </CustomBuild>
+  </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{B12702AD-ABFB-343A-A199-8E24837244A3}</ProjectGuid>
     <Keyword>Qt4VSv1.0</Keyword>

+ 18 - 0
vs/2013/obs-studio/obs-studio.vcxproj.filters

@@ -77,6 +77,12 @@
     <CustomBuild Include="..\..\..\obs\volume-control.hpp">
       <Filter>Header Files</Filter>
     </CustomBuild>
+    <CustomBuild Include="..\..\..\obs\forms\OBSBasicSourceSelect.ui">
+      <Filter>Form Files</Filter>
+    </CustomBuild>
+    <CustomBuild Include="..\..\..\obs\window-basic-source-select.hpp">
+      <Filter>Header Files</Filter>
+    </CustomBuild>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\..\obs\platform.hpp">
@@ -103,6 +109,9 @@
     <ClInclude Include="GeneratedFiles\ui_OBSBasicProperties.h">
       <Filter>Generated Files</Filter>
     </ClInclude>
+    <ClInclude Include="GeneratedFiles\ui_OBSBasicSourceSelect.h">
+      <Filter>Generated Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ClCompile Include="..\..\..\obs\obs-app.cpp">
@@ -189,6 +198,15 @@
     <ClCompile Include="..\..\..\obs\volume-control.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\..\obs\window-basic-source-select.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="GeneratedFiles\Debug\moc_window-basic-source-select.cpp">
+      <Filter>Generated Files\Debug</Filter>
+    </ClCompile>
+    <ClCompile Include="GeneratedFiles\Release\moc_window-basic-source-select.cpp">
+      <Filter>Generated Files\Release</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <Image Include="..\..\..\obs\forms\images\add.ico">