Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
cde300c7
Commit
cde300c7
authored
Mar 07, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog: support modal fatal errors
parent
326a3a3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
20 deletions
+29
-20
include/vlc_dialog.h
include/vlc_dialog.h
+25
-1
src/interface/dialog.c
src/interface/dialog.c
+3
-18
src/libvlccore.sym
src/libvlccore.sym
+1
-1
No files found.
include/vlc_dialog.h
View file @
cde300c7
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#ifndef VLC_DIALOG_H_
#ifndef VLC_DIALOG_H_
#define VLC_DIALOG_H_
#define VLC_DIALOG_H_
# include <stdarg.h>
/**
/**
* \file vlc_dialog.h
* \file vlc_dialog.h
...
@@ -34,12 +35,35 @@ typedef struct dialog_fatal_t
...
@@ -34,12 +35,35 @@ typedef struct dialog_fatal_t
{
{
const
char
*
title
;
const
char
*
title
;
const
char
*
message
;
const
char
*
message
;
bool
modal
;
}
dialog_fatal_t
;
}
dialog_fatal_t
;
VLC_EXPORT
(
void
,
dialog_Fatal
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
...)
)
LIBVLC_FORMAT
(
3
,
4
);
VLC_EXPORT
(
void
,
dialog_VFatal
,
(
vlc_object_t
*
,
bool
,
const
char
*
,
const
char
*
,
va_list
)
);
static
inline
LIBVLC_FORMAT
(
3
,
4
)
void
dialog_Fatal
(
vlc_object_t
*
obj
,
const
char
*
title
,
const
char
*
fmt
,
...)
{
va_list
ap
;
va_start
(
ap
,
fmt
);
dialog_VFatal
(
obj
,
false
,
title
,
fmt
,
ap
);
va_end
(
ap
);
}
#define dialog_Fatal(o, t, ...) \
#define dialog_Fatal(o, t, ...) \
dialog_Fatal(VLC_OBJECT(o), t, __VA_ARGS__)
dialog_Fatal(VLC_OBJECT(o), t, __VA_ARGS__)
static
inline
LIBVLC_FORMAT
(
3
,
4
)
void
dialog_FatalWait
(
vlc_object_t
*
obj
,
const
char
*
title
,
const
char
*
fmt
,
...){
va_list
ap
;
va_start
(
ap
,
fmt
);
dialog_VFatal
(
obj
,
true
,
title
,
fmt
,
ap
);
va_end
(
ap
);
}
#define dialog_FatalWait(o, t, ...) \
dialog_FatalWait(VLC_OBJECT(o), t, __VA_ARGS__)
VLC_EXPORT
(
int
,
dialog_Register
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
int
,
dialog_Register
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
int
,
dialog_Unregister
,
(
vlc_object_t
*
)
);
VLC_EXPORT
(
int
,
dialog_Unregister
,
(
vlc_object_t
*
)
);
#define dialog_Register(o) dialog_Register(VLC_OBJECT(o))
#define dialog_Register(o) dialog_Register(VLC_OBJECT(o))
...
...
src/interface/dialog.c
View file @
cde300c7
...
@@ -92,9 +92,8 @@ static vlc_object_t *dialog_GetProvider (vlc_object_t *obj)
...
@@ -92,9 +92,8 @@ static vlc_object_t *dialog_GetProvider (vlc_object_t *obj)
return
provider
;
return
provider
;
}
}
static
void
dialog_VFatal
(
vlc_object_t
*
obj
,
bool
modal
,
const
char
*
title
,
void
dialog_FatalVa
(
vlc_object_t
*
obj
,
const
char
*
title
,
const
char
*
fmt
,
va_list
ap
)
const
char
*
fmt
,
va_list
ap
)
{
{
char
*
text
;
char
*
text
;
...
@@ -112,22 +111,8 @@ void dialog_FatalVa (vlc_object_t *obj, const char *title,
...
@@ -112,22 +111,8 @@ void dialog_FatalVa (vlc_object_t *obj, const char *title,
if
(
vasprintf
(
&
text
,
fmt
,
ap
)
==
-
1
)
if
(
vasprintf
(
&
text
,
fmt
,
ap
)
==
-
1
)
return
;
return
;
dialog_fatal_t
dialog
=
{
title
,
text
,
};
dialog_fatal_t
dialog
=
{
title
,
text
,
modal
,
};
var_SetAddress
(
provider
,
"dialog-fatal"
,
&
dialog
);
var_SetAddress
(
provider
,
"dialog-fatal"
,
&
dialog
);
free
(
text
);
free
(
text
);
vlc_object_release
(
provider
);
vlc_object_release
(
provider
);
}
}
#undef dialog_Fatal
/**
* Notify the user of some fatal error.
* This is a fire and forget function.
*/
void
dialog_Fatal
(
vlc_object_t
*
obj
,
const
char
*
title
,
const
char
*
fmt
,
...)
{
va_list
ap
;
va_start
(
ap
,
fmt
);
dialog_FatalVa
(
obj
,
title
,
fmt
,
ap
);
va_end
(
ap
);
}
src/libvlccore.sym
View file @
cde300c7
...
@@ -102,9 +102,9 @@ decode_URI_duplicate
...
@@ -102,9 +102,9 @@ decode_URI_duplicate
demux_PacketizerDestroy
demux_PacketizerDestroy
demux_PacketizerNew
demux_PacketizerNew
demux_vaControlHelper
demux_vaControlHelper
dialog_Fatal
dialog_Register
dialog_Register
dialog_Unregister
dialog_Unregister
dialog_VFatal
encode_URI_component
encode_URI_component
EndMD5
EndMD5
EnsureUTF8
EnsureUTF8
...
...
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