From d41e63a340254481bd3c037a336dc0e00048f5ff Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 1 Dec 2020 19:26:56 -0500 Subject: [PATCH] cleanup: remove code dropped in commit 67892da099357e24b3fd3c31fa758947b1dfc47a --- xed/xed-documents-panel.c | 45 --------------------------------------- 1 file changed, 45 deletions(-) diff --git a/xed/xed-documents-panel.c b/xed/xed-documents-panel.c index e439a4f..63dacd1 100644 --- a/xed/xed-documents-panel.c +++ b/xed/xed-documents-panel.c @@ -464,51 +464,6 @@ get_current_path (XedDocumentsPanel *panel) return path; } -static void -menu_position (GtkMenu *menu, - gint *x, - gint *y, - gboolean *push_in, - XedDocumentsPanel *panel) -{ - GtkTreePath *path; - GdkRectangle rect; - gint wy; - GtkAllocation allocation; - GtkRequisition requisition; - GtkWidget *w; - - w = panel->priv->treeview; - - gtk_widget_get_allocation(w, &allocation); - - path = get_current_path (panel); - - gtk_tree_view_get_cell_area (GTK_TREE_VIEW (w), path, NULL, &rect); - - wy = rect.y; - - gdk_window_get_origin (gtk_widget_get_window (w), x, y); - - gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &requisition); - - if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL) - { - *x += allocation.x + allocation.width - requisition.width - 10; - } - else - { - *x += allocation.x + 10; - } - - wy = MAX (*y + 5, *y + wy + 5); - wy = MIN (wy, *y + allocation.height - requisition.height - 5); - - *y = wy; - - *push_in = TRUE; -} - static gboolean show_popup_menu (XedDocumentsPanel *panel, GdkEventButton *event)