Commit Graph

36 Commits (master)

Author SHA1 Message Date
Vainock e053f9dd26 UI,mac-avcapture: Use consistent variables in locales 2022-07-02 14:02:40 +10:00
Richard Stanway 377af35016
UI: Move scene import dialog to the stack
Changed for consistency as almost every other dialog in the application
is stack-allocated.
2022-05-16 21:51:01 +02:00
cg2121 748cf32a43 UI: Add events for renaming profiles/collections
The events make it more clear when profiles or scene
collections are renamed.
2022-03-08 11:17:59 -08:00
VodBox 3d544653e8 UI: Cleanup libobs C++ type use 2021-11-26 23:23:51 +13:00
tt2468 feda1aaa28 UI: Add `_CHANGING` frontend events
Adds the following events:
- `OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGING`
- `OBS_FRONTEND_EVENT_PROFILE_CHANGING`

Both emitted right before the change occurs. Can provide plugins with
better awareness of these critical operations happening, so that they
can react accordingly.
2021-11-10 06:36:23 -08:00
jp9000 fb42a2ad8c UI: Remove scene collection undo/redo actions 2021-05-30 11:54:46 -07:00
jp9000 78f1983f7d UI: Remove unnecessary Undo/Redo cleanup func
Since fixing the reference holding issue with scene/source deletion, the
undo/redo cleanup function (last param of add_action) is no longer
required.
2021-04-27 20:45:43 -07:00
jp9000 dde4d57d72 UI: Fix imported scene collection names duplicating
If an imported scene collection has a name that already exists, it will
instead be given a name plus an increment (e.g. "name 2", or "name 3",
etc)

Fixes obsproject/obs-studio#4442
2021-04-20 00:17:34 -07:00
jp9000 e39fa5e902 UI: Clear undo stack in ClearSceneData() instead
Makes more sense to clear it here.
2021-04-09 04:19:31 -07:00
Ford Smith 0b583260a2 UI: Wipe undo/redo stack when switching scene collections 2021-04-08 16:45:04 -07:00
Ford Smith a374c023a1 UI: Undo/Redo Scene Collections
Implements undo/redo for scene collections. This includes operations
including rename, delete, and addition.
2021-03-29 03:06:26 -04:00
Ryan Foster 9b1d1c1b3d UI: Make GetUnusedSceneCollectionFile usable elsewhere 2021-01-11 14:49:59 -08:00
Clayton Groeneveld 762983b5d8 UI: Use non-native file dialog w/ Linux 2020-07-18 09:49:24 -07:00
Ryan Foster 27a3da2e70 UI: Fix GetUnusedSceneCollectionFile filename creation
GetUnusedSceneCollectionFile tries to create a safe, unused filename for
a new scene collection JSON file based on the user-specified scene
collection name. It would check the length of the safe version of the
user-specified name, but then it doesn't consider that the length may
have changed when GetClosestUnusedFileName was called to alter the
filename to prevent filename collisions by adding an incremented integer
to the end of the filename. This could result in OBS thinking a filename
was safe and available, but the resulting filename could be one that
already exists. OBS could then overwrite a scene collection JSON file
with this new file without any indication that the file previously
existed.

Instead of trying to calculate a length based off of the returned
filename, let's just use the length of the config path since it's a
known string.
2020-05-19 08:14:56 -04:00
Richard Stanway 4570fcbc72 UI: Fix memory leak 2020-03-19 15:50:32 +01:00
VodBox 191165c721 UI: Add advanced scene collection importer
This replaces the previous Open File dialog for importing collections
with a window for importing many collections at once, based on the remux
window, along with support for importing from OBS Classic, XSplit
Broadcaster and from Streamlabs' fork. This also translates sources
between OSes that Studio supports.
2020-02-16 17:56:06 +13:00
jp9000 cfddf1112b UI: Fix bug in untested/unused function code path
In the current user interface code, OBSBasic::AddSceneCollection has a
qname parameter to allow explicitly specifying a name, but that code
path is unused in the UI code itself, and qname is typically empty.  If
qname is not empty, it does not properly generate a file name associated
with that specified scene collection name.  This fixes that issue.
2019-12-04 15:50:41 -08:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Richard Stanway 90df9ea290 UI: Update error message severity levels and show additional info 2019-04-19 05:45:19 -07:00
VodBox ab6c3e0f4b UI: Save scene collection before export 2018-12-21 11:26:13 +13:00
Ilya Melamed c768f703ad UI: Add obs_frontend_add_scene_collection API call
Allows the ability to add a new scene collection via the frontend API.
Blocks until the scene collection has been successfully added to ensure
synchronization between the calling thread and the UI thread.

(Jim: Added detailed description to commit message)

Closes obsproject/obs-studio#1232
2018-05-04 15:40:53 -07:00
jp9000 4fcc2cccfe UI: Move OpenSavedProjecters call to OBSBasic::Load()
Due to the commit 34c14829b6, source loading is now deferred
to after OBSInit(), which would cause saved scene/source projectors to
no longer load on startup.  This fixes that issue by moving the
OpenSavedProjectors call to OBSBasic::Load().
2018-04-18 19:34:18 -07:00
jp9000 f0f0d2c8f6 UI: Remove __FUNCTION__ usage
This code was originally tested with visual C, which supports using
__FUNCTION__ in this way.  These potential error cases shouldn't
technically happen anyway, so just remove __FUNCTION__.
2018-02-08 07:34:36 -08:00
Michel 32e60ba65f UI: Import scene collection with correct filename
OBS assumes the name of the imported json file is also the name
of the scene collection, if the filename is different this can result
in duplicate scene collections after importing.

Closes jp9000/obs-studio#1177
2018-02-08 07:20:53 -08:00
Michel 609334e427 UI: Fix problem with exporting scene collections/profiles
When exporting scene collections/profiles existing files are
not overwritten.

Closes jp9000/obs-studio#963
2017-07-21 07:46:39 -07:00
jp9000 12236d73f4 UI: Fix enumeration of scene collections on first run
When running the program for the first time, no scene collections will
show up in the scene collection menu.  This changes it to forcibly save
the first scene collection on the first run of the program, and then
re-enumerates the list to ensure it's listed.
2017-05-17 23:29:02 -07:00
jp9000 522f5cdf3b UI: Make sure all message box buttons are translated
Instead of QMessageBox::question and QMessageBox::information, use the
OBSMessageBox class, which translates all buttons.
2017-05-13 14:06:32 -07:00
jp9000 3774a73fe9 UI: Disable filter pasting when scene collection changed 2017-03-25 07:08:11 -07:00
cg2121 bcd491a3d6 UI: Add copying/pasting of sources/filters
Closes jp9000/obs-studio#860
2017-03-25 04:29:49 -07:00
cg2121 29f22e72a8 UI: Add option to save projectors
This adds an option to the general settings to save the opened
projectors on exit.

(Note: Fixed conflicts -Jim)

Closes jp9000/obs-studio#743
2017-01-29 06:02:15 -08:00
SuslikV fae5082b8b UI: Fix Export QFileDialog parent 2016-12-24 13:44:41 +02:00
cg2121 9f0c48d9c7 UI: Add import/export of scene collections & profiles
Closes jp9000/obs-studio#721
2016-12-19 04:44:57 -08:00
vic 7db00a18fa UI: Fix property name bug in frontend API
This commit fixes a bug that would cause the frontend API function
obs_frontend_set_current_scene_collection to never be successful.  Due
to the bug, the following null pointer check would always fail, so the
action would never be triggered.

Modification by Jim: Instead of fixing the typo that caused this to
occur, make it so both scene collection menus and profile menus both use
"file_name" consistently.

Closes jp9000/obs-studio#712
2016-12-16 16:43:12 -08:00
jp9000 8836592d92 UI: Add front-end API library
Allows manipulating and modifying the front-end via plugins.
2016-09-06 22:01:48 -07:00
jp9000 bfc21317bf UI: Make scene collection/profile enum funcs external
Allows using the functions outside of the file they're in.
2016-09-06 04:54:24 -07:00
jp9000 01b274f1da UI: Rename 'obs' dir to 'UI'
This is to prevent confusion both when prefixing commits and when
reading the directory structure for the first time.
2016-08-27 20:19:45 -07:00