|
pnmixer
Volume mixer for the system tray
|
Preferences subsystem. More...
#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <stdlib.h>#include <strings.h>#include <string.h>#include <stdio.h>#include <errno.h>#include <glib.h>#include <glib/gstdio.h>#include "prefs.h"#include "support-log.h"#include "support-intl.h"#include "main.h"
Go to the source code of this file.
Macros | |
| #define | DEFAULT_PREFS "[PNMixer]\n\SliderOrientation=vertical\n\DisplayTextVolume=true\n\TextVolumePosition=0\n\ScrollStep=5\n\FineScrollStep=1\n\MiddleClickAction=0\n\CustomCommand=\n\VolMuteKey=-1\n\VolUpKey=-1\n\VolDownKey=-1\n\AlsaCard=(default)\n\NormalizeVolume=true\n\SystemTheme=false" |
Functions | |
| static const gchar * | find_vol_control_command (void) |
| gboolean | prefs_get_boolean (const gchar *key, gboolean def) |
| gint | prefs_get_integer (const gchar *key, gint def) |
| gdouble | prefs_get_double (const gchar *key, gdouble def) |
| gchar * | prefs_get_string (const gchar *key, const gchar *def) |
| gdouble * | prefs_get_double_list (const gchar *key, gsize *n) |
| gchar * | prefs_get_channel (const gchar *card) |
| void | prefs_set_boolean (const gchar *key, gboolean value) |
| void | prefs_set_integer (const gchar *key, gint value) |
| void | prefs_set_double (const gchar *key, gdouble value) |
| void | prefs_set_string (const gchar *key, const gchar *value) |
| void | prefs_set_double_list (const gchar *key, gdouble *list, gsize n) |
| void | prefs_set_channel (const gchar *card, const gchar *channel) |
| void | prefs_load (void) |
| void | prefs_save (void) |
| void | prefs_ensure_save_dir (void) |
Variables | |
| static GKeyFile * | keyFile |
| static const gchar * | vol_control_commands [] |
Preferences subsystem.
This file holds the preferences subsystem, managing the user config file.
Definition in file prefs.c.
| #define DEFAULT_PREFS "[PNMixer]\n\SliderOrientation=vertical\n\DisplayTextVolume=true\n\TextVolumePosition=0\n\ScrollStep=5\n\FineScrollStep=1\n\MiddleClickAction=0\n\CustomCommand=\n\VolMuteKey=-1\n\VolUpKey=-1\n\VolDownKey=-1\n\AlsaCard=(default)\n\NormalizeVolume=true\n\SystemTheme=false" |
| void prefs_ensure_save_dir | ( | void | ) |
Checks if the preferences dir for saving is present and accessible. Creates it if doesn't exist. Reports errors via run_error_dialog().
| gboolean prefs_get_boolean | ( | const gchar * | key, |
| gboolean | def | ||
| ) |
| gchar* prefs_get_channel | ( | const gchar * | card | ) |
Gets the currently selected channel of the specified Alsa Card from the global keyFile and returns the result.
| card | the Alsa Card to get the currently selected channel of |
| gdouble prefs_get_double | ( | const gchar * | key, |
| gdouble | def | ||
| ) |
| gdouble* prefs_get_double_list | ( | const gchar * | key, |
| gsize * | n | ||
| ) |
| gint prefs_get_integer | ( | const gchar * | key, |
| gint | def | ||
| ) |
| gchar* prefs_get_string | ( | const gchar * | key, |
| const gchar * | def | ||
| ) |
| void prefs_load | ( | void | ) |
| void prefs_save | ( | void | ) |
| void prefs_set_boolean | ( | const gchar * | key, |
| gboolean | value | ||
| ) |
| void prefs_set_channel | ( | const gchar * | card, |
| const gchar * | channel | ||
| ) |
| void prefs_set_double | ( | const gchar * | key, |
| gdouble | value | ||
| ) |
| void prefs_set_double_list | ( | const gchar * | key, |
| gdouble * | list, | ||
| gsize | n | ||
| ) |
| void prefs_set_integer | ( | const gchar * | key, |
| gint | value | ||
| ) |
| void prefs_set_string | ( | const gchar * | key, |
| const gchar * | value | ||
| ) |
1.8.14