forked from osmocom/wireshark
"XXX takes a foo * as an argument" != "pass a variable of type foo * to
XXX"; in the case of gtk_widget_get_allocation(), you have to pass it a pointer to a variable of type foo, where foo = GtkAllocation. The same applies to the pre-GTK-2.18 code. svn path=/trunk/; revision=35854
This commit is contained in:
parent
3ef2acd516
commit
e895aa9ddf
|
@ -263,7 +263,7 @@ autocompletion_list_lookup(GtkWidget *filter_te, GtkWidget *popup_win, GtkWidget
|
|||
GtkRequisition requisition;
|
||||
GtkListStore *store;
|
||||
GtkTreeIter iter;
|
||||
GtkAllocation *popup_win_alloc;
|
||||
GtkAllocation popup_win_alloc;
|
||||
gchar *curr_str;
|
||||
unsigned int str_len = (unsigned int) strlen(str);
|
||||
gchar *first = NULL;
|
||||
|
@ -314,14 +314,14 @@ autocompletion_list_lookup(GtkWidget *filter_te, GtkWidget *popup_win, GtkWidget
|
|||
gtk_widget_size_request(list, &requisition);
|
||||
|
||||
#if GTK_CHECK_VERSION(2,18,0)
|
||||
gtk_widget_get_allocation(popup_win, popup_win_alloc);
|
||||
gtk_widget_get_allocation(popup_win, &popup_win_alloc);
|
||||
#else
|
||||
popup_win_alloc = popup_win->allocation;
|
||||
#endif
|
||||
|
||||
gtk_widget_set_size_request(popup_win, popup_win_alloc->width,
|
||||
gtk_widget_set_size_request(popup_win, popup_win_alloc.width,
|
||||
(requisition.height<200? requisition.height+8:200));
|
||||
gtk_window_resize(GTK_WINDOW(popup_win), popup_win_alloc->width,
|
||||
gtk_window_resize(GTK_WINDOW(popup_win), popup_win_alloc.width,
|
||||
(requisition.height<200? requisition.height+8:200));
|
||||
|
||||
return TRUE;
|
||||
|
@ -720,7 +720,7 @@ filter_autocomplete_new(GtkWidget *filter_te, const gchar *protocol_name,
|
|||
GtkTreeSelection *selection;
|
||||
GtkRequisition requisition;
|
||||
GtkWidget *w_toplevel;
|
||||
GtkAllocation *filter_te_alloc;
|
||||
GtkAllocation filter_te_alloc;
|
||||
|
||||
w_toplevel = gtk_widget_get_toplevel(filter_te);
|
||||
|
||||
|
@ -766,9 +766,9 @@ filter_autocomplete_new(GtkWidget *filter_te, const gchar *protocol_name,
|
|||
filter_te_alloc = filter_te->allocation;
|
||||
#endif
|
||||
|
||||
gtk_widget_set_size_request(popup_win, filter_te_alloc->width,
|
||||
gtk_widget_set_size_request(popup_win, filter_te_alloc.width,
|
||||
(requisition.height<200? requisition.height+8:200));
|
||||
gtk_window_resize(GTK_WINDOW(popup_win), filter_te_alloc->width,
|
||||
gtk_window_resize(GTK_WINDOW(popup_win), filter_te_alloc.width,
|
||||
(requisition.height<200? requisition.height+8:200));
|
||||
|
||||
#if GTK_CHECK_VERSION(2,14,0)
|
||||
|
@ -776,7 +776,7 @@ filter_autocomplete_new(GtkWidget *filter_te, const gchar *protocol_name,
|
|||
#else
|
||||
gdk_window_get_origin(filter_te->window, &x_pos, &y_pos);
|
||||
#endif
|
||||
y_pos = y_pos + filter_te_alloc->height;
|
||||
y_pos = y_pos + filter_te_alloc.height;
|
||||
gtk_window_move(GTK_WINDOW(popup_win), x_pos, y_pos);
|
||||
|
||||
gtk_widget_show_all (popup_win);
|
||||
|
@ -796,7 +796,7 @@ filter_autocomplete_handle_backspace(GtkWidget *filter_te, GtkWidget *list, GtkW
|
|||
GtkRequisition requisition;
|
||||
size_t prefix_len;
|
||||
gboolean protocols_only = FALSE;
|
||||
GtkAllocation *popup_win_alloc;
|
||||
GtkAllocation popup_win_alloc;
|
||||
|
||||
prefix_len = strlen(prefix);
|
||||
|
||||
|
@ -837,14 +837,14 @@ filter_autocomplete_handle_backspace(GtkWidget *filter_te, GtkWidget *list, GtkW
|
|||
gtk_widget_size_request(list, &requisition);
|
||||
|
||||
#if GTK_CHECK_VERSION(2,18,0)
|
||||
gtk_widget_get_allocation(popup_win, popup_win_alloc);
|
||||
gtk_widget_get_allocation(popup_win, &popup_win_alloc);
|
||||
#else
|
||||
popup_win_alloc = popup_win->allocation;
|
||||
#endif
|
||||
|
||||
gtk_widget_set_size_request(popup_win, popup_win_alloc->width,
|
||||
gtk_widget_set_size_request(popup_win, popup_win_alloc.width,
|
||||
(requisition.height<200? requisition.height+8:200));
|
||||
gtk_window_resize(GTK_WINDOW(popup_win), popup_win_alloc->width,
|
||||
gtk_window_resize(GTK_WINDOW(popup_win), popup_win_alloc.width,
|
||||
(requisition.height<200? requisition.height+8:200));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue