summaryrefslogtreecommitdiff
path: root/panels/wacom/cc-wacom-page.c
diff options
context:
space:
mode:
Diffstat (limited to 'panels/wacom/cc-wacom-page.c')
-rw-r--r--panels/wacom/cc-wacom-page.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/panels/wacom/cc-wacom-page.c b/panels/wacom/cc-wacom-page.c
index 2f7fc422a..812d673d3 100644
--- a/panels/wacom/cc-wacom-page.c
+++ b/panels/wacom/cc-wacom-page.c
@@ -61,7 +61,7 @@ enum {
struct _CcWacomPagePrivate
{
CcWacomPanel *panel;
- GsdWacomDevice *stylus, *eraser, *pad;
+ GsdWacomDevice *stylus, *pad;
GtkBuilder *builder;
GtkWidget *nav;
GtkWidget *notebook;
@@ -826,7 +826,7 @@ add_styli (CcWacomPage *page)
styli = gsd_wacom_device_list_styli (priv->stylus);
for (l = styli; l; l = l->next) {
- GsdWacomStylus *stylus, *eraser;
+ GsdWacomStylus *stylus;
GtkWidget *page;
stylus = l->data;
@@ -834,15 +834,7 @@ add_styli (CcWacomPage *page)
if (gsd_wacom_stylus_get_stylus_type (stylus) == WACOM_STYLUS_TYPE_PUCK)
continue;
- if (gsd_wacom_stylus_get_has_eraser (stylus)) {
- GsdWacomDeviceType type;
- type = gsd_wacom_stylus_get_stylus_type (stylus);
- eraser = gsd_wacom_device_get_stylus_for_type (priv->eraser, type);
- } else {
- eraser = NULL;
- }
-
- page = cc_wacom_stylus_page_new (stylus, eraser);
+ page = cc_wacom_stylus_page_new (stylus);
cc_wacom_stylus_page_set_navigation (CC_WACOM_STYLUS_PAGE (page), GTK_NOTEBOOK (priv->notebook));
gtk_widget_show (page);
gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), page, NULL);
@@ -964,7 +956,6 @@ update_tablet_ui (CcWacomPage *page,
gboolean
cc_wacom_page_update_tools (CcWacomPage *page,
GsdWacomDevice *stylus,
- GsdWacomDevice *eraser,
GsdWacomDevice *pad)
{
CcWacomPagePrivate *priv;
@@ -975,12 +966,11 @@ cc_wacom_page_update_tools (CcWacomPage *page,
layout = get_layout_type (stylus);
priv = page->priv;
- changed = (priv->stylus != stylus || priv->eraser != eraser || priv->pad != pad);
+ changed = (priv->stylus != stylus || priv->pad != pad);
if (!changed)
return FALSE;
priv->stylus = stylus;
- priv->eraser = eraser;
priv->pad = pad;
update_tablet_ui (CC_WACOM_PAGE (page), layout);
@@ -991,7 +981,6 @@ cc_wacom_page_update_tools (CcWacomPage *page,
GtkWidget *
cc_wacom_page_new (CcWacomPanel *panel,
GsdWacomDevice *stylus,
- GsdWacomDevice *eraser,
GsdWacomDevice *pad)
{
CcWacomPage *page;
@@ -1000,9 +989,6 @@ cc_wacom_page_new (CcWacomPanel *panel,
g_return_val_if_fail (GSD_IS_WACOM_DEVICE (stylus), NULL);
g_return_val_if_fail (gsd_wacom_device_get_device_type (stylus) == WACOM_TYPE_STYLUS, NULL);
- g_return_val_if_fail (GSD_IS_WACOM_DEVICE (eraser), NULL);
- g_return_val_if_fail (gsd_wacom_device_get_device_type (eraser) == WACOM_TYPE_ERASER, NULL);
-
if (pad != NULL)
g_return_val_if_fail (gsd_wacom_device_get_device_type (pad) == WACOM_TYPE_PAD, NULL);
@@ -1011,7 +997,7 @@ cc_wacom_page_new (CcWacomPanel *panel,
priv = page->priv;
priv->panel = panel;
- cc_wacom_page_update_tools (page, stylus, eraser, pad);
+ cc_wacom_page_update_tools (page, stylus, pad);
/* FIXME move this to construct */
priv->wacom_settings = gsd_wacom_device_get_settings (stylus);