[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 02/02: Switching to gtk_message_dialog boxes
noreply at xfce.org
noreply at xfce.org
Thu Mar 5 00:02:09 CET 2015
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-pulseaudio-plugin.
commit 0e7146f88197942d66f0411acf706fe8ca223e28
Author: Andrzej <ndrwrdck at gmail.com>
Date: Wed Mar 4 23:01:56 2015 +0000
Switching to gtk_message_dialog boxes
---
panel-plugin/pulseaudio-dialog.c | 17 ++++++++++++++---
panel-plugin/pulseaudio-menu.c | 17 ++++++++++++++---
2 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/panel-plugin/pulseaudio-dialog.c b/panel-plugin/pulseaudio-dialog.c
index 921c7f7..a056888 100644
--- a/panel-plugin/pulseaudio-dialog.c
+++ b/panel-plugin/pulseaudio-dialog.c
@@ -119,7 +119,8 @@ static void
pulseaudio_dialog_run_mixer (PulseaudioDialog *dialog,
GtkWidget *widget)
{
- GError *error = NULL;
+ GError *error = NULL;
+ GtkWidget *message_dialog;
g_return_if_fail (IS_PULSEAUDIO_DIALOG (dialog));
g_return_if_fail (GTK_IS_BUTTON (widget));
@@ -128,8 +129,18 @@ pulseaudio_dialog_run_mixer (PulseaudioDialog *dialog,
pulseaudio_config_get_mixer_command (dialog->config),
FALSE, FALSE, &error))
{
- xfce_dialog_show_error (NULL, error, _("Failed to execute command \"%s\"."),
- pulseaudio_config_get_mixer_command (dialog->config));
+ message_dialog = gtk_message_dialog_new_with_markup (NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("<big><b>Failed to execute command \"%s\".</b></big>\n\n%s"),
+ pulseaudio_config_get_mixer_command (dialog->config),
+ error->message);
+ gtk_window_set_title (GTK_WINDOW (message_dialog), _("Error"));
+ gtk_dialog_run (GTK_DIALOG (message_dialog));
+ gtk_widget_destroy (message_dialog);
+ //xfce_dialog_show_error (NULL, error, _("Failed to execute command \"%s\"."),
+ // pulseaudio_config_get_mixer_command (dialog->config));
g_error_free (error);
}
}
diff --git a/panel-plugin/pulseaudio-menu.c b/panel-plugin/pulseaudio-menu.c
index 570843f..e0798bc 100644
--- a/panel-plugin/pulseaudio-menu.c
+++ b/panel-plugin/pulseaudio-menu.c
@@ -142,7 +142,8 @@ static void
pulseaudio_menu_run_audio_mixer (PulseaudioMenu *menu,
GtkCheckMenuItem *menu_item)
{
- GError *error = NULL;
+ GError *error = NULL;
+ GtkWidget *message_dialog;
g_return_if_fail (IS_PULSEAUDIO_MENU (menu));
@@ -150,8 +151,18 @@ pulseaudio_menu_run_audio_mixer (PulseaudioMenu *menu,
pulseaudio_config_get_mixer_command (menu->config),
FALSE, FALSE, &error))
{
- xfce_dialog_show_error (NULL, error, _("Failed to execute command \"%s\"."),
- pulseaudio_config_get_mixer_command (menu->config));
+ message_dialog = gtk_message_dialog_new_with_markup (NULL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_CLOSE,
+ _("<big><b>Failed to execute command \"%s\".</b></big>\n\n%s"),
+ pulseaudio_config_get_mixer_command (menu->config),
+ error->message);
+ gtk_window_set_title (GTK_WINDOW (message_dialog), _("Error"));
+ gtk_dialog_run (GTK_DIALOG (message_dialog));
+ gtk_widget_destroy (message_dialog);
+ //xfce_dialog_show_error (NULL, error, _("Failed to execute command \"%s\"."),
+ // pulseaudio_config_get_mixer_command (menu->config));
g_error_free (error);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list