[epiphany] ephy-gui: remove unused method



commit df47810713fc8d292fce7ed2aacbc14bd221a378
Author: Xan Lopez <xan igalia com>
Date:   Sat Dec 31 18:13:43 2011 +0100

    ephy-gui: remove unused method

 lib/ephy-gui.c |   83 --------------------------------------------------------
 lib/ephy-gui.h |    6 ----
 2 files changed, 0 insertions(+), 89 deletions(-)
---
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c
index aa3a18b..b21e872 100644
--- a/lib/ephy-gui.c
+++ b/lib/ephy-gui.c
@@ -168,89 +168,6 @@ ephy_gui_menu_position_under_widget (GtkMenu   *menu,
 	*push_in = FALSE;
 }
 
-/**
- * ephy_gui_menu_position_under_widget:
- * @menu:
- * @x:
- * @y:
- * @push_in:
- * @user_data: a #GtkWidget which has to be contained in (a widget on) a #GtkToolbar
- * 
- * Positions @menu under (or over, depending on space available) the
- * @user_data.
- */
-void
-ephy_gui_menu_position_on_toolbar (GtkMenu   *menu,
-				   gint      *x,
-				   gint      *y,
-				   gboolean  *push_in,
-				   gpointer   user_data)
-{
-	/* Adapted from gtktoolbar.c */
-	GtkWidget *widget = GTK_WIDGET (user_data);
-	GtkToolbar *toolbar;
-	GtkRequisition req;
-	GtkRequisition menu_req;
-	GtkAllocation allocation;
-	GdkWindow *window;
-	GdkRectangle monitor;
-	int monitor_num;
-	GdkScreen *screen;
-  
-	g_return_if_fail (GTK_IS_WIDGET (widget));
-
-	toolbar = GTK_TOOLBAR (gtk_widget_get_ancestor (widget, GTK_TYPE_TOOLBAR));
-	g_return_if_fail (toolbar != NULL);
-
-	gtk_widget_get_preferred_size (widget, &req, NULL);
-	gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
-
-	screen = gtk_widget_get_screen (GTK_WIDGET (menu));
-	window = gtk_widget_get_window (widget);
-	monitor_num = gdk_screen_get_monitor_at_window (screen, window);
-	if (monitor_num < 0)
-		monitor_num = 0;
-	gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
-
-	gtk_widget_get_allocation (widget, &allocation);
-	gdk_window_get_origin (window, x, y);
-	if (!gtk_widget_get_has_window (widget))
-	{
-		*x += allocation.x;
-		*y += allocation.y;
-	}
-
-	if (gtk_orientable_get_orientation (GTK_ORIENTABLE (toolbar)) == GTK_ORIENTATION_HORIZONTAL)
-	{
-		if (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_LTR) 
-			*x += allocation.width - req.width;
-		else 
-			*x += req.width - menu_req.width;
-
-		if ((*y + allocation.height + menu_req.height) <= monitor.y + monitor.height)
-			*y += allocation.height;
-		else if ((*y - menu_req.height) >= monitor.y)
-			*y -= menu_req.height;
-		else if (monitor.y + monitor.height - (*y + allocation.height) > *y)
-			*y += allocation.height;
-		else
-			*y -= menu_req.height;
-	}
-	else 
-	{
-		if (gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_LTR) 
-			*x += allocation.width;
-		else 
-			*x -= menu_req.width;
-
-		if (*y + menu_req.height > monitor.y + monitor.height &&
-		    *y + allocation.height - monitor.y > monitor.y + monitor.height - *y)
-			*y += allocation.height - menu_req.height;
-	}
-
-	*push_in = FALSE;
-}
-
 GtkWindowGroup *
 ephy_gui_ensure_window_group (GtkWindow *window)
 {
diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h
index 3c8aa8f..505a7c5 100644
--- a/lib/ephy-gui.h
+++ b/lib/ephy-gui.h
@@ -47,12 +47,6 @@ void		ephy_gui_menu_position_under_widget	 (GtkMenu   *menu,
 							  gboolean  *push_in,
 							  gpointer  user_data);
 
-void		ephy_gui_menu_position_on_toolbar	 (GtkMenu   *menu,
-							  gint      *x,
-							  gint      *y,
-							  gboolean  *push_in,
-							  gpointer  user_data);
-
 GtkWindowGroup *ephy_gui_ensure_window_group		 (GtkWindow *window);
 
 void		ephy_gui_get_current_event		 (GdkEventType *type,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]