コード例 #1
0
static gboolean
show_touchpad_enabling_switch (CcMousePropertiesPrivate *d)
{
	if (!d->have_touchpad)
		return FALSE;

	/* Lets show the button when the mouse/touchscreen is present */
	if (d->have_mouse || d->have_touchscreen)
		return TRUE;

	/* Lets also show when touch pad is disabled. */
	if (!get_touchpad_enabled (d->touchpad_settings))
		return TRUE;

	return FALSE;
}
コード例 #2
0
static gboolean
show_touchpad_enabling_switch (CcMousePropertiesPrivate *d)
{
	if (!d->have_touchpad)
		return FALSE;

	g_debug ("Should we show the touchpad disable switch: have_mouse: %s have_touchscreen: %s\n",
		 d->have_mouse ? "true" : "false",
		 d->have_touchscreen ? "true" : "false");

	/* Let's show the button when a mouse or touchscreen is present */
	if (d->have_mouse || d->have_touchscreen)
		return TRUE;

	/* Let's also show when the touchpad is disabled. */
	if (!get_touchpad_enabled (d->touchpad_settings))
		return TRUE;

	return FALSE;
}