Beispiel #1
0
static void
resizable_cb (MxToggle     *toggle,
              GParamSpec   *pspec,
              ClutterStage *stage)
{
    clutter_stage_set_user_resizable (stage, mx_toggle_get_active (toggle));
}
Beispiel #2
0
static void
toolbar_cb (MxToggle   *toggle,
            GParamSpec *pspec,
            MxWindow   *window)
{
    mx_window_set_has_toolbar (window, mx_toggle_get_active (toggle));
}
Beispiel #3
0
static void
fullscreen_cb (MxToggle     *toggle,
               GParamSpec   *pspec,
               ClutterStage *stage)
{
    clutter_stage_set_fullscreen (stage, mx_toggle_get_active (toggle));
}
Beispiel #4
0
static void
small_screen_cb (MxToggle   *toggle,
                 GParamSpec *pspec,
                 MxWindow   *window)
{
    mx_window_set_small_screen (window, mx_toggle_get_active (toggle));
}
Beispiel #5
0
static void
notify_overshoot_cb (MxToggle            *toggle,
                     GParamSpec          *pspec,
                     MxKineticScrollView *view)
{
  gboolean on = mx_toggle_get_active (toggle);
  mx_kinetic_scroll_view_set_overshoot (view, on ? 0.2 : 0.0);
}
Beispiel #6
0
static void
notify_elastic_cb (MxToggle     *toggle,
                   GParamSpec   *pspec,
                   MxScrollable *view)
{
  MxAdjustment *hadjust, *vadjust;
  gboolean on = mx_toggle_get_active (toggle);

  mx_scrollable_get_adjustments (view, &hadjust, &vadjust);
  mx_adjustment_set_elastic (hadjust, on);
  mx_adjustment_set_elastic (vadjust, on);
}
Beispiel #7
0
static void
_toggle_active_cb (MxToggle      *toggle,
                   GParamSpec    *pspec,
                   DawatiBtShell *shell)
{
  DawatiBtShellPrivate *priv = GET_PRIVATE (shell);
  gboolean active;

  active = mx_toggle_get_active (MX_TOGGLE (toggle));

  if (!priv->available ||
      (active && priv->enabled) ||
      (!active && !priv->enabled)) {
    return;
  }

  carrick_connman_manager_set_technology_state (priv->cm, "bluetooth", active);
}
Beispiel #8
0
static void
icon_cb (MxToggle   *toggle,
         GParamSpec *pspec,
         MxWindow   *window)
{
    gboolean use_custom = mx_toggle_get_active (toggle);

    if (use_custom)
    {
        CoglHandle texture = cogl_texture_new_from_file ("redhand.png",
                             COGL_TEXTURE_NONE,
                             COGL_PIXEL_FORMAT_ANY,
                             NULL);
        if (texture)
            mx_window_set_icon_from_cogl_texture (window, texture);
        cogl_handle_unref (texture);
    }
    else
        mx_window_set_icon_name (window, "window-new");
}
static void
on_switch_toggled (MxToggle    *toggle,
                   GParamSpec  *property,
                   ToggledData *data)
{
  MpdComputerTilePrivate *priv = data->tile->priv;
  gboolean active;

  active = mx_toggle_get_active (toggle);

  if (data->row == OFFLINE_MODE)
    {
      carrick_connman_manager_set_offline_mode (priv->cm, active);
    }
  else
    {
      carrick_connman_manager_set_technology_state (
          priv->cm,
          radio_tech_to_connman_tech (data->row),
          active);
    }
}