Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
1b5ab075
Commit
1b5ab075
authored
Jan 16, 2003
by
Eric Petit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* InterfaceWindow.cpp : fixed DVD drag & drop
* PreferencesWindow.* : added the possibility not to use DVD menus
parent
ba6cada9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
13 deletions
+97
-13
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/InterfaceWindow.cpp
+67
-2
modules/gui/beos/PreferencesWindow.cpp
modules/gui/beos/PreferencesWindow.cpp
+25
-8
modules/gui/beos/PreferencesWindow.h
modules/gui/beos/PreferencesWindow.h
+5
-3
No files found.
modules/gui/beos/InterfaceWindow.cpp
View file @
1b5ab075
...
...
@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.1
7 2003/01/14 22:03:38
titer Exp $
* $Id: InterfaceWindow.cpp,v 1.1
8 2003/01/16 15:26:23
titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -457,7 +457,72 @@ void InterfaceWindow::MessageReceived( BMessage * p_message )
{
BPath
path
(
&
ref
);
if
(
path
.
InitCheck
()
==
B_OK
)
files
.
AddItem
(
new
BString
(
(
char
*
)
path
.
Path
()
)
);
{
bool
add
=
true
;
// has the user dropped a dvd disk icon?
BDirectory
dir
(
&
ref
);
if
(
dir
.
InitCheck
()
==
B_OK
&&
dir
.
IsRootDirectory
()
)
{
BVolumeRoster
volRoster
;
BVolume
vol
;
BDirectory
volumeRoot
;
status_t
status
=
volRoster
.
GetNextVolume
(
&
vol
);
while
(
status
==
B_NO_ERROR
)
{
if
(
vol
.
GetRootDirectory
(
&
volumeRoot
)
==
B_OK
&&
dir
==
volumeRoot
)
{
BString
volumeName
;
BString
deviceName
;
bool
isCDROM
=
false
;
bool
success
=
false
;
deviceName
=
""
;
volumeName
=
""
;
char
name
[
B_FILE_NAME_LENGTH
];
if
(
vol
.
GetName
(
name
)
>=
B_OK
)
// disk is currently mounted
{
volumeName
=
name
;
dev_t
dev
=
vol
.
Device
();
fs_info
info
;
if
(
fs_stat_dev
(
dev
,
&
info
)
==
B_OK
)
{
success
=
true
;
deviceName
=
info
.
device_name
;
if
(
vol
.
IsReadOnly
()
)
{
int
i_dev
=
open
(
info
.
device_name
,
O_RDONLY
);
if
(
i_dev
>=
0
)
{
device_geometry
g
;
if
(
ioctl
(
i_dev
,
B_GET_GEOMETRY
,
&
g
,
sizeof
(
g
)
)
>=
0
)
isCDROM
=
(
g
.
device_type
==
B_CD
);
close
(
i_dev
);
}
}
}
}
if
(
success
&&
isCDROM
)
{
BMessage
msg
(
OPEN_DVD
);
msg
.
AddString
(
"device"
,
deviceName
.
String
()
);
PostMessage
(
&
msg
);
add
=
false
;
}
break
;
}
else
{
vol
.
Unset
();
status
=
volRoster
.
GetNextVolume
(
&
vol
);
}
}
}
if
(
add
)
{
files
.
AddItem
(
new
BString
(
(
char
*
)
path
.
Path
()
)
);
}
}
}
// give the list to VLC
p_wrapper
->
openFiles
(
&
files
,
replace
);
...
...
modules/gui/beos/PreferencesWindow.cpp
View file @
1b5ab075
...
...
@@ -2,7 +2,7 @@
* PreferencesWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PreferencesWindow.cpp,v 1.
6 2003/01/14 16:00:49
titer Exp $
* $Id: PreferencesWindow.cpp,v 1.
7 2003/01/16 15:26:23
titer Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
...
...
@@ -57,14 +57,14 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
fTabView
=
new
BTabView
(
rect
,
"preferences view"
);
fTabView
->
SetViewColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
)
);
f
Ffmpeg
View
=
new
BView
(
fTabView
->
Bounds
(),
NULL
,
B_FOLLOW_ALL
,
B_WILL_DRAW
);
f
Ffmpeg
View
->
SetViewColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
)
);
f
General
View
=
new
BView
(
fTabView
->
Bounds
(),
NULL
,
B_FOLLOW_ALL
,
B_WILL_DRAW
);
f
General
View
->
SetViewColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
)
);
fAdjustView
=
new
BView
(
fTabView
->
Bounds
(),
NULL
,
B_FOLLOW_ALL
,
B_WILL_DRAW
);
fAdjustView
->
SetViewColor
(
ui_color
(
B_PANEL_BACKGROUND_COLOR
)
);
f
Ffmpeg
Tab
=
new
BTab
();
fTabView
->
AddTab
(
f
FfmpegView
,
fFfmpeg
Tab
);
f
FfmpegTab
->
SetLabel
(
"Ffmpeg
"
);
f
General
Tab
=
new
BTab
();
fTabView
->
AddTab
(
f
GeneralView
,
fGeneral
Tab
);
f
GeneralTab
->
SetLabel
(
"General
"
);
fAdjustTab
=
new
BTab
();
fTabView
->
AddTab
(
fAdjustView
,
fAdjustTab
);
...
...
@@ -72,8 +72,18 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
/* fills the tabs */
/* ffmpeg tab */
rect
=
f
Ffmpeg
View
->
Bounds
();
rect
=
f
General
View
->
Bounds
();
rect
.
InsetBy
(
10
,
10
);
rect
.
bottom
=
rect
.
top
+
10
;
fOldDvdCheck
=
new
BCheckBox
(
rect
,
"olddvd"
,
"Do not use DVD menus"
,
new
BMessage
(
OLDDVD_CHECK
)
);
fGeneralView
->
AddChild
(
fOldDvdCheck
);
fprintf
(
stderr
,
"%s
\n
"
,
config_GetPsz
(
p_intf
,
"access"
)
);
if
(
config_GetPsz
(
p_intf
,
"access"
)
&&
!
strncmp
(
config_GetPsz
(
p_intf
,
"access"
),
"dvdold,any"
,
10
)
)
fOldDvdCheck
->
SetValue
(
1
);
rect
.
top
=
rect
.
bottom
+
20
;
rect
.
bottom
=
rect
.
top
+
30
;
fPpSlider
=
new
BSlider
(
rect
,
"post-processing"
,
"MPEG4 post-processing level"
,
new
BMessage
(
SLIDER_UPDATE
),
...
...
@@ -83,7 +93,7 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
fPpSlider
->
SetHashMarkCount
(
7
);
fPpSlider
->
SetLimitLabels
(
"None"
,
"Maximum"
);
fPpSlider
->
SetValue
(
config_GetInt
(
p_intf
,
"ffmpeg-pp-q"
)
);
f
Ffmpeg
View
->
AddChild
(
fPpSlider
);
f
General
View
->
AddChild
(
fPpSlider
);
/* adjust tab */
...
...
@@ -167,6 +177,7 @@ void PreferencesWindow::MessageReceived( BMessage * p_message )
{
switch
(
p_message
->
what
)
{
case
OLDDVD_CHECK
:
case
SLIDER_UPDATE
:
{
ApplyChanges
();
...
...
@@ -210,6 +221,7 @@ void PreferencesWindow::ReallyQuit()
*****************************************************************************/
void
PreferencesWindow
::
SetDefaults
()
{
fOldDvdCheck
->
SetValue
(
0
);
fPpSlider
->
SetValue
(
0
);
fBrightnessSlider
->
SetValue
(
100
);
fContrastSlider
->
SetValue
(
100
);
...
...
@@ -222,6 +234,11 @@ void PreferencesWindow::SetDefaults()
*****************************************************************************/
void
PreferencesWindow
::
ApplyChanges
()
{
if
(
fOldDvdCheck
->
Value
()
)
config_PutPsz
(
p_intf
,
"access"
,
"dvdold,any"
);
else
config_PutPsz
(
p_intf
,
"access"
,
NULL
);
config_PutInt
(
p_intf
,
"ffmpeg-pp-q"
,
fPpSlider
->
Value
()
);
config_PutFloat
(
p_intf
,
"brightness"
,
(
float
)
fBrightnessSlider
->
Value
()
/
100
);
...
...
modules/gui/beos/PreferencesWindow.h
View file @
1b5ab075
...
...
@@ -2,7 +2,7 @@
* PreferencesWindow.h
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PreferencesWindow.h,v 1.
4 2003/01/14 16:00:49
titer Exp $
* $Id: PreferencesWindow.h,v 1.
5 2003/01/16 15:26:23
titer Exp $
*
* Authors: Eric Petit <titer@videolan.org>
*
...
...
@@ -33,6 +33,7 @@
#define PREFS_SAVE 'prsa'
#define PREFS_DEFAULTS 'prde'
#define SLIDER_UPDATE 'slup'
#define OLDDVD_CHECK 'olch'
class
PreferencesWindow
:
public
BWindow
{
...
...
@@ -49,10 +50,11 @@ class PreferencesWindow : public BWindow
void
ApplyChanges
();
BView
*
fPrefsView
;
BTabView
*
fTabView
;
BView
*
f
Ffmpeg
View
;
BView
*
f
General
View
;
BView
*
fAdjustView
;
BTab
*
f
Ffmpeg
Tab
;
BTab
*
f
General
Tab
;
BTab
*
fAdjustTab
;
BCheckBox
*
fOldDvdCheck
;
BSlider
*
fPpSlider
;
BSlider
*
fContrastSlider
;
BSlider
*
fBrightnessSlider
;
...
...
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