Index: main-menu/src/main-menu-ui.c =================================================================== --- main-menu/src/main-menu-ui.c (revision 371) +++ main-menu/src/main-menu-ui.c (working copy) @@ -106,7 +106,7 @@ TileTable *sys_table; - GtkWidget *more_buttons [3]; + GtkWidget *more_buttons [4]; GtkWidget *more_sections [3]; gint max_total_items; @@ -237,7 +237,8 @@ enum { APPS_PAGE, DOCS_PAGE, - DIRS_PAGE + DIRS_PAGE, + CLEAR_DOCS }; enum { @@ -365,6 +366,7 @@ priv->more_buttons [APPS_PAGE] = NULL; priv->more_buttons [DOCS_PAGE] = NULL; priv->more_buttons [DIRS_PAGE] = NULL; + priv->more_buttons [CLEAR_DOCS] = NULL; priv->more_sections [APPS_PAGE] = NULL; priv->more_sections [DOCS_PAGE] = NULL; priv->more_sections [DIRS_PAGE] = NULL; @@ -818,8 +820,9 @@ priv->more_buttons [0] = glade_xml_get_widget (priv->main_menu_xml, "more-applications-button"); priv->more_buttons [1] = glade_xml_get_widget (priv->main_menu_xml, "more-documents-button"); priv->more_buttons [2] = glade_xml_get_widget (priv->main_menu_xml, "more-places-button"); + priv->more_buttons [3] = glade_xml_get_widget (priv->main_menu_xml, "clear-documents-button"); - for (i = 0; i < 3; ++i) { + for (i = 0; i < 4; ++i) { g_object_set_data ( G_OBJECT (priv->more_buttons [i]), "double-click-detector", double_click_detector_new ()); @@ -2084,6 +2087,11 @@ current_time_millis = 1000 * current_time.tv_sec + current_time.tv_usec / 1000; if (! double_click_detector_is_double_click (detector, current_time_millis, TRUE)) { + if (GTK_WIDGET (button) == priv->more_buttons [CLEAR_DOCS]) { +// call delete recently used function here + return; + } if (GTK_WIDGET (button) == priv->more_buttons [APPS_PAGE]) ditem_id = libslab_get_gconf_value (APP_BROWSER_GCONF_KEY); else if (GTK_WIDGET (button) == priv->more_buttons [DOCS_PAGE]) {