Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • panel-plugins/xfce4-pulseaudio-plugin
  • bobby285271/xfce4-pulseaudio-plugin
  • sgn/xfce4-pulseaudio-plugin
  • bodqhrohro/xfce4-pulseaudio-plugin
  • correctmost/xfce4-pulseaudio-plugin
  • andrzejr/xfce4-pulseaudio-plugin
  • Zetta1_Reid0/xfce4-pulseaudio-plugin
7 results
Show changes
Commits on Source (2)
......@@ -47,6 +47,7 @@
#define DEFAULT_SHOW_NOTIFICATIONS 1
#define DEFAULT_PLAY_SOUND FALSE
#define DEFAULT_REC_INDICATOR_PERSISTENT FALSE
#define DEFAULT_FORCE_GAUGE_NOTIFICATIONS FALSE
#define DEFAULT_VOLUME_STEP 5
#define DEFAULT_VOLUME_MAX 150
......@@ -98,6 +99,7 @@ struct _PulseaudioConfig
gboolean play_sound;
#endif
gboolean rec_indicator_persistent;
gboolean force_gauge_notifications;
guint volume_step;
guint volume_max;
gchar *mixer_command;
......@@ -121,6 +123,7 @@ enum
PROP_PLAY_SOUND,
#endif
PROP_REC_INDICATOR_PERSISTENT,
PROP_FORCE_GAUGE_NOTIFICATIONS,
PROP_VOLUME_STEP,
PROP_VOLUME_MAX,
PROP_MIXER_COMMAND,
......@@ -211,6 +214,14 @@ pulseaudio_config_class_init (PulseaudioConfigClass *klass)
G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_FORCE_GAUGE_NOTIFICATIONS,
g_param_spec_boolean ("force-gauge-notifications", NULL, NULL,
DEFAULT_FORCE_GAUGE_NOTIFICATIONS,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class,
PROP_VOLUME_STEP,
g_param_spec_uint ("volume-step", NULL, NULL,
......@@ -308,6 +319,7 @@ pulseaudio_config_init (PulseaudioConfig *config)
config->play_sound = DEFAULT_PLAY_SOUND;
#endif
config->rec_indicator_persistent = DEFAULT_REC_INDICATOR_PERSISTENT;
config->force_gauge_notifications = DEFAULT_FORCE_GAUGE_NOTIFICATIONS;
config->volume_step = DEFAULT_VOLUME_STEP;
config->volume_max = DEFAULT_VOLUME_MAX;
config->mixer_command = g_strdup (DEFAULT_MIXER_COMMAND);
......@@ -369,6 +381,10 @@ pulseaudio_config_get_property (GObject *object,
g_value_set_boolean (value, config->rec_indicator_persistent);
break;
case PROP_FORCE_GAUGE_NOTIFICATIONS:
g_value_set_boolean (value, config->force_gauge_notifications);
break;
case PROP_VOLUME_STEP:
g_value_set_uint (value, config->volume_step);
break;
......@@ -483,6 +499,16 @@ pulseaudio_config_set_property (GObject *object,
}
break;
case PROP_FORCE_GAUGE_NOTIFICATIONS:
val_bool = g_value_get_boolean (value);
if (config->force_gauge_notifications != val_bool)
{
config->force_gauge_notifications = val_bool;
g_object_notify (G_OBJECT (config), "force-gauge-notifications");
g_signal_emit (G_OBJECT (config), pulseaudio_config_signals [CONFIGURATION_CHANGED], 0);
}
break;
case PROP_VOLUME_STEP:
val_uint = g_value_get_uint (value);
if (config->volume_step != val_uint)
......@@ -629,6 +655,16 @@ pulseaudio_config_get_rec_indicator_persistent (PulseaudioConfig *config)
gboolean
pulseaudio_config_get_force_gauge_notifications (PulseaudioConfig *config)
{
g_return_val_if_fail (IS_PULSEAUDIO_CONFIG (config), DEFAULT_FORCE_GAUGE_NOTIFICATIONS);
return config->force_gauge_notifications;
}
guint
pulseaudio_config_get_volume_step (PulseaudioConfig *config)
{
......
......@@ -57,6 +57,7 @@ guint pulseaudio_config_get_show_notifications (PulseaudioC
gboolean pulseaudio_config_get_play_sound (PulseaudioConfig *config);
#endif
gboolean pulseaudio_config_get_rec_indicator_persistent (PulseaudioConfig *config);
gboolean pulseaudio_config_get_force_gauge_notifications (PulseaudioConfig *config);
guint pulseaudio_config_get_volume_step (PulseaudioConfig *config);
guint pulseaudio_config_get_volume_max (PulseaudioConfig *config);
const gchar *pulseaudio_config_get_mixer_command (PulseaudioConfig *config);
......
......@@ -292,6 +292,16 @@ pulseaudio_dialog_build (PulseaudioDialog *dialog)
G_OBJECT (object), "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
object = gtk_builder_get_object (builder, "checkbutton-force-gauge-notifications");
g_return_if_fail (GTK_IS_CHECK_BUTTON (object));
#ifdef HAVE_LIBNOTIFY
g_object_bind_property (G_OBJECT (dialog->config), "force-gauge-notifications",
G_OBJECT (object), "active",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
#else
gtk_widget_set_visible (GTK_WIDGET (object), FALSE);
#endif
object = gtk_builder_get_object (builder, "spinbutton-volume-step");
g_return_if_fail (GTK_IS_ENTRY (object));
g_object_bind_property (G_OBJECT (dialog->config), "volume-step",
......
......@@ -196,6 +196,22 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="checkbutton-force-gauge-notifications">
<property name="label" translatable="yes">Always display _gauge notifications</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox" id="vbox2-hbox2">
<property name="visible">True</property>
......@@ -238,7 +254,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
<child>
......@@ -285,7 +301,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">5</property>
</packing>
</child>
<child>
......@@ -331,7 +347,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">6</property>
</packing>
</child>
</object>
......
......@@ -41,6 +41,7 @@
#define SYNCHRONOUS "x-canonical-private-synchronous"
#define LAYOUT_ICON_ONLY "x-canonical-private-icon-only"
#define VALUE "value"
#include "pulseaudio-notify.h"
......@@ -84,6 +85,7 @@ struct _PulseaudioNotify
PulseaudioButton *button;
gboolean gauge_notifications;
gboolean were_gauge_notifications_set;
NotifyNotification *notification;
NotifyNotification *notification_mic;
......@@ -120,6 +122,7 @@ pulseaudio_notify_init (PulseaudioNotify *notify)
GList *node;
notify->gauge_notifications = TRUE;
notify->were_gauge_notifications_set = FALSE;
notify->notification = NULL;
notify->notification_mic = NULL;
notify->volume_changed_id = 0;
......@@ -221,14 +224,25 @@ pulseaudio_notify_notify (PulseaudioNotify *notify, gboolean mic)
icon);
g_free (title);
if (notify->gauge_notifications)
if (notify->gauge_notifications || pulseaudio_config_get_force_gauge_notifications (notify->config))
{
notify_notification_set_hint (notification,
"value",
VALUE,
g_variant_new_int32 (MIN (100, volume_i)));
notify_notification_set_hint (notification,
"x-canonical-private-synchronous",
SYNCHRONOUS,
g_variant_new_string(""));
notify->were_gauge_notifications_set = TRUE;
}
else if (notify->were_gauge_notifications_set)
{
notify_notification_set_hint (notification,
VALUE,
NULL);
notify_notification_set_hint (notification,
SYNCHRONOUS,
NULL);
notify->were_gauge_notifications_set = FALSE;
}
if (!notify_notification_show (notification, &error))
......
......@@ -3,14 +3,14 @@
# This file is distributed under the same license as the xfce-panel-plugins.xfce4-pulseaudio-plugin package.
#
# Translators:
# Baurzhan Muftakhidinov <baurthefirst@gmail.com>, 2016-2018,2020,2022
# Baurzhan Muftakhidinov <baurthefirst@gmail.com>, 2016-2018,2020,2022,2024
msgid ""
msgstr ""
"Project-Id-Version: Xfce Panel Plugins\n"
"Report-Msgid-Bugs-To: https://gitlab.xfce.org/\n"
"POT-Creation-Date: 2024-04-07 12:54+0200\n"
"PO-Revision-Date: 2015-10-05 20:18+0000\n"
"Last-Translator: Baurzhan Muftakhidinov <baurthefirst@gmail.com>, 2016-2018,2020,2022\n"
"Last-Translator: Baurzhan Muftakhidinov <baurthefirst@gmail.com>, 2016-2018,2020,2022,2024\n"
"Language-Team: Kazakh (http://app.transifex.com/xfce/xfce-panel-plugins/language/kk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
......@@ -37,11 +37,11 @@ msgstr "Барлығы"
#: panel-plugin/pulseaudio-dialog.glade:57
msgid "Output only"
msgstr ""
msgstr "Тек шығыс"
#: panel-plugin/pulseaudio-dialog.glade:60
msgid "Input only"
msgstr ""
msgstr "Тек кіріс"
#: panel-plugin/pulseaudio-dialog.glade:66
msgid "PulseAudio Panel Plugin"
......@@ -69,27 +69,27 @@ msgstr "Мультимедиялық пернелер арқылы дыбыс д
#: panel-plugin/pulseaudio-dialog.glade:185
msgid "Always display the recording _indicator"
msgstr ""
msgstr "Жазба _индикаторын әрқашан көрсету"
#: panel-plugin/pulseaudio-dialog.glade:208
msgid "Show volume _notifications:"
msgstr ""
msgstr "Дыбыс деңгейі ха_барламаларын көрсету:"
#: panel-plugin/pulseaudio-dialog.glade:222
msgid "Mute/unmute is notified in all modes except \"None\""
msgstr ""
msgstr "Дыбысты басу/іске қосу \"Ешнәрсе\" режимінен бөлек басқа режимдерде хабарланады"
#: panel-plugin/pulseaudio-dialog.glade:248
msgid "Step size used when adjusting volume with mouse wheel or hotkeys."
msgstr ""
msgstr "Дыбыс деңгейін тышқан дөңгелегі немесе ыстық пернелермен келтіру кезінде қолданылатын қадамы."
#: panel-plugin/pulseaudio-dialog.glade:254
msgid "_Volume step:"
msgstr ""
msgstr "_Дыбыс деңгейінің қадамы:"
#: panel-plugin/pulseaudio-dialog.glade:300
msgid "M_aximum volume:"
msgstr ""
msgstr "М_аксималды дыбыс деңгейі:"
#: panel-plugin/pulseaudio-dialog.glade:345
msgid "Behaviour"
......@@ -127,7 +127,7 @@ msgstr "Ойнатуды басқару үшін мультимедиа перн
#: panel-plugin/pulseaudio-dialog.glade:536
msgid "Send multimedia keys to all players"
msgstr ""
msgstr "Мультимедия пернелерін барлық плеерлерге жіберу"
#: panel-plugin/pulseaudio-dialog.glade:551
msgid "Enable experimental window focus support"
......@@ -139,11 +139,11 @@ msgstr "Аты"
#: panel-plugin/pulseaudio-dialog.glade:641
msgid "Persistent"
msgstr ""
msgstr "Тұрақты"
#: panel-plugin/pulseaudio-dialog.glade:652
msgid "Ignored"
msgstr ""
msgstr "Еленбейтін"
#: panel-plugin/pulseaudio-dialog.glade:672
msgid "Clear Known Items"
......@@ -151,7 +151,7 @@ msgstr "Белгілі нәрселерді тазарту"
#: panel-plugin/pulseaudio-dialog.glade:694
msgid "Please restart the players to make them visible again."
msgstr ""
msgstr "Плеерлерді қайта көрінетіндей ету үшін, оларды қайта іске қосыңыз."
#: panel-plugin/pulseaudio-dialog.glade:717
msgid "Known Media Players"
......@@ -182,14 +182,14 @@ msgstr "PulseAudio серверіне байланыспаған"
msgid ""
"<b>Volume %d%% (muted)</b>\n"
"<small>%s</small>"
msgstr ""
msgstr "<b>Дыбыс %d%% (басылған)</b>\n<small>%s</small>"
#: panel-plugin/pulseaudio-button.c:359
#, c-format
msgid ""
"<b>Volume %d%%</b>\n"
"<small>%s</small>"
msgstr ""
msgstr "<b>Дыбыс %d%%</b>\n<small>%s</small>"
#: panel-plugin/pulseaudio-menu.c:521
msgid "Output"
......