aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-03 18:01:32 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-03 18:01:32 +0100
commit85e9bcfb399e489eaa6fbf467f940baa69239bf2 (patch)
treed229180cf49eb362f808af7d04804b0d7f9f4d00 /src
parent88d74cf2b768eda753cd2bc85013203be6d9ca3b (diff)
downloadayatana-indicator-session-85e9bcfb399e489eaa6fbf467f940baa69239bf2.tar.gz
ayatana-indicator-session-85e9bcfb399e489eaa6fbf467f940baa69239bf2.tar.bz2
ayatana-indicator-session-85e9bcfb399e489eaa6fbf467f940baa69239bf2.zip
refactor of the udev mgr - working nicely
Diffstat (limited to 'src')
-rw-r--r--src/device-menu-mgr.c6
-rw-r--r--src/sane-rules.h5
-rw-r--r--src/udev-mgr.c4
3 files changed, 10 insertions, 5 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index 2c559ee..1be113c 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -547,7 +547,7 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self)
scanners_menuitem = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (scanners_menuitem,
DBUSMENU_MENUITEM_PROP_LABEL,
- _("HP Scanners"));
+ _("Scanners"));
g_signal_connect (G_OBJECT(scanners_menuitem),
DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
G_CALLBACK(show_system_settings_with_context),
@@ -562,11 +562,11 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self)
webcam_menuitem = dbusmenu_menuitem_new();
dbusmenu_menuitem_property_set (webcam_menuitem,
DBUSMENU_MENUITEM_PROP_LABEL,
- _("HP Webcam"));
+ _("Webcam"));
g_signal_connect (G_OBJECT(webcam_menuitem),
DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
G_CALLBACK(show_system_settings_with_context),
- "HP Webcam");
+ "Webcam");
dbusmenu_menuitem_child_add_position (self->root_item,
webcam_menuitem,
10);
diff --git a/src/sane-rules.h b/src/sane-rules.h
index 4c36698..871565b 100644
--- a/src/sane-rules.h
+++ b/src/sane-rules.h
@@ -2,6 +2,7 @@
void populate_usb_scanners (GHashTable* scanners)
{
GList* hp = NULL;
+
hp = g_list_append (hp, g_strdup ("0101"));
hp = g_list_append (hp, g_strdup ("0105"));
hp = g_list_append (hp, g_strdup ("0201"));
@@ -308,6 +309,10 @@ void populate_usb_scanners (GHashTable* scanners)
g_list_copy(nikon));
GList* epson = NULL;
+
+ // for testing (its a printer not a scanner!)
+ //epson = g_list_append (epson, g_strdup ("0001"));
+
epson = g_list_append (epson, g_strdup("0101"));
epson = g_list_append (epson, g_strdup("0103"));
epson = g_list_append (epson, g_strdup("0104"));
diff --git a/src/udev-mgr.c b/src/udev-mgr.c
index 5c650b6..6ddd97d 100644
--- a/src/udev-mgr.c
+++ b/src/udev-mgr.c
@@ -203,8 +203,7 @@ udev_mgr_handle_webcam (UdevMgr* self,
}
g_hash_table_insert (self->webcams_present,
g_strdup (product),
- g_strdup (vendor));
-
+ g_strdup (vendor));
}
udev_mgr_update_menuitems (self);
}
@@ -267,6 +266,7 @@ udev_mgr_check_if_usb_device_is_supported (UdevMgr* self,
UdevMgrDeviceAction action)
{
const gchar* vendor = NULL;
+ debug_device (self, device, action);
vendor = g_udev_device_get_property (device, "ID_VENDOR_ID");