GtkTreeIter *iter)
{
gchar *title;
- gint index;
+ gint index_;
gtk_tree_model_get (sidebar->priv->page_model, iter,
PAGE_COLUMN_TITLE, &title,
- PAGE_COLUMN_NOTEBOOK_INDEX, &index,
+ PAGE_COLUMN_NOTEBOOK_INDEX, &index_,
-1);
- gtk_notebook_set_current_page (GTK_NOTEBOOK (sidebar->priv->notebook), index);
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (sidebar->priv->notebook),
+ index_);
gtk_label_set_text (GTK_LABEL (sidebar->priv->label), title);
g_free (title);
gpointer user_data)
{
GtkWidget *widget;
+ GtkAllocation allocation;
g_return_if_fail (GTK_IS_BUTTON (user_data));
- g_return_if_fail (GTK_WIDGET_NO_WINDOW (user_data));
+ g_return_if_fail (gtk_widget_get_has_window (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);
- *x += widget->allocation.x;
- *y += widget->allocation.y + widget->allocation.height;
+ gtk_widget_get_allocation (widget, &allocation);
+ *x += allocation.x;
+ *y += allocation.y + allocation.height;
*push_in = FALSE;
}
{
GtkRequisition requisition;
gint width;
+ GtkAllocation allocation;
- 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, &requisition);
GtkTreeIter iter;
GtkWidget *menu_item;
gchar *label_title;
- gint index;
+ gint index_;
g_return_if_fail (EMPATHY_IS_SIDEBAR (sidebar));
g_return_if_fail (GTK_IS_WIDGET (main_widget));
- index = gtk_notebook_append_page (GTK_NOTEBOOK (sidebar->priv->notebook),
+ index_ = gtk_notebook_append_page (GTK_NOTEBOOK (sidebar->priv->notebook),
main_widget, NULL);
menu_item = gtk_image_menu_item_new_with_label (title);
PAGE_COLUMN_TITLE, title,
PAGE_COLUMN_MENU_ITEM, menu_item,
PAGE_COLUMN_MAIN_WIDGET, main_widget,
- PAGE_COLUMN_NOTEBOOK_INDEX, index,
+ PAGE_COLUMN_NOTEBOOK_INDEX, index_,
-1);
gtk_list_store_move_before (GTK_LIST_STORE(sidebar->priv->page_model),
gtk_tree_model_get (sidebar->priv->page_model,
&iter,
PAGE_COLUMN_TITLE, &label_title,
- PAGE_COLUMN_NOTEBOOK_INDEX, &index,
+ PAGE_COLUMN_NOTEBOOK_INDEX, &index_,
-1);
- gtk_menu_set_active (GTK_MENU (sidebar->priv->menu), index);
+ gtk_menu_set_active (GTK_MENU (sidebar->priv->menu), index_);
gtk_label_set_text (GTK_LABEL (sidebar->priv->label), label_title);
gtk_notebook_set_current_page (GTK_NOTEBOOK (sidebar->priv->notebook),
- index);
+ index_);
g_free (label_title);
GtkTreeIter iter;
GtkWidget *widget, *menu_item;
gboolean valid;
- gint index;
+ gint index_;
g_return_if_fail (EMPATHY_IS_SIDEBAR (sidebar));
g_return_if_fail (GTK_IS_WIDGET (main_widget));
while (valid)
{
gtk_tree_model_get (sidebar->priv->page_model, &iter,
- PAGE_COLUMN_NOTEBOOK_INDEX, &index,
+ PAGE_COLUMN_NOTEBOOK_INDEX, &index_,
PAGE_COLUMN_MENU_ITEM, &menu_item,
PAGE_COLUMN_MAIN_WIDGET, &widget,
-1);
if (valid)
{
gtk_notebook_remove_page (GTK_NOTEBOOK (sidebar->priv->notebook),
- index);
+ index_);
gtk_container_remove (GTK_CONTAINER (sidebar->priv->menu), menu_item);