|
pnmixer
Volume mixer for the system tray
|
Preferences dialog ui subsystem. More...
#include <stdlib.h>#include <string.h>#include <glib.h>#include <gtk/gtk.h>#include <gdk/gdk.h>#include <gdk/gdkx.h>#include <gdk/gdkkeysyms.h>#include "audio.h"#include "prefs.h"#include "hotkey.h"#include "hotkeys.h"#include "support-log.h"#include "support-intl.h"#include "support-ui.h"#include "ui-prefs-dialog.h"#include "ui-hotkey-dialog.h"#include "main.h"
Go to the source code of this file.
Data Structures | |
| struct | prefs_dialog |
Macros | |
| #define | PREFS_UI_FILE "prefs-dialog-gtk2.glade" |
Functions | |
| static void | get_keycode_for_label (GtkLabel *label, gint *code, GdkModifierType *mods) |
| static void | set_label_for_keycode (GtkLabel *label, gint code, GdkModifierType mods) |
| static void | fill_chan_combo (GtkComboBoxText *combo, const gchar *card_name) |
| static void | fill_card_combo (GtkComboBoxText *combo, Audio *audio) |
| void | on_vol_text_check_toggled (GtkToggleButton *button, PrefsDialog *dialog) |
| void | on_vol_meter_draw_check_toggled (GtkToggleButton *button, PrefsDialog *dialog) |
| void | on_card_combo_changed (GtkComboBoxText *box, PrefsDialog *dialog) |
| void | on_middle_click_combo_changed (GtkComboBoxText *box, PrefsDialog *dialog) |
| void | on_hotkeys_enable_check_toggled (GtkToggleButton *button, PrefsDialog *dialog) |
| gboolean | on_hotkey_event_box_button_press_event (GtkWidget *widget, GdkEventButton *event, PrefsDialog *dialog) |
| void | on_noti_enable_check_toggled (G_GNUC_UNUSED GtkToggleButton *button, G_GNUC_UNUSED PrefsDialog *dialog) |
| static void | on_prefs_dialog_response (G_GNUC_UNUSED GtkDialog *widget, gint response_id, PrefsDialog *dialog) |
| static void | on_audio_changed (Audio *audio, AudioEvent *event, gpointer data) |
| void | prefs_dialog_retrieve (PrefsDialog *dialog) |
| void | prefs_dialog_populate (PrefsDialog *dialog) |
| void | prefs_dialog_present (PrefsDialog *dialog) |
| void | prefs_dialog_destroy (PrefsDialog *dialog) |
| PrefsDialog * | prefs_dialog_create (GtkWindow *parent, Audio *audio, Hotkeys *hotkeys, PrefsDialogResponseCallback cb) |
Preferences dialog ui subsystem.
This file holds the ui-related code for the preferences window.
Definition in file ui-prefs-dialog.c.
| #define PREFS_UI_FILE "prefs-dialog-gtk2.glade" |
Definition at line 46 of file ui-prefs-dialog.c.
|
static |
Fills the GtkComboBoxText 'card_combo' with the currently available cards. The active card in the combo box is set to the currently ACTIVE card, which may be different from the SELECTED card found in preferences.
| combo | the GtkComboBoxText widget for the cards. |
| audio | an Audio instance. |
Definition at line 129 of file ui-prefs-dialog.c.
|
static |
Fills the GtkComboBoxText 'chan_combo' with the currently available channels for a given card. The active channel in the combo box is set to the SELECTED channel found in preferences for this card.
| combo | the GtkComboBoxText widget for the channels. |
| card_name | the card to use to get the channels list. |
Definition at line 89 of file ui-prefs-dialog.c.
|
static |
Definition at line 55 of file ui-prefs-dialog.c.
|
static |
Handle signals from the audio subsystem.
| audio | the Audio instance that emitted the signal. |
| event | the AudioEvent containing useful information. |
| data | user supplied data. |
Definition at line 433 of file ui-prefs-dialog.c.
| void on_card_combo_changed | ( | GtkComboBoxText * | box, |
| PrefsDialog * | dialog | ||
| ) |
Handles the 'changed' signal on the GtkComboBoxText 'card_combo'. This basically refills the channel list if the card changes.
| box | the box which received the signal. |
| dialog | user data set when the signal handler was connected. |
Definition at line 269 of file ui-prefs-dialog.c.
| gboolean on_hotkey_event_box_button_press_event | ( | GtkWidget * | widget, |
| GdkEventButton * | event, | ||
| PrefsDialog * | dialog | ||
| ) |
Handles 'button-press-event' signal on one of the GtkEventBoxes used to define a hotkey: 'hotkeys_mute/up/down_eventbox'. Runs a dialog dialog where user can define a new hotkey. User should double-click on the event box to define a new hotkey.
| widget | the object which received the signal. |
| event | the GdkEventButton which triggered this signal. |
| dialog | user data set when the signal handler was connected. |
Definition at line 320 of file ui-prefs-dialog.c.
| void on_hotkeys_enable_check_toggled | ( | GtkToggleButton * | button, |
| PrefsDialog * | dialog | ||
| ) |
Handles the 'toggled' signal on the GtkCheckButton 'hotkeys_enable_check'. Updates the preferences dialog.
| button | the button which received the signal. |
| dialog | user data set when the signal handler was connected. |
Definition at line 301 of file ui-prefs-dialog.c.
| void on_middle_click_combo_changed | ( | GtkComboBoxText * | box, |
| PrefsDialog * | dialog | ||
| ) |
Handles the 'changed' signal on the GtkComboBoxText 'middle_click_combo'. Updates the preferences dialog.
| box | the combobox which received the signal. |
| dialog | user data set when the signal handler was connected. |
Definition at line 286 of file ui-prefs-dialog.c.
| void on_noti_enable_check_toggled | ( | G_GNUC_UNUSED GtkToggleButton * | button, |
| G_GNUC_UNUSED PrefsDialog * | dialog | ||
| ) |
Handles the 'toggled' signal on the GtkCheckButton 'noti_enable_check'. Updates the preferences dialog.
| button | the button which received the signal. |
| dialog | user data set when the signal handler was connected. |
Definition at line 404 of file ui-prefs-dialog.c.
|
static |
Handles the 'response' signal from the GtkDialog. Just invoke the user callback.
| widget | the GtkDialog which emitted the signal |
| response_id | the id of the response |
| dialog | user data set when the signal handler was connected. |
Definition at line 419 of file ui-prefs-dialog.c.
| void on_vol_meter_draw_check_toggled | ( | GtkToggleButton * | button, |
| PrefsDialog * | dialog | ||
| ) |
Handles the 'toggled' signal on the GtkCheckButton 'vol_meter_draw_check'. Updates the preferences dialog.
| button | the button which received the signal. |
| dialog | user data set when the signal handler was connected. |
Definition at line 252 of file ui-prefs-dialog.c.
| void on_vol_text_check_toggled | ( | GtkToggleButton * | button, |
| PrefsDialog * | dialog | ||
| ) |
Handles the 'toggled' signal on the GtkCheckButton 'vol_text_check'. Updates the preferences dialog.
| button | the button which received the signal. |
| dialog | user data set when the signal handler was connected. |
Definition at line 237 of file ui-prefs-dialog.c.
| PrefsDialog* prefs_dialog_create | ( | GtkWindow * | parent, |
| Audio * | audio, | ||
| Hotkeys * | hotkeys, | ||
| PrefsDialogResponseCallback | cb | ||
| ) |
Creates the preferences dialog.
| parent | a GtkWindow to be used as the parent. |
| audio | pointer to this audio subsystem. |
| hotkeys | pointer to this hotkey subsystem. |
| cb | user callback to handle responses from the dialog |
Definition at line 840 of file ui-prefs-dialog.c.
| void prefs_dialog_destroy | ( | PrefsDialog * | dialog | ) |
Destroys the preferences dialog, freeing any resources.
| dialog | a PrefsDialog instance. |
Definition at line 814 of file ui-prefs-dialog.c.
| void prefs_dialog_populate | ( | PrefsDialog * | dialog | ) |
Set the preferences dialog values according to current preferences.
| dialog | struct holding the GtkWidgets of the preferences dialog. |
Definition at line 617 of file ui-prefs-dialog.c.
| void prefs_dialog_present | ( | PrefsDialog * | dialog | ) |
Presents the preferences dialog.
| dialog | a PrefsDialog instance. |
Definition at line 800 of file ui-prefs-dialog.c.
| void prefs_dialog_retrieve | ( | PrefsDialog * | dialog | ) |
Retrieve the preferences dialog values and assign then to preferences.
| dialog | struct holding the GtkWidgets of the preferences dialog. |
Definition at line 456 of file ui-prefs-dialog.c.
|
static |
Definition at line 67 of file ui-prefs-dialog.c.
1.8.14