diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-08-04 17:25:19 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-08-04 17:25:19 +0100 |
commit | c1ee13d61894607f7e916d1041c1db0b2c99c93a (patch) | |
tree | 8e230777968b1a78e2dab39649f6604fe2d239f3 /src/device-menu-mgr.c | |
parent | 5ba9266a7798e03013af14d4e5003725151e665e (diff) | |
download | ayatana-indicator-session-c1ee13d61894607f7e916d1041c1db0b2c99c93a.tar.gz ayatana-indicator-session-c1ee13d61894607f7e916d1041c1db0b2c99c93a.tar.bz2 ayatana-indicator-session-c1ee13d61894607f7e916d1041c1db0b2c99c93a.zip |
trace around this seg fault
Diffstat (limited to 'src/device-menu-mgr.c')
-rw-r--r-- | src/device-menu-mgr.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c index 1be113c..9706598 100644 --- a/src/device-menu-mgr.c +++ b/src/device-menu-mgr.c @@ -81,8 +81,11 @@ static void machine_sleep_with_context (DeviceMenuMgr* self, gchar* type); static void show_system_settings_with_context (DbusmenuMenuitem * mi, guint timestamp, - gchar * type); - + gchar * type); + +static void show_simple_scan (DbusmenuMenuitem * mi, + guint timestamp, + gchar * type); static void machine_sleep_from_hibernate (DbusmenuMenuitem * mi, guint timestamp, @@ -460,6 +463,18 @@ show_system_settings_with_context (DbusmenuMenuitem * mi, g_free(control_centre_command); } +static void show_simple_scan (DbusmenuMenuitem * mi, + guint timestamp, + gchar * type) +{ + GError * error = NULL; + if (!g_spawn_command_line_async("simple-scan", &error)) + { + g_warning("Unable to launch simple-scan: %s", error->message); + g_error_free(error); + } +} + static void device_menu_mgr_build_static_items (DeviceMenuMgr* self) { @@ -550,14 +565,14 @@ device_menu_mgr_build_static_items (DeviceMenuMgr* self) _("Scanners")); g_signal_connect (G_OBJECT(scanners_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, - G_CALLBACK(show_system_settings_with_context), - "scanners"); + G_CALLBACK(show_simple_scan), + NULL); dbusmenu_menuitem_child_add_position (self->root_item, scanners_menuitem, 8); dbusmenu_menuitem_property_set_bool (scanners_menuitem, DBUSMENU_MENUITEM_PROP_VISIBLE, - FALSE); + TRUE); webcam_menuitem = dbusmenu_menuitem_new(); dbusmenu_menuitem_property_set (webcam_menuitem, |