Code cleanup
This commit is contained in:
parent
5b4123f8b5
commit
ab05c7b500
|
@ -84,6 +84,7 @@ PanelAppletDefinition applet =
|
||||||
|
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
|
#if GTK_CHECK_VERSION(2, 12, 0)
|
||||||
static Volume * _volume_new(PanelAppletHelper * helper);
|
static Volume * _volume_new(PanelAppletHelper * helper);
|
||||||
static void _volume_delete(Volume * volume);
|
static void _volume_delete(Volume * volume);
|
||||||
|
|
||||||
|
@ -96,6 +97,7 @@ static int _volume_match(Volume * volume, mixer_devinfo_t * md);
|
||||||
/* callbacks */
|
/* callbacks */
|
||||||
static void _on_value_changed(gpointer data);
|
static void _on_value_changed(gpointer data);
|
||||||
static gboolean _on_volume_timeout(gpointer data);
|
static gboolean _on_volume_timeout(gpointer data);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
@ -105,7 +107,6 @@ static Volume * _volume_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
||||||
#if GTK_CHECK_VERSION(2, 12, 0)
|
#if GTK_CHECK_VERSION(2, 12, 0)
|
||||||
Volume * volume;
|
Volume * volume;
|
||||||
GtkWidget * vbox;
|
GtkWidget * vbox;
|
||||||
gdouble value;
|
|
||||||
|
|
||||||
if((volume = _volume_new(helper)) == NULL)
|
if((volume = _volume_new(helper)) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -126,7 +127,7 @@ static Volume * _volume_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
volume->button = gtk_volume_button_new();
|
volume->button = gtk_volume_button_new();
|
||||||
g_object_set(G_OBJECT(volume->button), "size",
|
g_object_set(volume->button, "size",
|
||||||
helper->icon_size, NULL);
|
helper->icon_size, NULL);
|
||||||
g_signal_connect_swapped(volume->button, "value-changed",
|
g_signal_connect_swapped(volume->button, "value-changed",
|
||||||
G_CALLBACK(_on_value_changed), volume);
|
G_CALLBACK(_on_value_changed), volume);
|
||||||
|
@ -141,6 +142,7 @@ static Volume * _volume_init(PanelAppletHelper * helper, GtkWidget ** widget)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if GTK_CHECK_VERSION(2, 12, 0)
|
||||||
/* volume_destroy */
|
/* volume_destroy */
|
||||||
static void _volume_destroy(Volume * volume)
|
static void _volume_destroy(Volume * volume)
|
||||||
{
|
{
|
||||||
|
@ -430,3 +432,4 @@ static gboolean _on_volume_timeout(gpointer data)
|
||||||
volume->progress), value);
|
volume->progress), value);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user