screen: Fix the build
Move the on_signal callback below the functions that it is using.
This commit is contained in:
parent
a1abae0375
commit
dd9493821c
1 changed files with 27 additions and 27 deletions
|
@ -177,33 +177,6 @@ cc_screen_panel_class_finalize (CcScreenPanelClass *klass)
|
|||
{
|
||||
}
|
||||
|
||||
static void
|
||||
on_signal (GDBusProxy *proxy,
|
||||
gchar *sender_name,
|
||||
gchar *signal_name,
|
||||
GVariant *parameters,
|
||||
gpointer user_data)
|
||||
{
|
||||
CcScreenPanel *self = CC_SCREEN_PANEL (user_data);
|
||||
|
||||
if (g_strcmp0 (signal_name, "Changed") == 0)
|
||||
{
|
||||
/* changed, but ignoring */
|
||||
if (self->priv->setting_brightness)
|
||||
return;
|
||||
|
||||
/* retrieve the value again from g-s-d */
|
||||
g_dbus_proxy_call (self->priv->proxy,
|
||||
"GetPercentage",
|
||||
NULL,
|
||||
G_DBUS_CALL_FLAGS_NONE,
|
||||
200, /* we don't want to randomly move the bar */
|
||||
self->priv->cancellable,
|
||||
get_brightness_cb,
|
||||
user_data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
set_brightness_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
|
||||
{
|
||||
|
@ -284,6 +257,33 @@ get_brightness_cb (GObject *source_object, GAsyncResult *res, gpointer user_data
|
|||
g_variant_unref (result);
|
||||
}
|
||||
|
||||
static void
|
||||
on_signal (GDBusProxy *proxy,
|
||||
gchar *sender_name,
|
||||
gchar *signal_name,
|
||||
GVariant *parameters,
|
||||
gpointer user_data)
|
||||
{
|
||||
CcScreenPanel *self = CC_SCREEN_PANEL (user_data);
|
||||
|
||||
if (g_strcmp0 (signal_name, "Changed") == 0)
|
||||
{
|
||||
/* changed, but ignoring */
|
||||
if (self->priv->setting_brightness)
|
||||
return;
|
||||
|
||||
/* retrieve the value again from g-s-d */
|
||||
g_dbus_proxy_call (self->priv->proxy,
|
||||
"GetPercentage",
|
||||
NULL,
|
||||
G_DBUS_CALL_FLAGS_NONE,
|
||||
200, /* we don't want to randomly move the bar */
|
||||
self->priv->cancellable,
|
||||
get_brightness_cb,
|
||||
user_data);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
got_power_proxy_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue