Skip to content
Commits on Source (18)
================
Version 3.38.2
================
- Updated translations
Applications:
- Fix NULL hash table being unreffed.
Keyboard:
- fix gtk_widget_get_can_default assertion error.
Network:
- Correctly detect when ethernet devices are hotplugged.
Printers:
- Make printers panel have a smaller minimum width.
- Fix leak of printer name in callbacks.
Sharing:
- Disable Tracker 3.
Sound:
- Update libgvc to add support for recent UCM related changes in ALSA and
PulseAudio.
Users:
- Fix free of const string.
Wacom:
- Fix a critical warning if loading a cursor fails.
================
Version 3.38.1
================
......
project(
'gnome-control-center', 'c',
version : '3.38.1',
version : '3.38.2',
license : 'GPL2+',
meson_version : '>= 0.51.0'
)
......
......@@ -1871,10 +1871,10 @@ cc_applications_panel_finalize (GObject *object)
g_clear_object (&self->privacy_settings);
g_clear_object (&self->search_settings);
g_free (self->current_app_id);
g_free (self->current_portal_app_id);
g_hash_table_unref (self->globs);
g_hash_table_unref (self->search_providers);
g_clear_pointer (&self->current_app_id, g_free);
g_clear_pointer (&self->current_portal_app_id, g_free);
g_clear_pointer (&self->globs, g_hash_table_unref);
g_clear_pointer (&self->search_providers, g_hash_table_unref);
G_OBJECT_CLASS (cc_applications_panel_parent_class)->finalize (object);
}
......
......@@ -311,6 +311,7 @@
<property name="label" translatable="yes">Replace</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="replace_button_clicked_cb" object="CcKeyboardShortcutEditor" swapped="yes" />
</object>
......
......@@ -391,9 +391,6 @@ panel_add_device (CcNetworkPanel *self, NMDevice *device)
NetDeviceBluetooth *device_bluetooth;
g_autoptr(GDBusObject) modem_object = NULL;
if (!nm_device_get_managed (device))
return;
/* does already exist */
if (g_hash_table_lookup (self->nm_device_to_device, device) != NULL)
return;
......@@ -517,19 +514,36 @@ active_connections_changed (CcNetworkPanel *self)
}
static void
device_added_cb (CcNetworkPanel *self, NMDevice *device)
device_managed_cb (CcNetworkPanel *self, GParamSpec *pspec, NMDevice *device)
{
g_debug ("New device added");
if (!nm_device_get_managed (device))
return;
panel_add_device (self, device);
panel_refresh_device_titles (self);
}
static void
device_added_cb (CcNetworkPanel *self, NMDevice *device)
{
g_debug ("New device added");
if (nm_device_get_managed (device))
device_managed_cb (self, NULL, device);
else
g_signal_connect_object (device, "notify::managed", G_CALLBACK (device_managed_cb), self, G_CONNECT_SWAPPED);
}
static void
device_removed_cb (CcNetworkPanel *self, NMDevice *device)
{
g_debug ("Device removed");
panel_remove_device (self, device);
panel_refresh_device_titles (self);
g_signal_handlers_disconnect_by_func (device,
G_CALLBACK (device_managed_cb),
self);
}
static void
......@@ -537,7 +551,6 @@ manager_running (CcNetworkPanel *self)
{
const GPtrArray *devices;
int i;
NMDevice *device_tmp;
/* clear all devices we added */
if (!nm_client_get_nm_running (self->client)) {
......@@ -552,8 +565,8 @@ manager_running (CcNetworkPanel *self)
return;
}
for (i = 0; i < devices->len; i++) {
device_tmp = g_ptr_array_index (devices, i);
panel_add_device (self, device_tmp);
NMDevice *device = g_ptr_array_index (devices, i);
device_added_cb (self, device);
}
out:
panel_refresh_device_titles (self);
......
......@@ -94,7 +94,7 @@ ppd_names_free (gpointer user_data)
}
}
static void set_ppd_cb (gchar *printer_name, gboolean success, gpointer user_data);
static void set_ppd_cb (const gchar *printer_name, gboolean success, gpointer user_data);
static void
get_ppd_names_cb (PPDName **names,
......@@ -139,7 +139,7 @@ search_for_drivers (PpDetailsDialog *self)
}
static void
set_ppd_cb (gchar *printer_name,
set_ppd_cb (const gchar *printer_name,
gboolean success,
gpointer user_data)
{
......
......@@ -1448,7 +1448,7 @@ printer_set_ppd_async_dbus_cb (GObject *source_object,
/* Don't call callback if cancelled */
if (!data->cancellable ||
!g_cancellable_is_cancelled (data->cancellable))
data->callback (g_strdup (data->printer_name),
data->callback (data->printer_name,
result,
data->user_data);
......@@ -1521,7 +1521,7 @@ printer_set_ppd_async (const gchar *printer_name,
return;
out:
callback (g_strdup (printer_name), FALSE, user_data);
callback (printer_name, FALSE, user_data);
if (data->cancellable)
g_object_unref (data->cancellable);
......@@ -1578,7 +1578,7 @@ printer_set_ppd_file_async_scb (GObject *source_object,
return;
out:
data->callback (g_strdup (data->printer_name), FALSE, data->user_data);
data->callback (data->printer_name, FALSE, data->user_data);
if (data->cancellable)
g_object_unref (data->cancellable);
......@@ -1640,7 +1640,7 @@ printer_set_ppd_file_async (const gchar *printer_name,
return;
out:
callback (g_strdup (printer_name), FALSE, user_data);
callback (printer_name, FALSE, user_data);
if (data->cancellable)
g_object_unref (data->cancellable);
......
......@@ -133,7 +133,7 @@ gchar *printer_get_hostname (cups_ptype_t printer_type,
const gchar *device_uri,
const gchar *printer_uri);
typedef void (*PSPCallback) (gchar *printer_name,
typedef void (*PSPCallback) (const gchar *printer_name,
gboolean success,
gpointer user_data);
......
......@@ -278,6 +278,7 @@
<packing>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="width">2</property>
</packing>
</child>
......
......@@ -106,6 +106,7 @@ cc_media_sharing_set_preferences (gchar **folders)
g_key_file_set_boolean (file, "general", "upnp-enabled", TRUE);
g_key_file_set_boolean (file, "Tracker", "enabled", FALSE);
g_key_file_set_boolean (file, "Tracker3", "enabled", FALSE);
g_key_file_set_boolean (file, "MediaExport", "enabled", TRUE);
str_list = folders;
......
......@@ -839,7 +839,7 @@ get_enrollment_string (CcFingerprintDialog *self,
if (have_multiple_devices (self))
device_name = cc_fprintd_device_get_name (self->device);
ret = TR (finger_str_to_msg (finger_id, device_name, is_swipe));
ret = finger_str_to_msg (finger_id, device_name, is_swipe);
if (ret)
return ret;
......@@ -852,8 +852,8 @@ enroll_finger (CcFingerprintDialog *self,
const char *finger_id)
{
g_auto(GStrv) tmp_finger_name = NULL;
g_autofree char *enroll_message = NULL;
g_autofree char *finger_name = NULL;
g_autofree char *enroll_message = NULL;
g_return_if_fail (finger_id);
......@@ -863,7 +863,7 @@ enroll_finger (CcFingerprintDialog *self,
g_debug ("Enrolling finger %s", finger_id);
enroll_message = TR (get_enrollment_string (self, finger_id));
enroll_message = get_enrollment_string (self, finger_id);
tmp_finger_name = g_strsplit (get_finger_name (finger_id), "_", -1);
finger_name = g_strjoinv ("", tmp_finger_name);
......
......@@ -309,7 +309,7 @@ calib_area_new (GdkScreen *screen,
GdkMonitor *monitor;
#ifndef FAKE_AREA
GdkWindow *window;
GdkCursor *cursor;
g_autoptr(GdkCursor) cursor = NULL;
#endif /* FAKE_AREA */
GtkGesture *press;
......@@ -344,7 +344,6 @@ calib_area_new (GdkScreen *screen,
window = gtk_widget_get_window (calib_area->window);
cursor = gdk_cursor_new_for_display (gdk_display_get_default (), GDK_BLANK_CURSOR);
gdk_window_set_cursor (window, cursor);
g_object_unref (cursor);
gtk_widget_set_can_focus (calib_area->window, TRUE);
gtk_window_set_keep_above (GTK_WINDOW (calib_area->window), TRUE);
......
This diff is collapsed.
......@@ -2727,7 +2727,7 @@ msgid ""
"to access the internet through Wi-Fi."
msgstr ""
"En activar el punt d'accés Wi-Fi es desconnectarà de %s, i no serà possible "
"accedir a Internet a través de Wifi."
"accedir a Internet a través de Wi-Fi."
#: panels/network/cc-wifi-hotspot-dialog.c:248
msgid "Must have a minimum of 8 characters"
......@@ -2743,9 +2743,9 @@ msgid ""
"Wi-Fi network that they can connect to. To do this, you must have an "
"internet connection through a source other than Wi-Fi."
msgstr ""
"El punt d'accés WiFi permet compatir la vostra connexió a Internet amb "
"El punt d'accés Wi-Fi permet compatir la vostra connexió a Internet amb "
"altres creant una xarxa amb la qual es poden connectar. Per a fer això, heu "
"de tenir una connexió a Internet per un mitjà que no sigui la Wifi."
"de tenir una connexió a Internet per un mitjà que no sigui la Wi-Fi."
#: panels/network/cc-wifi-hotspot-dialog.ui:44
msgid "Network Name"
......@@ -2808,7 +2808,7 @@ msgstr "Mode d'avió activat"
#: panels/network/cc-wifi-panel.ui:198
msgid "Turn off to use Wi-Fi"
msgstr "Desactiveu-lo per a utilitzar la Wifi"
msgstr "Desactiveu-lo per a utilitzar la Wi-Fi"
#: panels/network/cc-wifi-panel.ui:236
msgid "Wi-Fi Hotspot Active"
......@@ -4586,7 +4586,7 @@ msgstr "_Wi-Fi"
#: panels/power/cc-power-panel.c:2039
msgid "Wi-Fi can be turned off to save power."
msgstr "La Wifi pot ser desactivada per a estalviar energia."
msgstr "La Wi-Fi pot ser desactivada per a estalviar energia."
#: panels/power/cc-power-panel.c:2055
msgid "_Mobile Broadband"
......@@ -6835,7 +6835,7 @@ msgstr "_Duració de l'historial dels fitxers"
#: panels/usage/cc-usage-panel.ui:119
msgid "_Clear History…"
msgstr "_Neteja l'historial recent…"
msgstr "_Neteja l'historial…"
#: panels/usage/cc-usage-panel.ui:135
msgid "Trash & Temporary Files"
......
......@@ -27,9 +27,9 @@ msgstr ""
"Project-Id-Version: gnome-control-center master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-control-center/"
"issues\n"
"POT-Creation-Date: 2020-08-31 15:11+0000\n"
"PO-Revision-Date: 2020-08-31 22:28+0200\n"
"Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n"
"POT-Creation-Date: 2020-10-23 19:17+0000\n"
"PO-Revision-Date: 2020-11-17 17:09+0100\n"
"Last-Translator: Tim Sabsch <tim@sabsch.com>\n"
"Language-Team: German <gnome-de@gnome.org>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
......@@ -219,7 +219,7 @@ msgstr "Kamera"
#: panels/keyboard/keyboard-shortcuts.c:368 panels/network/network-proxy.ui:126
#: panels/user-accounts/cc-user-panel.c:865
#: panels/user-accounts/cc-user-panel.c:957
#: subprojects/gvc/gvc-mixer-control.c:1876
#: subprojects/gvc/gvc-mixer-control.c:1900
msgid "Disabled"
msgstr "Deaktiviert"
......@@ -371,7 +371,7 @@ msgstr "Ein Bild wählen"
#: panels/color/cc-color-calibrate.ui:25 panels/color/cc-color-panel.c:238
#: panels/color/cc-color-panel.c:886 panels/color/cc-color-panel.ui:657
#: panels/common/cc-language-chooser.ui:24
#: panels/display/cc-display-panel.c:942
#: panels/display/cc-display-panel.c:943
#: panels/info-overview/cc-info-overview-panel.ui:234
#: panels/network/cc-wifi-hotspot-dialog.ui:122
#: panels/network/cc-wifi-panel.c:865
......@@ -1590,20 +1590,20 @@ msgstr ""
"Bildschirm;Sperre;Diagnose;Absturz;Crash;Privat;temporär;Index;Name;Netzwerk;"
"Identität;Privatsphäre;"
#: panels/display/cc-display-panel.c:953
#: panels/display/cc-display-panel.c:954
#: panels/network/connection-editor/connection-editor.ui:27
msgid "_Apply"
msgstr "An_wenden"
#: panels/display/cc-display-panel.c:974
#: panels/display/cc-display-panel.c:975
msgid "Apply Changes?"
msgstr "Änderungen anwenden?"
#: panels/display/cc-display-panel.c:979
#: panels/display/cc-display-panel.c:980
msgid "Changes Cannot be Applied"
msgstr "Änderungen können nicht angewendet werden"
#: panels/display/cc-display-panel.c:980
#: panels/display/cc-display-panel.c:981
msgid "This could be due to hardware limitations."
msgstr "Das könnte an Einschränkungen der Hardware liegen."
......@@ -2245,39 +2245,39 @@ msgstr "Alle Tastenkombinationen auf die Vorgabe zurücksetzen"
msgid "No keyboard shortcut found"
msgstr "Keine Tastenkombination gefunden"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:404
#: panels/keyboard/cc-keyboard-shortcut-editor.c:405
#, c-format
msgid "%s is already being used for %s. If you replace it, %s will be disabled"
msgstr ""
"%s wird bereits für %s verwendet. Wenn Sie diese ersetzen, so wird %s "
"deaktiviert"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:547
#: panels/keyboard/cc-keyboard-shortcut-editor.c:549
msgid "Enter the new shortcut"
msgstr "Neue Tastenkombination eingeben"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:564
#: panels/keyboard/cc-keyboard-shortcut-editor.c:566
msgid "Set Custom Shortcut"
msgstr "Eigene Tastenkombination festlegen"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:564
#: panels/keyboard/cc-keyboard-shortcut-editor.c:566
msgid "Set Shortcut"
msgstr "Tastenkombination festlegen"
#. TRANSLATORS: %s is replaced with a description of the keyboard shortcut
#: panels/keyboard/cc-keyboard-shortcut-editor.c:575
#: panels/keyboard/cc-keyboard-shortcut-editor.c:577
#, c-format
msgid "Enter new shortcut to change %s."
msgstr "Geben Sie die neue Tastenkombination ein, um %s zu ändern."
#: panels/keyboard/cc-keyboard-shortcut-editor.c:1002
#: panels/keyboard/cc-keyboard-shortcut-editor.c:1004
msgid "Add Custom Shortcut"
msgstr "Individuelle Tastenkombination hinzufügen"
#: panels/keyboard/cc-keyboard-shortcut-editor.ui:60
msgid "Press Esc to cancel or Backspace to disable the keyboard shortcut."
msgstr ""
"Drücken Sie Esc zum Abbrechen oder die Löschtaste, um die Tastenkombination "
"Drücken Sie Esc zum Abbrechen oder die Rücktaste, um die Tastenkombination "
"zu deaktivieren."
#: panels/keyboard/cc-keyboard-shortcut-editor.ui:135
......@@ -2631,7 +2631,7 @@ msgstr "Bildlauf mit zwei Fingern"
msgid "Edge Scrolling"
msgstr "Bildlauf am Rand"
#: panels/mouse/cc-mouse-panel.ui:719 panels/wacom/cc-wacom-panel.c:425
#: panels/mouse/cc-mouse-panel.ui:719 panels/wacom/cc-wacom-panel.c:441
msgid "Test Your _Settings"
msgstr "_Testen Sie Ihre Einstellungen"
......@@ -4497,7 +4497,7 @@ msgid "Media player"
msgstr "Medienwiedergabegerät"
#. TRANSLATORS: secondary battery
#: panels/power/cc-power-panel.c:661 panels/wacom/cc-wacom-panel.c:794
#: panels/power/cc-power-panel.c:661 panels/wacom/cc-wacom-panel.c:728
msgid "Tablet"
msgstr "Grafiktablett"
......@@ -4866,7 +4866,7 @@ msgstr "Ort"
#. Translators: Name of column showing printer drivers
#: panels/printers/pp-details-dialog.ui:122
#: panels/printers/pp-ppd-selection-dialog.c:248
#: panels/printers/pp-ppd-selection-dialog.c:250
msgid "Driver"
msgstr "Treiber"
......@@ -5232,7 +5232,7 @@ msgid "No pre-filtering"
msgstr "Keine Vorfilterung"
#. Translators: Name of column showing printer manufacturers
#: panels/printers/pp-ppd-selection-dialog.c:231
#: panels/printers/pp-ppd-selection-dialog.c:233
msgid "Manufacturer"
msgstr "Hersteller"
......@@ -7894,7 +7894,7 @@ msgstr ""
msgid "Map Buttons"
msgstr "Knöpfe zuweisen"
#: panels/wacom/button-mapping.ui:37 panels/wacom/cc-wacom-page.c:512
#: panels/wacom/button-mapping.ui:37 panels/wacom/cc-wacom-page.c:519
#: panels/wacom/gnome-wacom-properties.ui:60
msgid "_Close"
msgstr "S_chließen"
......@@ -7970,11 +7970,11 @@ msgstr "Einem einzigen Bildschirm zuordnen"
msgid "%d of %d"
msgstr "%d von %d"
#: panels/wacom/cc-wacom-page.c:509
#: panels/wacom/cc-wacom-page.c:516
msgid "Display Mapping"
msgstr "Zuordnung anzeigen"
#: panels/wacom/cc-wacom-panel.c:791 panels/wacom/wacom-stylus-page.ui:119
#: panels/wacom/cc-wacom-panel.c:725 panels/wacom/wacom-stylus-page.ui:119
msgid "Stylus"
msgstr "Stylus"
......@@ -8255,7 +8255,7 @@ msgstr ""
#. translators:
#. * The number of sound outputs on a particular device
#: subprojects/gvc/gvc-mixer-control.c:1883
#: subprojects/gvc/gvc-mixer-control.c:1907
#, c-format
msgid "%u Output"
msgid_plural "%u Outputs"
......@@ -8264,14 +8264,14 @@ msgstr[1] "%u Ausgänge"
#. translators:
#. * The number of sound inputs on a particular device
#: subprojects/gvc/gvc-mixer-control.c:1893
#: subprojects/gvc/gvc-mixer-control.c:1917
#, c-format
msgid "%u Input"
msgid_plural "%u Inputs"
msgstr[0] "%u Eingang"
msgstr[1] "%u Eingänge"
#: subprojects/gvc/gvc-mixer-control.c:2750
#: subprojects/gvc/gvc-mixer-control.c:2867
msgid "System Sounds"
msgstr "Systemklänge"
......
......@@ -7,23 +7,23 @@
# Tiago Santos <tiagofsantos81@sapo.pt>, 2014 - 2016.
# Pedro Albuquerque <palbuquerque73@gmail.com>, 2015.
# Sérgio Cardeira <cardeira.sergio@gmail.com>, 2016.
# Juliano de Souza Camargo <julianosc@pm.me>, 2020.
# Juliano de Souza Camargo <julianosc@protonmail.com>, 2020.
#
msgid ""
msgstr ""
"Project-Id-Version: 3.8\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-control-center/"
"issues\n"
"POT-Creation-Date: 2020-09-17 21:01+0000\n"
"PO-Revision-Date: 2020-09-18 21:11+0100\n"
"Last-Translator: Juliano de Souza Camargo <julianosc@pm.me>\n"
"Language-Team: Portuguese <>\n"
"POT-Creation-Date: 2020-10-07 12:57+0000\n"
"PO-Revision-Date: 2020-10-12 14:00+0100\n"
"Last-Translator: Juliano de Souza Camargo <julianosc@protonmail.com>\n"
"Language-Team: Portuguese < >\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"X-Generator: Gtranslator 3.36.0\n"
"X-Generator: Gtranslator 3.38.0\n"
"X-Language: pt_PT\n"
"X-Source-Language: C\n"
"X-Project-Style: gnome\n"
......@@ -222,7 +222,7 @@ msgstr "Microfone"
#: panels/applications/cc-applications-panel.ui:151
#: panels/location/gnome-location-panel.desktop.in.in:3
msgid "Location Services"
msgstr "Serviços de Localização"
msgstr "Serviços de localização"
#: panels/applications/cc-applications-panel.ui:157
#: panels/applications/cc-applications-panel.ui:499
......@@ -292,11 +292,11 @@ msgstr "Reiniciar"
#: panels/applications/cc-applications-panel.ui:364
msgid "Usage"
msgstr "Uso"
msgstr "Utilização"
#: panels/applications/cc-applications-panel.ui:376
msgid "How much resources this application is using."
msgstr "Quanto dos recursos esta aplicação está a usar."
msgstr "Quanto dos recursos esta aplicação está a utilizar."
#: panels/applications/cc-applications-panel.ui:391
#: panels/applications/cc-applications-panel.ui:535
......@@ -345,7 +345,7 @@ msgstr "Limpar a memória transitória..."
#: panels/applications/gnome-applications-panel.desktop.in.in:4
msgid "Control various application permissions and settings"
msgstr "Controlar várias permissões e definições da aplicação"
msgstr "Controlar várias permissões e definições de aplicações"
#. FIXME
#. Translators: Search terms to find the Privacy panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
......@@ -1149,7 +1149,7 @@ msgstr "Dados de calibração disponibilizados pelo fabricante"
#: panels/color/cc-color-profile.c:197
msgid "Full-screen display correction not possible with this profile"
msgstr "Não é possível realizar correção de ecrã cheio com este perfil"
msgstr "Não é possível realizar correção de ecrã inteiro com este perfil"
#: panels/color/cc-color-profile.c:219
msgid "This profile may no longer be accurate"
......@@ -1868,7 +1868,7 @@ msgstr "Tipo do SO"
#: panels/info-overview/cc-info-overview-panel.ui:142
msgid "GNOME Version"
msgstr "Versão GNOME"
msgstr "Versão do GNOME"
#: panels/info-overview/cc-info-overview-panel.ui:152
msgid "Windowing System"
......@@ -1900,11 +1900,11 @@ msgstr "_Mudar o nome"
#: panels/info-overview/gnome-info-overview-panel.desktop.in.in:3
msgid "About"
msgstr "Sobre"
msgstr "Acerca"
#: panels/info-overview/gnome-info-overview-panel.desktop.in.in:4
msgid "View information about your system"
msgstr "Ver informação sobre o seu sistema"
msgstr "Ver informação acerca de seu sistema"
#. Translators: Search terms to find the About panel.
#. Do NOT translate or localize the semicolons!
......@@ -2015,7 +2015,7 @@ msgstr "Capturas de ecrã"
#: panels/keyboard/01-screenshot.xml.in:6
msgid "Save a screenshot to $PICTURES"
msgstr "Gravar uma captura de ecrã em $PICTURES"
msgstr "Gravar uma captura do ecrã em $PICTURES"
#: panels/keyboard/01-screenshot.xml.in:10
msgid "Save a screenshot of a window to $PICTURES"
......@@ -2213,7 +2213,7 @@ msgstr "Repor o atalho para seu valor predefinido"
#: panels/keyboard/cc-keyboard-panel.ui:73
msgid "Hold down and type to enter different characters"
msgstr "Prima e digite para inserir caracteres diferentes"
msgstr "Prima e digite para inserir caracteres alternativos"
#: panels/keyboard/cc-keyboard-panel.ui:148
msgid "Reset All…"
......@@ -2227,30 +2227,30 @@ msgstr "Repor todos os atalhos para suas posições predefinidas"
msgid "No keyboard shortcut found"
msgstr "Nenhum atalho de teclado encontrado"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:404
#: panels/keyboard/cc-keyboard-shortcut-editor.c:405
#, c-format
msgid "%s is already being used for %s. If you replace it, %s will be disabled"
msgstr "%s já está a ser usado para %s. Caso o reponha, %s será desativado"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:547
#: panels/keyboard/cc-keyboard-shortcut-editor.c:549
msgid "Enter the new shortcut"
msgstr "Insira um novo atalho"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:564
#: panels/keyboard/cc-keyboard-shortcut-editor.c:566
msgid "Set Custom Shortcut"
msgstr "Definir um atalho personalizado"
#: panels/keyboard/cc-keyboard-shortcut-editor.c:564
#: panels/keyboard/cc-keyboard-shortcut-editor.c:566
msgid "Set Shortcut"
msgstr "Definir um atalho"
#. TRANSLATORS: %s is replaced with a description of the keyboard shortcut
#: panels/keyboard/cc-keyboard-shortcut-editor.c:575
#: panels/keyboard/cc-keyboard-shortcut-editor.c:577
#, c-format
msgid "Enter new shortcut to change %s."
msgstr "Insira um novo atalho para %s."
#: panels/keyboard/cc-keyboard-shortcut-editor.c:1002
#: panels/keyboard/cc-keyboard-shortcut-editor.c:1004
msgid "Add Custom Shortcut"
msgstr "Adicionar um atalho personalizado"
......@@ -2335,7 +2335,7 @@ msgid ""
"Uses Mozilla Location Service: <a href='https://location.services.mozilla."
"com/privacy'>Privacy Policy</a>"
msgstr ""
"Usar o serviço de localização Mozilla: <a href='https://location.services."
"Usa o serviço de localização Mozilla: <a href='https://location.services."
"mozilla.com/privacy'>Políticas de Privacidade</a>"
#: panels/location/cc-location-panel.ui:93
......@@ -2348,7 +2348,7 @@ msgstr "Nenhuma aplicação requisitou acesso à localização"
#: panels/location/gnome-location-panel.desktop.in.in:4
msgid "Protect your location information"
msgstr "Proteja seus dados de localização"
msgstr "Proteger seus dados de localização"
#. FIXME
#: panels/lock/cc-lock-panel.ui:27
......@@ -2377,7 +2377,7 @@ msgstr "Compasso de espera para autobloquear o ecrã"
#: panels/lock/cc-lock-panel.ui:83
msgid "Period after the screen blanks when the screen is automatically locked."
msgstr "Período até o ecrã desligar-se após ele bloquear-se automaticamente."
msgstr "Período até o ecrã desligar-se após o bloqueio automático."
#: panels/lock/cc-lock-panel.ui:103
msgid "Show _Notifications on Lock Screen"
......@@ -2505,7 +2505,7 @@ msgstr "Nunca"
#: panels/lock/gnome-lock-panel.desktop.in.in:3
msgid "Screen Lock"
msgstr "Ecrã bloqueado"
msgstr "Bloqueio de ecrã"
#: panels/lock/gnome-lock-panel.desktop.in.in:4
msgid "Lock your screen"
......@@ -2556,11 +2556,11 @@ msgstr "Define a ordem dos botões físicos no rato e rato por toque."
#: panels/mouse/cc-mouse-panel.ui:123 panels/sound/cc-balance-slider.ui:13
msgid "Left"
msgstr "Esquerda"
msgstr "Esquerdo"
#: panels/mouse/cc-mouse-panel.ui:133 panels/sound/cc-balance-slider.ui:15
msgid "Right"
msgstr "Direita"
msgstr "Direito"
#: panels/mouse/cc-mouse-panel.ui:169
msgid "Mouse"
......@@ -2648,8 +2648,8 @@ msgstr "Rato e Rato por toque"
msgid ""
"Change your mouse or touchpad sensitivity and select right or left-handed"
msgstr ""
"Altere a sensibilidade do seu rato ou rato por toque e selecione destro ou "
"canhoto"
"Alterar a sensibilidade do seu rato ou rato por toque e escolher entre "
"destro ou canhoto"
#. Translators: Search terms to find the Mouse and Touchpad panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: panels/mouse/gnome-mouse-panel.desktop.in.in:19
......@@ -4298,7 +4298,7 @@ msgstr "Contas online"
#: panels/online-accounts/gnome-online-accounts-panel.desktop.in.in:4
msgid "Connect to your online accounts and decide what to use them for"
msgstr "Ligue-se às suas contas online e decida como as utilizar"
msgstr "Ligar-se às suas contas online e decidir como as utilizar"
#. Translators: Search terms to find the Online Accounts panel.
#. Do NOT translate or localize the semicolons!
......@@ -4697,7 +4697,7 @@ msgstr "Energia"
#: panels/power/gnome-power-panel.desktop.in.in:4
msgid "View your battery status and change power saving settings"
msgstr ""
"Ver o estado da sua bateria e alterar as definições de poupança de energia"
"Ver o estado de sua bateria e alterar as definições de poupança de energia"
#. Translators: Search terms to find the Power panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: panels/power/gnome-power-panel.desktop.in.in:19
......@@ -4782,7 +4782,7 @@ msgstr "Nenhuma impressora encontrada"
#. Translators: The entered text should contain network address of a printer or a text which will filter found devices (their names and locations)
#: panels/printers/new-printer-dialog.ui:284
msgid "Enter a network address or search for a printer"
msgstr "Insira um endereço de rede ou procure uma impressora"
msgstr "Insira um endereço de rede ou nome o de uma"
#: panels/printers/new-printer-dialog.ui:353
msgid "Enter username and password to view printers on Print Server."
......@@ -4819,7 +4819,7 @@ msgstr "Localização"
#. Translators: Name of column showing printer drivers
#: panels/printers/pp-details-dialog.ui:122
#: panels/printers/pp-ppd-selection-dialog.c:248
#: panels/printers/pp-ppd-selection-dialog.c:250
msgid "Driver"
msgstr "Controlador"
......@@ -5185,7 +5185,7 @@ msgid "No pre-filtering"
msgstr "Nenhuma pré-filtragem"
#. Translators: Name of column showing printer manufacturers
#: panels/printers/pp-ppd-selection-dialog.c:231
#: panels/printers/pp-ppd-selection-dialog.c:233
msgid "Manufacturer"
msgstr "Fabricante"
......@@ -5542,13 +5542,13 @@ msgstr "Pode alterar estes atalhos nas definições de teclado"
#: panels/region/gnome-region-panel.desktop.in.in:3
msgid "Region & Language"
msgstr "Região e idioma"
msgstr "Região e Idioma"
#: panels/region/gnome-region-panel.desktop.in.in:4
msgid ""
"Select your display language, formats, keyboard layouts and input sources"
msgstr ""
"Selecione o seu idioma de apresentação, formatos, disposições de teclado e "
"Selecionar seu idioma de apresentação, formatos, disposições de teclado e "
"fontes de introdução"
#. Translators: Search terms to find the Region and Language panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
......@@ -5691,7 +5691,7 @@ msgstr "Suportes removíveis"
#: panels/removable-media/gnome-removable-media-panel.desktop.in.in:4
msgid "Configure Removable Media settings"
msgstr "Configurar definições de suportes removíveis"
msgstr "Configurar as definições de suportes removíveis"
#. Translators: Search terms to find the Removable Media panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: panels/removable-media/gnome-removable-media-panel.desktop.in.in:19
......@@ -5762,7 +5762,7 @@ msgstr ""
msgid ""
"Control which applications show search results in the Activities Overview"
msgstr ""
"Controle que aplicações mostram resultados de pesquisa no Resumo de "
"Controlar que aplicações mostram resultados de pesquisa no Resumo de "
"Atividades"
#. Translators: Search terms to find the Search panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
......@@ -5927,7 +5927,7 @@ msgstr "Pastas"
#: panels/sharing/gnome-sharing-panel.desktop.in.in:4
msgid "Control what you want to share with others"
msgstr "Controle o que deseja partilhar com outros"
msgstr "Controlar o que deseja partilhar com outros"
#. Translators: Search terms to find the Sharing panel. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
#: panels/sharing/gnome-sharing-panel.desktop.in.in:16
......@@ -5961,7 +5961,7 @@ msgstr "Gotejar"
#: panels/sound/cc-alert-chooser.ui:26
msgid "Glass"
msgstr "Vidro"
msgstr "Tilintar"
#: panels/sound/cc-alert-chooser.ui:33
msgid "Sonar"
......@@ -5982,7 +5982,7 @@ msgstr "A testar %s"
#: panels/sound/cc-output-test-dialog.ui:127
msgid "Click a speaker to test"
msgstr "Clique num altifalante para testar"
msgstr "Clique num altifalante para o testar"
#: panels/sound/cc-sound-panel.ui:27
msgid "System Volume"
......@@ -6094,7 +6094,7 @@ msgstr "Funcionalidade reduzida"
#: panels/thunderbolt/cc-bolt-device-dialog.c:115
msgctxt "Thunderbolt Device Status"
msgid "Connected & Authorized"
msgstr "Ligado e autenticado"
msgstr "Ligado e Autenticado"
#: panels/thunderbolt/cc-bolt-device-dialog.c:121
#: panels/thunderbolt/cc-bolt-device-entry.c:152
......@@ -6297,7 +6297,7 @@ msgstr "Locuto_r de ecrã"
#: panels/universal-access/cc-ua-panel.ui:395
#: panels/universal-access/cc-ua-panel.ui:1261
msgid "_Sound Keys"
msgstr "Teclas de _som"
msgstr "Teclas _sonorizadas"
#: panels/universal-access/cc-ua-panel.ui:457
msgid "Hearing"
......@@ -6426,7 +6426,7 @@ msgstr "Piscar do cursor"
#: panels/universal-access/cc-ua-panel.ui:1704
msgid "Cursor blinks in text fields."
msgstr "Cursor pisca nos campos de texto"
msgstr "O piscar do cursor nos campos de texto."
#: panels/universal-access/cc-ua-panel.ui:1783
msgid "Cursor blinking speed"
......@@ -6630,7 +6630,7 @@ msgstr "Longa"
#: panels/universal-access/zoom-options.ui:48
msgid "Full Screen"
msgstr "Ecrã cheio"
msgstr "Ecrã inteiro"
#: panels/universal-access/zoom-options.ui:53
msgid "Top Half"
......@@ -6952,7 +6952,7 @@ msgstr "Histórico de ficheiro e Lixo"
#: panels/usage/gnome-usage-panel.desktop.in.in:4
msgid "Don't leave traces"
msgstr "Não deixe rastros"
msgstr "Não deixar rastros"
#. FIXME
#: panels/user-accounts/cc-add-user-dialog.c:34
......
noinst_LTLIBRARIES = libgvc.la
INTROSPECTION_SCANNER_ARGS = --warn-all
libgvc_la_CPPFLAGS = \
$(WARN_CFLAGS) \
$(GVC_CFLAGS) \
-I$(srcdir) \
-DWITH_INTROSPECTION \
-DG_LOG_DOMAIN="\"Gvc\""
libgvc_la_gir_sources = \
gvc-mixer-card.h \
gvc-mixer-card.c \
gvc-mixer-stream.h \
gvc-mixer-stream.c \
gvc-channel-map.h \
gvc-channel-map.c \
gvc-mixer-ui-device.h \
gvc-mixer-ui-device.c \
gvc-mixer-sink.h \
gvc-mixer-sink.c \
gvc-mixer-source.h \
gvc-mixer-source.c \
gvc-mixer-sink-input.h \
gvc-mixer-sink-input.c \
gvc-mixer-source-output.h \
gvc-mixer-source-output.c \
gvc-mixer-event-role.h \
gvc-mixer-event-role.c \
gvc-mixer-control.h \
gvc-mixer-control.c \
$(NULL)
libgvc_la_SOURCES = \
$(libgvc_la_gir_sources) \
gvc-mixer-card-private.h \
gvc-mixer-stream-private.h \
gvc-channel-map-private.h \
gvc-mixer-control-private.h \
gvc-pulseaudio-fake.h \
$(NULL)
libgvc_la_LIBADD = \
$(GVC_LIBS) \
$(NULL)
if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)
Gvc-1.0.gir: libgvc.la
Gvc_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
Gvc_1_0_gir_CFLAGS = $(INCLUDES) -I$(srcdir) -DWITH_INTROSPECTION
Gvc_1_0_gir_LIBS = libgvc.la
Gvc_1_0_gir_FILES = $(addprefix $(srcdir)/,$(libgvc_la_gir_sources))
INTROSPECTION_GIRS = Gvc-1.0.gir
typelibdir = $(pkglibdir)
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES = Gvc-1.0.gir $(typelib_DATA)
endif
LIBGVC_SOURCES = \
gvc-mixer-card.h \
gvc-mixer-card.c \
gvc-mixer-stream.h \
gvc-mixer-stream.c \
gvc-channel-map.h \
gvc-channel-map.c \
gvc-mixer-ui-device.h \
gvc-mixer-ui-device.c \
gvc-mixer-sink.h \
gvc-mixer-sink.c \
gvc-mixer-source.h \
gvc-mixer-source.c \
gvc-mixer-sink-input.h \
gvc-mixer-sink-input.c \
gvc-mixer-source-output.h \
gvc-mixer-source-output.c \
gvc-mixer-event-role.h \
gvc-mixer-event-role.c \
gvc-mixer-control.h \
gvc-mixer-control.c \
gvc-mixer-card-private.h \
gvc-mixer-stream-private.h \
gvc-channel-map-private.h \
gvc-mixer-control-private.h \
gvc-pulseaudio-fake.h
GVC_CFLAGS = `pkg-config --cflags gtk+-3.0 libpulse libpulse-mainloop-glib alsa`
GVC_LIBS = `pkg-config --libs gtk+-3.0 libpulse libpulse-mainloop-glib alsa`
all: test-audio-device-selection $(LIBGVC_SOURCES) tests-include/config.h
.c.o:
$(CC) -g3 -ggdb -c $(GVC_CFLAGS) -I. -Itests-include/ $< -o $@
C_SOURCES = $(filter %.c,$(LIBGVC_SOURCES))
OBJECTS=$(C_SOURCES:.c=.o)
test-audio-device-selection: $(OBJECTS) test-audio-device-selection.o
$(CC) -g3 -ggdb $(GVC_LIBS) $(OBJECTS) test-audio-device-selection.o -o $@
clean:
rm -f *.o test-audio-device-selection
......@@ -62,6 +62,7 @@ struct GvcMixerControlPrivate
pa_glib_mainloop *pa_mainloop;
pa_mainloop_api *pa_api;
pa_context *pa_context;
guint server_protocol_version;
int n_outstanding;
guint reconnect_id;
char *name;
......@@ -104,6 +105,11 @@ struct GvcMixerControlPrivate
gboolean has_headsetmic;
gboolean has_headphonemic;
gboolean headset_plugged_in;
char *headphones_name;
char *headsetmic_name;
char *headphonemic_name;
char *internalspk_name;
char *internalmic_name;
#endif /* HAVE_ALSA */
GvcMixerControlState state;
......@@ -1452,6 +1458,23 @@ set_icon_name_from_proplist (GvcMixerStream *stream,
gvc_mixer_stream_set_icon_name (stream, t);
}
static GvcMixerStreamState
translate_pa_state (pa_sink_state_t state) {
switch (state) {
case PA_SINK_RUNNING:
return GVC_STREAM_STATE_RUNNING;
case PA_SINK_IDLE:
return GVC_STREAM_STATE_IDLE;
case PA_SINK_SUSPENDED:
return GVC_STREAM_STATE_SUSPENDED;
case PA_SINK_INIT:
case PA_SINK_INVALID_STATE:
case PA_SINK_UNLINKED:
default:
return GVC_STREAM_STATE_INVALID;
}
}
/*
* Called when anything changes with a sink.
*/
......@@ -1521,6 +1544,7 @@ update_sink (GvcMixerControl *control,
gvc_mixer_stream_set_is_muted (stream, info->mute);
gvc_mixer_stream_set_can_decibel (stream, !!(info->flags & PA_SINK_DECIBEL_VOLUME));
gvc_mixer_stream_set_base_volume (stream, (guint32) info->base_volume);
gvc_mixer_stream_set_state (stream, translate_pa_state (info->state));
/* Messy I know but to set the port everytime regardless of whether it has changed will cost us a
* port change notify signal which causes the frontend to resync.
......@@ -2078,7 +2102,7 @@ create_ui_device_from_card (GvcMixerControl *control,
#ifdef HAVE_ALSA
typedef struct {
char *port_name_to_set;
int headset_card;
guint32 headset_card;
} PortStatusData;
static void
......@@ -2106,7 +2130,7 @@ sink_info_cb (pa_context *c,
{
PortStatusData *data = userdata;
pa_operation *o;
int j;
guint j;
const char *s;
if (eol != 0) {
......@@ -2142,7 +2166,7 @@ source_info_cb (pa_context *c,
{
PortStatusData *data = userdata;
pa_operation *o;
int j;
guint j;
const char *s;
if (eol != 0) {
......@@ -2155,6 +2179,19 @@ source_info_cb (pa_context *c,
s = data->port_name_to_set;
for (j = 0; j < i->n_ports; j++) {
if (g_str_equal (i->ports[j]->name, s)) {
o = pa_context_set_default_source (c,
i->name,
NULL,
NULL);
if (o == NULL) {
g_warning ("pa_context_set_default_source() failed");
return;
}
}
}
if (i->active_port && strcmp (i->active_port->name, s) == 0)
return;
......@@ -2178,6 +2215,9 @@ gvc_mixer_control_set_port_status_for_headset (GvcMixerControl *control,
pa_operation *o;
PortStatusData *data;
if (port_name == NULL)
return;
data = g_new0 (PortStatusData, 1);
data->port_name_to_set = g_strdup (port_name);
data->headset_card = id;
......@@ -2191,6 +2231,18 @@ gvc_mixer_control_set_port_status_for_headset (GvcMixerControl *control,
}
#endif /* HAVE_ALSA */
static void
free_priv_port_names (GvcMixerControl *control)
{
#ifdef HAVE_ALSA
g_clear_pointer (&control->priv->headphones_name, g_free);
g_clear_pointer (&control->priv->headsetmic_name, g_free);
g_clear_pointer (&control->priv->headphonemic_name, g_free);
g_clear_pointer (&control->priv->internalspk_name, g_free);
g_clear_pointer (&control->priv->internalmic_name, g_free);
#endif
}
void
gvc_mixer_control_set_headset_port (GvcMixerControl *control,
guint id,
......@@ -2201,17 +2253,18 @@ gvc_mixer_control_set_headset_port (GvcMixerControl *control,
#ifdef HAVE_ALSA
switch (choice) {
case GVC_HEADSET_PORT_CHOICE_HEADPHONES:
gvc_mixer_control_set_port_status_for_headset (control, id, "analog-output-headphones", TRUE);
gvc_mixer_control_set_port_status_for_headset (control, id, "analog-input-internal-mic", FALSE);
gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headphones_name, TRUE);
gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->internalmic_name, FALSE);
break;
case GVC_HEADSET_PORT_CHOICE_HEADSET:
gvc_mixer_control_set_port_status_for_headset (control, id, "analog-output-headphones", TRUE);
gvc_mixer_control_set_port_status_for_headset (control, id, "analog-input-headset-mic", FALSE);
gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headphones_name, TRUE);
gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headsetmic_name, FALSE);
break;
case GVC_HEADSET_PORT_CHOICE_MIC:
gvc_mixer_control_set_port_status_for_headset (control, id, "analog-output-speaker", TRUE);
gvc_mixer_control_set_port_status_for_headset (control, id, "analog-input-headphone-mic", FALSE);
gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->internalspk_name, TRUE);
gvc_mixer_control_set_port_status_for_headset (control, id, control->priv->headphonemic_name, FALSE);
break;
case GVC_HEADSET_PORT_CHOICE_NONE:
default:
g_assert_not_reached ();
}
......@@ -2225,12 +2278,12 @@ typedef struct {
const pa_card_port_info *headphones;
const pa_card_port_info *headsetmic;
const pa_card_port_info *headphonemic;
const pa_card_port_info *internalmic;
const pa_card_port_info *internalspk;
} headset_ports;
/*
TODO: Check if we still need this with the changed PA port names
In PulseAudio ports will show up with the following names:
In PulseAudio without ucm, ports will show up with the following names:
Headphones - analog-output-headphones
Headset mic - analog-input-headset-mic (was: analog-input-microphone-headset)
Jack in mic-in mode - analog-input-headphone-mic (was: analog-input-microphone)
......@@ -2249,10 +2302,24 @@ typedef struct {
Headset Mic Jack - indicates headset jack where hardware can distinguish
between headphones and headsets. There is no use popping up a dialog in
this case, unless we already need to do this for the mic-in mode.
From the PA_PROCOTOL_VERSION=34, The device_port structure adds 2 members
availability_group and type, with the help of these 2 members, we could
consolidate the port checking and port setting for non-ucm and with-ucm
cases.
*/
#define HEADSET_PORT_SET(dst, src) \
do { \
if (!(dst) || (dst)->priority < (src)->priority) \
dst = src; \
} while (0)
#define GET_PORT_NAME(x) (x ? g_strdup (x->name) : NULL)
static headset_ports *
get_headset_ports (const pa_card_info *c)
get_headset_ports (GvcMixerControl *control,
const pa_card_info *c)
{
headset_ports *h;
guint i;
......@@ -2261,14 +2328,55 @@ get_headset_ports (const pa_card_info *c)
for (i = 0; i < c->n_ports; i++) {
pa_card_port_info *p = c->ports[i];
if (control->priv->server_protocol_version < 34) {
if (g_str_equal (p->name, "analog-output-headphones"))
h->headphones = p;
else if (g_str_equal (p->name, "analog-input-headset-mic"))
h->headsetmic = p;
else if (g_str_equal (p->name, "analog-input-headphone-mic"))
h->headphonemic = p;
else if (g_str_equal (p->name, "analog-input-internal-mic"))
h->internalmic = p;
else if (g_str_equal (p->name, "analog-output-speaker"))
h->internalspk = p;
} else {
#if (PA_PROTOCOL_VERSION >= 34)
/* in the first loop, set only headphones */
/* the microphone ports are assigned in the second loop */
if (p->type == PA_DEVICE_PORT_TYPE_HEADPHONES) {
if (p->availability_group)
HEADSET_PORT_SET (h->headphones, p);
} else if (p->type == PA_DEVICE_PORT_TYPE_SPEAKER) {
HEADSET_PORT_SET (h->internalspk, p);
} else if (p->type == PA_DEVICE_PORT_TYPE_MIC) {
if (!p->availability_group)
HEADSET_PORT_SET (h->internalmic, p);
}
#else
g_warning_once ("libgnome-volume-control running against PulseAudio %u, "
"but compiled against older %d, report a bug to your distribution",
control->priv->server_protocol_version,
PA_PROTOCOL_VERSION);
#endif
}
}
if (strcmp (p->name, "analog-output-headphones") == 0)
h->headphones = p;
else if (strcmp (p->name, "analog-input-headset-mic") == 0)
h->headsetmic = p;
else if (strcmp(p->name, "analog-input-headphone-mic") == 0)
h->headphonemic = p;
#if (PA_PROTOCOL_VERSION >= 34)
if (h->headphones && (control->priv->server_protocol_version >= 34)) {
for (i = 0; i < c->n_ports; i++) {
pa_card_port_info *p = c->ports[i];
if (g_strcmp0(h->headphones->availability_group, p->availability_group))
continue;
if (p->direction != PA_DIRECTION_INPUT)
continue;
if (p->type == PA_DEVICE_PORT_TYPE_HEADSET)
HEADSET_PORT_SET (h->headsetmic, p);
else if (p->type == PA_DEVICE_PORT_TYPE_MIC)
HEADSET_PORT_SET (h->headphonemic, p);
}
}
#endif
return h;
}
......@@ -2334,7 +2442,7 @@ check_audio_device_selection_needed (GvcMixerControl *control,
start_dialog = FALSE;
stop_dialog = FALSE;
h = get_headset_ports (info);
h = get_headset_ports (control, info);
if (!h->headphones ||
(!h->headsetmic && !h->headphonemic)) {
......@@ -2344,7 +2452,8 @@ check_audio_device_selection_needed (GvcMixerControl *control,
if (control->priv->headset_card != (int) info->index) {
int cardindex;
gboolean hsmic, hpmic;
gboolean hsmic = TRUE;
gboolean hpmic = TRUE;
const char *s;
s = pa_proplist_gets (info->proplist, "alsa.card");
......@@ -2355,8 +2464,10 @@ check_audio_device_selection_needed (GvcMixerControl *control,
if (cardindex == 0 && strcmp(s, "0") != 0)
goto out;
if (!verify_alsa_card(cardindex, &hsmic, &hpmic))
goto out;
if (control->priv->server_protocol_version < 34) {
if (!verify_alsa_card(cardindex, &hsmic, &hpmic))
goto out;
}
control->priv->headset_card = info->index;
control->priv->has_headsetmic = hsmic && h->headsetmic;
......@@ -2367,6 +2478,12 @@ check_audio_device_selection_needed (GvcMixerControl *control,
}
control->priv->headset_plugged_in = h->headphones->available != PA_PORT_AVAILABLE_NO;
free_priv_port_names (control);
control->priv->headphones_name = GET_PORT_NAME(h->headphones);
control->priv->headsetmic_name = GET_PORT_NAME(h->headsetmic);
control->priv->headphonemic_name = GET_PORT_NAME(h->headphonemic);
control->priv->internalspk_name = GET_PORT_NAME(h->internalspk);
control->priv->internalmic_name = GET_PORT_NAME(h->internalmic);
if (!start_dialog &&
!stop_dialog)
......@@ -3249,6 +3366,7 @@ gvc_mixer_control_ready (GvcMixerControl *control)
req_update_sink_input_info (control, -1);
req_update_source_output_info (control, -1);
control->priv->server_protocol_version = pa_context_get_server_protocol_version (control->priv->pa_context);
control->priv->n_outstanding = 6;
......@@ -3331,6 +3449,7 @@ idle_reconnect (gpointer data)
if (control->priv->pa_context) {
pa_context_unref (control->priv->pa_context);
control->priv->pa_context = NULL;
control->priv->server_protocol_version = 0;
gvc_mixer_new_pa_context (control);
}
......@@ -3484,6 +3603,7 @@ gvc_mixer_control_dispose (GObject *object)
control->priv->ui_inputs = NULL;
}
free_priv_port_names (control);
G_OBJECT_CLASS (gvc_mixer_control_parent_class)->dispose (object);
}
......
This diff is collapsed.