[gnome-control-center] wacom: Add show help window to the list of actions



commit bae548890993dede96bf8213c86db77a5a9d3563
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Fri Sep 7 13:52:08 2012 +0200

    wacom: Add show help window to the list of actions
    
    for pad buttons, once the OSD window patch is
    merged in gnome-settings-daemon.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683567

 panels/wacom/cc-wacom-page.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/panels/wacom/cc-wacom-page.c b/panels/wacom/cc-wacom-page.c
index d2a211a..9f72fb9 100644
--- a/panels/wacom/cc-wacom-page.c
+++ b/panels/wacom/cc-wacom-page.c
@@ -117,7 +117,8 @@ static struct {
 } action_table[] = {
        { GSD_WACOM_ACTION_TYPE_NONE,           NC_("Wacom action-type", "None")                },
        { GSD_WACOM_ACTION_TYPE_CUSTOM,         NC_("Wacom action-type", "Send Keystroke")      },
-       { GSD_WACOM_ACTION_TYPE_SWITCH_MONITOR, NC_("Wacom action-type", "Switch Monitor")      }
+       { GSD_WACOM_ACTION_TYPE_SWITCH_MONITOR, NC_("Wacom action-type", "Switch Monitor")      },
+       { GSD_WACOM_ACTION_TYPE_HELP,           NC_("Wacom action-type", "Show On-Screen Help") }
 };
 
 #define WACOM_C(x) g_dpgettext2(NULL, "Wacom action-type", x)
@@ -738,6 +739,11 @@ setup_mapping_treeview (CcWacomPage *page)
 		    gsd_wacom_device_is_screen_tablet (priv->stylus))
 			continue;
 
+		/* Do not list on-screen help if libwacom do no provide a layout */
+		if (action_table[i].action_type == GSD_WACOM_ACTION_TYPE_HELP &&
+		    gsd_wacom_device_get_layout_path (priv->stylus) == NULL)
+			continue;
+
 		gtk_list_store_append (priv->action_store, &iter);
 		gtk_list_store_set (priv->action_store, &iter,
 		                    ACTION_NAME_COLUMN, WACOM_C(action_table[i].action_name),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]