pidgin/gtkutils.c

changeset 18238
b38c33d2d71e
parent 18216
f34603f4631e
child 18275
b9633ef422b0
equal deleted inserted replaced
18237:da092aa48f4a 18238:b38c33d2d71e
1139 relation = atk_relation_new (rel_obj, 1, ATK_RELATION_LABEL_FOR); 1139 relation = atk_relation_new (rel_obj, 1, ATK_RELATION_LABEL_FOR);
1140 atk_relation_set_add (set, relation); 1140 atk_relation_set_add (set, relation);
1141 g_object_unref (relation); 1141 g_object_unref (relation);
1142 } 1142 }
1143 1143
1144 #if GTK_CHECK_VERSION(2,2,0) 1144 void
1145 static void 1145 pidgin_menu_position_func_helper(GtkMenu *menu,
1146 pidgin_menu_position_func(GtkMenu *menu,
1147 gint *x, 1146 gint *x,
1148 gint *y, 1147 gint *y,
1149 gboolean *push_in, 1148 gboolean *push_in,
1150 gpointer data) 1149 gpointer data)
1151 { 1150 {
1151 #if GTK_CHECK_VERSION(2,2,0)
1152 GtkWidget *widget; 1152 GtkWidget *widget;
1153 GtkRequisition requisition; 1153 GtkRequisition requisition;
1154 GdkScreen *screen; 1154 GdkScreen *screen;
1155 GdkRectangle monitor; 1155 GdkRectangle monitor;
1156 gint monitor_num; 1156 gint monitor_num;
1287 } 1287 }
1288 else 1288 else
1289 { 1289 {
1290 *y = monitor.y; 1290 *y = monitor.y;
1291 } 1291 }
1292 }
1293
1294 #endif 1292 #endif
1293 }
1294
1295 1295
1296 void 1296 void
1297 pidgin_treeview_popup_menu_position_func(GtkMenu *menu, 1297 pidgin_treeview_popup_menu_position_func(GtkMenu *menu,
1298 gint *x, 1298 gint *x,
1299 gint *y, 1299 gint *y,
1311 gtk_tree_view_get_cursor (tv, &path, &col); 1311 gtk_tree_view_get_cursor (tv, &path, &col);
1312 gtk_tree_view_get_cell_area (tv, path, col, &rect); 1312 gtk_tree_view_get_cell_area (tv, path, col, &rect);
1313 1313
1314 *x += rect.x+rect.width; 1314 *x += rect.x+rect.width;
1315 *y += rect.y+rect.height+ythickness; 1315 *y += rect.y+rect.height+ythickness;
1316 #if GTK_CHECK_VERSION(2,2,0) 1316 pidgin_menu_position_func_helper(menu, x, y, push_in, data);
1317 pidgin_menu_position_func (menu, x, y, push_in, data);
1318 #endif
1319 } 1317 }
1320 1318
1321 enum { 1319 enum {
1322 DND_FILE_TRANSFER, 1320 DND_FILE_TRANSFER,
1323 DND_IM_IMAGE, 1321 DND_IM_IMAGE,

mercurial