From 25357424dece90e2f9fb6fced65fa953d73a9b86 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 16 May 2007 17:06:18 +0000 Subject: [PATCH] mis-merge.. thank you mikachan --- openbox/menuframe.c | 60 --------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/openbox/menuframe.c b/openbox/menuframe.c index 9474ca39..68ea4949 100644 --- a/openbox/menuframe.c +++ b/openbox/menuframe.c @@ -886,66 +886,6 @@ static void menu_frame_update(ObMenuFrame *self) } menu_frame_render(self); - - /* make the menu fit on the screen. at most we call render twice, at least - not like n times or sometime */ - - a = screen_physical_area_monitor(self->monitor); - h = self->area.height; - - if (h > a->height) { - GList *flast, *tmp; - gboolean last_entry = TRUE; - - /* take the height of our More... entry into account */ - h += menu_entry_frame_get_height(NULL, FALSE, TRUE); - - /* start at the end of the entries */ - flast = g_list_last(self->entries); - - /* pull out all the entries from the frame that don't - fit on the screen, leaving at least 1 though */ - while (h > a->height && g_list_previous(flast) != NULL) { - /* update the height, without this entry */ - h -= menu_entry_frame_get_height(flast->data, FALSE, last_entry); - - /* destroy the entry we're not displaying */ - tmp = flast; - flast = g_list_previous(flast); - menu_entry_frame_free(tmp->data); - self->entries = g_list_delete_link(self->entries, tmp); - - menu_frame_render(self); - - /* only the first one that we see is the last entry in the menu */ - last_entry = FALSE; - }; - - { - ObMenuEntry *more_entry; - ObMenuEntryFrame *more_frame; - /* make the More... menu entry frame which will display in this - frame. - if self->menu->more_menu is NULL that means that this is already - More... menu, so just use ourself. - */ - more_entry = menu_get_more((self->menu->more_menu ? - self->menu->more_menu : - self->menu), - /* continue where we left off */ - self->show_from + - g_list_length(self->entries)); - more_frame = menu_entry_frame_new(more_entry, self); - /* make it get deleted when the menu frame goes away */ - menu_entry_unref(more_entry); - - /* add our More... entry to the frame */ - self->entries = g_list_append(self->entries, more_frame); - } - - /* render again */ - menu_frame_render(self); - } } static gboolean menu_frame_is_visible(ObMenuFrame *self) -- 2.34.1