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
4c8e0844
Commit
4c8e0844
authored
Aug 25, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notify: Adds a previous button also
parent
c4b3d9f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
modules/misc/notify/notify.c
modules/misc/notify/notify.c
+14
-4
No files found.
modules/misc/notify/notify.c
View file @
4c8e0844
...
@@ -220,14 +220,22 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
...
@@ -220,14 +220,22 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
static
void
Skip
(
NotifyNotification
*
notification
,
gchar
*
psz
,
gpointer
p
)
static
void
Next
(
NotifyNotification
*
notification
,
gchar
*
psz
,
gpointer
p
)
{
/* libnotify callback, called when the
Skip
button is pressed */
{
/* libnotify callback, called when the
"Next"
button is pressed */
notify_notification_close
(
notification
,
NULL
);
notify_notification_close
(
notification
,
NULL
);
playlist_t
*
p_playlist
=
pl_Yield
(
((
vlc_object_t
*
)
p
)
);
playlist_t
*
p_playlist
=
pl_Yield
(
((
vlc_object_t
*
)
p
)
);
playlist_Next
(
p_playlist
);
playlist_Next
(
p_playlist
);
pl_Release
(
((
vlc_object_t
*
)
p
)
);
pl_Release
(
((
vlc_object_t
*
)
p
)
);
}
}
static
void
Prev
(
NotifyNotification
*
notification
,
gchar
*
psz
,
gpointer
p
)
{
/* libnotify callback, called when the "Previous" button is pressed */
notify_notification_close
(
notification
,
NULL
);
playlist_t
*
p_playlist
=
pl_Yield
(
((
vlc_object_t
*
)
p
)
);
playlist_Prev
(
p_playlist
);
pl_Release
(
((
vlc_object_t
*
)
p
)
);
}
static
int
Notify
(
vlc_object_t
*
p_this
,
const
char
*
psz_temp
,
GdkPixbuf
*
pix
,
static
int
Notify
(
vlc_object_t
*
p_this
,
const
char
*
psz_temp
,
GdkPixbuf
*
pix
,
intf_thread_t
*
p_intf
)
intf_thread_t
*
p_intf
)
{
{
...
@@ -249,8 +257,10 @@ static int Notify( vlc_object_t *p_this, const char *psz_temp, GdkPixbuf *pix,
...
@@ -249,8 +257,10 @@ static int Notify( vlc_object_t *p_this, const char *psz_temp, GdkPixbuf *pix,
gdk_pixbuf_unref
(
pix
);
gdk_pixbuf_unref
(
pix
);
}
}
/* Adds a button in the notification to skip current element */
/* Adds previous and next buttons in the notification */
notify_notification_add_action
(
notification
,
"next"
,
_
(
"Skip"
),
Skip
,
notify_notification_add_action
(
notification
,
"prev"
,
_
(
"Previous"
),
Prev
,
(
gpointer
*
)
p_intf
,
NULL
);
notify_notification_add_action
(
notification
,
"next"
,
_
(
"Next"
),
Next
,
(
gpointer
*
)
p_intf
,
NULL
);
(
gpointer
*
)
p_intf
,
NULL
);
notify_notification_show
(
notification
,
NULL
);
notify_notification_show
(
notification
,
NULL
);
...
...
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