Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
b4558a88
Commit
b4558a88
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
gnome GUI: don't block in DBus signal errorAlert()
Fix a deadlock when closing the error dialog Remove unused functions
parent
e32ac62f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
gnome/src/dbus/dbus.c
+16
-3
16 additions, 3 deletions
gnome/src/dbus/dbus.c
gnome/src/main.c
+9
-6
9 additions, 6 deletions
gnome/src/main.c
gnome/src/mainwindow.c
+0
-33
0 additions, 33 deletions
gnome/src/mainwindow.c
gnome/src/mainwindow.h
+0
-18
0 additions, 18 deletions
gnome/src/mainwindow.h
with
25 additions
and
60 deletions
gnome/src/dbus/dbus.c
+
16
−
3
View file @
b4558a88
...
@@ -503,17 +503,30 @@ sip_call_state_cb (DBusGProxy *proxy UNUSED, const gchar* callID,
...
@@ -503,17 +503,30 @@ sip_call_state_cb (DBusGProxy *proxy UNUSED, const gchar* callID,
static
void
static
void
error_alert
(
DBusGProxy
*
proxy
UNUSED
,
int
err
,
void
*
foo
UNUSED
)
error_alert
(
DBusGProxy
*
proxy
UNUSED
,
int
err
,
void
*
foo
UNUSED
)
{
{
const
gchar
*
msg
;
switch
(
err
)
{
switch
(
err
)
{
case
ALSA_PLAYBACK_DEVICE
:
case
ALSA_PLAYBACK_DEVICE
:
m
ain_window_error_message
(
_
(
"ALSA notification
\n\n
Error while opening playback device"
)
)
;
m
sg
=
_
(
"ALSA notification
\n\n
Error while opening playback device"
);
break
;
break
;
case
ALSA_CAPTURE_DEVICE
:
case
ALSA_CAPTURE_DEVICE
:
m
ain_window_error_message
(
_
(
"ALSA notification
\n\n
Error while opening capture device"
)
)
;
m
sg
=
_
(
"ALSA notification
\n\n
Error while opening capture device"
);
break
;
break
;
case
PULSEAUDIO_NOT_RUNNING
:
case
PULSEAUDIO_NOT_RUNNING
:
m
ain_window_error_message
(
_
(
"Pulseaudio notification
\n\n
Pulseaudio is not running"
)
)
;
m
sg
=
_
(
"Pulseaudio notification
\n\n
Pulseaudio is not running"
);
break
;
break
;
default:
return
;
}
}
GtkWidget
*
dialog
=
gtk_message_dialog_new
(
GTK_WINDOW
(
get_main_window
()),
GTK_DIALOG_MODAL
|
GTK_DIALOG_DESTROY_WITH_PARENT
,
GTK_MESSAGE_ERROR
,
GTK_BUTTONS_CLOSE
,
"%s"
,
msg
);
gtk_window_set_title
(
GTK_WINDOW
(
dialog
),
_
(
"SFLphone Error"
));
g_signal_connect
(
dialog
,
"response"
,
G_CALLBACK
(
gtk_widget_destroy
),
NULL
);
gtk_widget_show
(
dialog
);
}
}
gboolean
gboolean
...
...
This diff is collapsed.
Click to expand it.
gnome/src/main.c
+
9
−
6
View file @
b4558a88
...
@@ -92,15 +92,18 @@ main (int argc, char *argv[])
...
@@ -92,15 +92,18 @@ main (int argc, char *argv[])
if
(
!
sflphone_init
(
&
error
))
{
if
(
!
sflphone_init
(
&
error
))
{
ERROR
(
error
->
message
);
ERROR
(
error
->
message
);
gchar
*
markup
=
g_markup_printf_escaped
(
GtkWidget
*
dialog
=
gtk_message_dialog_new
(
_
(
"Unable to initialize.
\n
Make sure the daemon is running.
\n
Error: %s"
),
GTK_WINDOW
(
get_main_window
()),
GTK_DIALOG_MODAL
|
GTK_DIALOG_DESTROY_WITH_PARENT
,
GTK_MESSAGE_ERROR
,
GTK_BUTTONS_CLOSE
,
"Unable to initialize.
\n
Make sure the daemon is running.
\n
Error: %s"
,
error
->
message
);
error
->
message
);
main_window_error_message
(
markup
);
gtk_window_set_title
(
GTK_WINDOW
(
dialog
),
_
(
"SFLphone Error"
));
gtk_dialog_run
(
GTK_DIALOG
(
dialog
));
gtk_widget_destroy
(
dialog
);
g_free
(
markup
);
g_error_free
(
error
);
g_error_free
(
error
);
goto
OUT
;
goto
OUT
;
}
}
...
...
This diff is collapsed.
Click to expand it.
gnome/src/mainwindow.c
+
0
−
33
View file @
b4558a88
...
@@ -344,39 +344,6 @@ get_main_window ()
...
@@ -344,39 +344,6 @@ get_main_window ()
return
window
;
return
window
;
}
}
void
main_window_message
(
GtkMessageType
type
,
const
gchar
*
const
markup
)
{
GtkWidget
*
dialog
=
gtk_message_dialog_new
(
GTK_WINDOW
(
get_main_window
()),
GTK_DIALOG_MODAL
|
GTK_DIALOG_DESTROY_WITH_PARENT
,
type
,
GTK_BUTTONS_CLOSE
,
NULL
);
gtk_window_set_title
(
GTK_WINDOW
(
dialog
),
_
(
"SFLphone Error"
));
gtk_message_dialog_set_markup
(
GTK_MESSAGE_DIALOG
(
dialog
),
markup
);
gtk_dialog_run
(
GTK_DIALOG
(
dialog
));
gtk_widget_destroy
(
dialog
);
}
void
main_window_error_message
(
const
gchar
*
const
markup
)
{
main_window_message
(
GTK_MESSAGE_ERROR
,
markup
);
}
void
main_window_warning_message
(
const
gchar
*
const
markup
)
{
main_window_message
(
GTK_MESSAGE_WARNING
,
markup
);
}
void
main_window_info_message
(
const
gchar
*
const
markup
)
{
main_window_message
(
GTK_MESSAGE_INFO
,
markup
);
}
void
void
main_window_dialpad
(
gboolean
state
)
main_window_dialpad
(
gboolean
state
)
{
{
...
...
This diff is collapsed.
Click to expand it.
gnome/src/mainwindow.h
+
0
−
18
View file @
b4558a88
...
@@ -74,24 +74,6 @@ void main_window_dialpad (gboolean state);
...
@@ -74,24 +74,6 @@ void main_window_dialpad (gboolean state);
*/
*/
void
main_window_volume_controls
(
gboolean
state
);
void
main_window_volume_controls
(
gboolean
state
);
/**
* Display an error message
* @param markup The error message
*/
void
main_window_error_message
(
const
gchar
*
const
markup
);
/**
* Display a warning message
* @param markup The warning message
*/
void
main_window_warning_message
(
const
gchar
*
const
markup
);
/**
* Display an info message
* @param markup The info message
*/
void
main_window_info_message
(
const
gchar
*
const
markup
);
/**
/**
* Push a message on the statusbar stack
* Push a message on the statusbar stack
* @param left_hand_message The message to display on the left side
* @param left_hand_message The message to display on the left side
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment