Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
d40cf165
Commit
d40cf165
authored
Dec 30, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main: export the main_loop variable
Other libraries may need to access the main_loop reference, to add or remove events, or to call g_main_loop_quit().
parent
a3b0506c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
2 deletions
+29
-2
Makefile.am
src/Makefile.am
+1
-0
client.c
src/client.c
+2
-1
main.c
src/main.c
+2
-1
main.h
src/main.h
+24
-0
No files found.
src/Makefile.am
View file @
d40cf165
...
...
@@ -43,6 +43,7 @@ mpd_headers = \
listen.h
\
log.h
\
ls.h
\
main.h
\
main_notify.h
\
daemon.h
\
normalize.h
\
...
...
src/client.c
View file @
d40cf165
...
...
@@ -25,6 +25,7 @@
#include "main_notify.h"
#include "dlist.h"
#include "idle.h"
#include "main.h"
#include "../config.h"
...
...
@@ -471,7 +472,7 @@ client_in_event(G_GNUC_UNUSED GIOChannel *source,
switch
(
ret
)
{
case
COMMAND_RETURN_KILL
:
client_close
(
client
);
g_main_loop_quit
(
NULL
);
g_main_loop_quit
(
main_loop
);
return
false
;
case
COMMAND_RETURN_CLOSE
:
...
...
src/main.c
View file @
d40cf165
...
...
@@ -75,6 +75,8 @@
#include <locale.h>
#endif
GMainLoop
*
main_loop
;
static
void
changeToUser
(
void
)
{
#ifndef WIN32
...
...
@@ -207,7 +209,6 @@ main_notify_triggered(void)
int
main
(
int
argc
,
char
*
argv
[])
{
Options
options
;
GMainLoop
*
main_loop
;
clock_t
start
;
GTimer
*
save_state_timer
;
...
...
src/main.h
0 → 100644
View file @
d40cf165
/*
* Copyright (C) 2003-2008 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MAIN_H
#define MAIN_H
extern
GMainLoop
*
main_loop
;
#endif
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