[gtranslator] Make dictionary plugin build with GSEAL



commit c6519351b7e12e49e3086ed1b54c905137c43b29
Author: Jonh Wendell <jwendell gnome org>
Date:   Sat Aug 14 12:14:52 2010 -0300

    Make dictionary plugin build with GSEAL

 plugins/dictionary/gtr-gdict-sidebar.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/plugins/dictionary/gtr-gdict-sidebar.c b/plugins/dictionary/gtr-gdict-sidebar.c
index bfe7a40..15ff469 100644
--- a/plugins/dictionary/gtr-gdict-sidebar.c
+++ b/plugins/dictionary/gtr-gdict-sidebar.c
@@ -143,15 +143,17 @@ gdict_sidebar_menu_position_function (GtkMenu * menu,
                                       gboolean * push_in, gpointer user_data)
 {
   GtkWidget *widget;
+  GtkAllocation allocation;
 
   g_assert (GTK_IS_BUTTON (user_data));
 
   widget = GTK_WIDGET (user_data);
 
-  gdk_window_get_origin (widget->window, x, y);
+  gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
+  gtk_widget_get_allocation (widget, &allocation);
 
-  *x += widget->allocation.x;
-  *y += widget->allocation.y + widget->allocation.height;
+  *x += allocation.x;
+  *y += allocation.y + allocation.height;
 
   *push_in = FALSE;
 }
@@ -166,9 +168,11 @@ gdict_sidebar_select_button_press_cb (GtkWidget * widget,
   if (event->button == 1)
     {
       GtkRequisition req;
+      GtkAllocation allocation;
       gint width;
 
-      width = widget->allocation.width;
+      gtk_widget_get_allocation (widget, &allocation);
+      width = allocation.width;
       gtk_widget_set_size_request (sidebar->priv->menu, -1, -1);
       gtk_widget_size_request (sidebar->priv->menu, &req);
       gtk_widget_set_size_request (sidebar->priv->menu,



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