Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
544625f1
Commit
544625f1
authored
Feb 23, 2010
by
Jakob Leben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a macro to automate the choice of "folder"/"directory" string version according to platform
parent
b904c184
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
24 deletions
+51
-24
include/vlc_intf_strings.h
include/vlc_intf_strings.h
+22
-5
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+5
-1
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.cpp
+11
-5
modules/gui/qt4/components/preferences_widgets.cpp
modules/gui/qt4/components/preferences_widgets.cpp
+2
-1
modules/gui/qt4/components/sout/sout_widgets.cpp
modules/gui/qt4/components/sout/sout_widgets.cpp
+5
-1
modules/gui/qt4/dialogs/help.cpp
modules/gui/qt4/dialogs/help.cpp
+1
-1
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+3
-1
modules/gui/qt4/menus.cpp
modules/gui/qt4/menus.cpp
+2
-2
modules/gui/qt4/menus.hpp
modules/gui/qt4/menus.hpp
+0
-7
No files found.
include/vlc_intf_strings.h
View file @
544625f1
...
...
@@ -29,13 +29,26 @@
* This file defines a number of strings used in user interfaces
*/
/* A helper macro that will expand to either of the arguments
depanding on platform. The arguments are supposed to be:
1. dir: a string containing "directory"
2. folder: a string with the same meaning but with directory
substituted with "folder"
*/
#if defined( WIN32 ) || defined(__APPLE__)
#define I_DIR_OR_FOLDER( dir, folder ) folder
#else
#define I_DIR_OR_FOLDER( dir, folder ) dir
#endif
/*************** Open dialogs **************/
#define I_OP_OPF N_("Quick &Open File...")
#define I_OP_ADVOP N_("&Advanced Open...")
#define I_OP_OPDIR
N_("Open &Directory...")
#define I_OP_OPDIR
I_DIR_OR_FOLDER( N_("Open D&irectory..."), \
N_("Open &Folder...") )
#define I_OP_SEL_FILES N_("Select one or more files to open")
#define I_OP_SEL_DIR I_DIR_OR_FOLDER( N_("Select Directory"), N_("Select Folder") )
/******************* Menus *****************/
...
...
@@ -54,10 +67,13 @@
#define I_POP_DEL N_("Delete")
#define I_POP_INFO N_("Information...")
#define I_POP_SORT N_("Sort")
#define I_POP_NEWFOLDER N_("Create Folder...")
#define I_POP_NEWFOLDER I_DIR_OR_FOLDER( N_("Create Directory..."), \
N_("Create Folder...") )
#define I_POP_EXPLORE I_DIR_OR_FOLDER( N_("Show Containing Directory..."), \
N_("Show Containing Folder...") )
#define I_POP_STREAM N_("Stream...")
#define I_POP_SAVE N_("Save...")
#define I_POP_EXPLORE N_("Show Containing Folder...")
/*************** Playlist *************/
...
...
@@ -73,7 +89,8 @@
#define I_PL_ADDF N_("Add File...")
#define I_PL_ADVADD N_("Advanced Open...")
#define I_PL_ADDDIR N_("Add Folder...")
#define I_PL_ADDDIR I_DIR_OR_FOLDER( N_("Add Directory..."), \
N_("Add Folder...") )
#define I_PL_SAVE N_("Save Playlist to &File...")
#define I_PL_LOAD N_("Open Play&list...")
...
...
modules/gui/qt4/components/open_panels.cpp
View file @
544625f1
...
...
@@ -35,6 +35,7 @@
#include "dialogs/open.hpp"
#include "dialogs_provider.hpp"
/* Open Subtitle file */
#include "util/qt_dirs.hpp"
#include <vlc_intf_strings.h>
#include <QFileDialog>
#include <QDialogButtonBox>
...
...
@@ -47,7 +48,10 @@
#include <QUrl>
#include <QStringListModel>
#define I_DEVICE_TOOLTIP N_("Select the device or the VIDEO_TS directory")
#define I_DEVICE_TOOLTIP \
I_DIR_OR_FOLDER( N_("Select a device or a VIDEO_TS directory"), \
N_("Select a device or a VIDEO_TS folder") )
static
const
char
*
psz_devModule
[]
=
{
"v4l"
,
"v4l2"
,
"pvr"
,
"dvb"
,
"bda"
,
"dshow"
,
"screen"
,
"jack"
};
...
...
modules/gui/qt4/components/playlist/playlist_model.cpp
View file @
544625f1
...
...
@@ -42,9 +42,19 @@
#include <QMenu>
#include <QApplication>
#include <QSettings>
#include <QUrl>
#include <QFileInfo>
#include <QDesktopServices>
#include <QInputDialog>
#include "sorting.h"
#define I_NEW_DIR \
I_DIR_OR_FOLDER( N_("Create Directory"), N_( "Create Folder" ) )
#define I_NEW_DIR_NAME \
I_DIR_OR_FOLDER( N_( "Enter name for new directory:" ), \
N_( "Enter name for new folder:" ) )
QIcon
PLModel
::
icons
[
ITEM_TYPE_NUMBER
];
/*************************************************************************
...
...
@@ -993,9 +1003,6 @@ void PLModel::popupSave()
THEDP
->
streamingDialog
(
NULL
,
mrls
[
0
]
);
}
#include <QUrl>
#include <QFileInfo>
#include <QDesktopServices>
void
PLModel
::
popupExplore
()
{
PL_LOCK
;
...
...
@@ -1028,12 +1035,11 @@ void PLModel::popupExplore()
PL_UNLOCK
;
}
#include <QInputDialog>
void
PLModel
::
popupAddNode
()
{
bool
ok
;
QString
name
=
QInputDialog
::
getText
(
PlaylistDialog
::
getInstance
(
p_intf
),
qtr
(
"Create Folder"
),
qtr
(
"Enter name for new folder:"
),
qtr
(
I_NEW_DIR
),
qtr
(
I_NEW_DIR_NAME
),
QLineEdit
::
Normal
,
QString
(),
&
ok
);
if
(
!
ok
||
name
.
isEmpty
()
)
return
;
PL_LOCK
;
...
...
modules/gui/qt4/components/preferences_widgets.cpp
View file @
544625f1
...
...
@@ -38,6 +38,7 @@
#include "util/customwidgets.hpp"
#include "util/qt_dirs.hpp"
#include <vlc_keys.h>
#include <vlc_intf_strings.h>
#include <QString>
#include <QVariant>
...
...
@@ -357,7 +358,7 @@ DirectoryConfigControl::DirectoryConfigControl( vlc_object_t *_p_this,
void
DirectoryConfigControl
::
updateField
()
{
QString
dir
=
QFileDialog
::
getExistingDirectory
(
NULL
,
qtr
(
"Select Directory"
),
qtr
(
I_OP_SEL_DIR
),
text
->
text
().
isEmpty
()
?
QVLCUserDir
(
VLC_HOME_DIR
)
:
text
->
text
(),
QFileDialog
::
ShowDirsOnly
|
QFileDialog
::
DontResolveSymlinks
);
...
...
modules/gui/qt4/components/sout/sout_widgets.cpp
View file @
544625f1
...
...
@@ -27,6 +27,7 @@
#include "components/sout/sout_widgets.hpp"
#include "dialogs/sout.hpp"
#include "util/qt_dirs.hpp"
#include <vlc_intf_strings.h>
#include <QGroupBox>
#include <QGridLayout>
...
...
@@ -34,6 +35,9 @@
#include <QLineEdit>
#include <QFileDialog>
#define I_FILE_SLASH_DIR \
I_DIR_OR_FOLDER( N_("File/Directory"), N_("File/Folder") )
SoutInputBox
::
SoutInputBox
(
QWidget
*
_parent
,
const
QString
&
mrl
)
:
QGroupBox
(
_parent
)
{
/**
...
...
@@ -72,7 +76,7 @@ void SoutInputBox::setMRL( const QString& mrl )
type
=
mrl
.
left
(
i
);
}
else
type
=
qtr
(
"File/Directory"
);
type
=
qtr
(
I_FILE_SLASH_DIR
);
sourceValueLabel
->
setText
(
type
);
}
...
...
modules/gui/qt4/dialogs/help.cpp
View file @
544625f1
...
...
@@ -268,7 +268,7 @@ void UpdateDialog::UpdateOrDownload()
else
{
QString
dest_dir
=
QFileDialog
::
getExistingDirectory
(
this
,
qtr
(
"Select a directory..."
),
qtr
(
I_OP_SEL_DIR
),
QVLCUserDir
(
VLC_DOWNLOAD_DIR
)
);
if
(
!
dest_dir
.
isEmpty
()
)
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
544625f1
...
...
@@ -61,6 +61,8 @@
#include <QSignalMapper>
#include <QFileDialog>
#define I_OP_DIR_WINTITLE I_DIR_OR_FOLDER( N_("Open Directory"), \
N_("Open Folder") )
DialogsProvider
*
DialogsProvider
::
instance
=
NULL
;
...
...
@@ -488,7 +490,7 @@ void DialogsProvider::openUrlDialog()
**/
static
void
openDirectory
(
intf_thread_t
*
p_intf
,
bool
pl
,
bool
go
)
{
QString
dir
=
QFileDialog
::
getExistingDirectory
(
NULL
,
qtr
(
"Open Directory"
),
p_intf
->
p_sys
->
filepath
);
QString
dir
=
QFileDialog
::
getExistingDirectory
(
NULL
,
qtr
(
I_OP_DIR_WINTITLE
),
p_intf
->
p_sys
->
filepath
);
if
(
!
dir
.
isEmpty
()
)
{
...
...
modules/gui/qt4/menus.cpp
View file @
544625f1
...
...
@@ -313,7 +313,7 @@ QMenu *QVLCMenu::FileMenu( intf_thread_t *p_intf, QWidget *parent )
":/type/file-asym"
,
SLOT
(
simpleOpenDialog
()
),
"Ctrl+O"
);
addDPStaticEntry
(
menu
,
qtr
(
"Advanced Open File..."
),
":/type/file-asym"
,
SLOT
(
openFileDialog
()
),
"Ctrl+Shift+O"
);
addDPStaticEntry
(
menu
,
qtr
(
I_OP
EN_FOLDE
R
),
addDPStaticEntry
(
menu
,
qtr
(
I_OP
_OPDI
R
),
":/type/folder-grey"
,
SLOT
(
PLOpenDir
()
),
"Ctrl+F"
);
addDPStaticEntry
(
menu
,
qtr
(
"Open &Disc..."
),
":/type/disc"
,
SLOT
(
openDiscDialog
()
),
"Ctrl+D"
);
...
...
@@ -853,7 +853,7 @@ void QVLCMenu::PopupMenuStaticEntries( QMenu *menu )
QMenu
*
openmenu
=
new
QMenu
(
qtr
(
"Open Media"
),
menu
);
addDPStaticEntry
(
openmenu
,
qtr
(
"&Open File..."
),
":/type/file-asym"
,
SLOT
(
openFileDialog
()
)
);
addDPStaticEntry
(
openmenu
,
qtr
(
I_OP
EN_FOLDE
R
),
addDPStaticEntry
(
openmenu
,
qtr
(
I_OP
_OPDI
R
),
":/type/folder-grey"
,
SLOT
(
PLOpenDir
()
)
);
addDPStaticEntry
(
openmenu
,
qtr
(
"Open &Disc..."
),
":/type/disc"
,
SLOT
(
openDiscDialog
()
)
);
...
...
modules/gui/qt4/menus.hpp
View file @
544625f1
...
...
@@ -31,13 +31,6 @@
#include <QAction>
#include <vector>
/* Folder vs. Directory */
#if defined( WIN32 ) || defined(__APPLE__)
#define I_OPEN_FOLDER N_("Open &Folder...")
#else
#define I_OPEN_FOLDER N_("Open D&irectory...")
#endif //WIN32
using
namespace
std
;
class
QMenu
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment