| 158 static void pidgin_conv_updated(PurpleConversation *conv, PurpleConvUpdateType type); |
158 static void pidgin_conv_updated(PurpleConversation *conv, PurpleConvUpdateType type); |
| 159 static void conv_set_unseen(PurpleConversation *gtkconv, PidginUnseenState state); |
159 static void conv_set_unseen(PurpleConversation *gtkconv, PidginUnseenState state); |
| 160 static void gtkconv_set_unseen(PidginConversation *gtkconv, PidginUnseenState state); |
160 static void gtkconv_set_unseen(PidginConversation *gtkconv, PidginUnseenState state); |
| 161 static void update_typing_icon(PidginConversation *gtkconv); |
161 static void update_typing_icon(PidginConversation *gtkconv); |
| 162 static void update_typing_message(PidginConversation *gtkconv, const char *message); |
162 static void update_typing_message(PidginConversation *gtkconv, const char *message); |
| 163 #if !GTK_CHECK_VERSION(2,4,0) |
163 #if !GTK_CHECK_VERSION(2,6,0) |
| 164 static const char *item_factory_translate_func (const char *path, gpointer func_data); |
164 static const char *item_factory_translate_func (const char *path, gpointer func_data); |
| 165 #endif |
165 #endif |
| 166 gboolean pidgin_conv_has_focus(PurpleConversation *conv); |
166 gboolean pidgin_conv_has_focus(PurpleConversation *conv); |
| 167 static GdkColor* generate_nick_colors(guint *numcolors, GdkColor background); |
167 static GdkColor* generate_nick_colors(guint *numcolors, GdkColor background); |
| 168 static gboolean color_is_visible(GdkColor foreground, GdkColor background, int color_contrast, int brightness_contrast); |
168 static gboolean color_is_visible(GdkColor foreground, GdkColor background, int color_contrast, int brightness_contrast); |
| 953 if (info != NULL) |
953 if (info != NULL) |
| 954 gtk_widget_grab_focus(info->entry); |
954 gtk_widget_grab_focus(info->entry); |
| 955 } |
955 } |
| 956 |
956 |
| 957 static void |
957 static void |
| 958 #if GTK_CHECK_VERSION(2,4,0) |
958 #if GTK_CHECK_VERSION(2,6,0) |
| 959 menu_new_conv_cb(GtkAction *action, gpointer data) |
959 menu_new_conv_cb(GtkAction *action, gpointer data) |
| 960 #else |
960 #else |
| 961 menu_new_conv_cb(gpointer data, guint action, GtkWidget *widget) |
961 menu_new_conv_cb(gpointer data, guint action, GtkWidget *widget) |
| 962 #endif |
962 #endif |
| 963 { |
963 { |
| 998 /* |
998 /* |
| 999 * It would be kinda cool if this gave the option of saving a |
999 * It would be kinda cool if this gave the option of saving a |
| 1000 * plaintext v. HTML file. |
1000 * plaintext v. HTML file. |
| 1001 */ |
1001 */ |
| 1002 static void |
1002 static void |
| 1003 #if GTK_CHECK_VERSION(2,4,0) |
1003 #if GTK_CHECK_VERSION(2,6,0) |
| 1004 menu_save_as_cb(GtkAction *action, gpointer data) |
1004 menu_save_as_cb(GtkAction *action, gpointer data) |
| 1005 #else |
1005 #else |
| 1006 menu_save_as_cb(gpointer data, guint action, GtkWidget *widget) |
1006 menu_save_as_cb(gpointer data, guint action, GtkWidget *widget) |
| 1007 #endif |
1007 #endif |
| 1008 { |
1008 { |
| 1032 |
1032 |
| 1033 g_free(buf); |
1033 g_free(buf); |
| 1034 } |
1034 } |
| 1035 |
1035 |
| 1036 static void |
1036 static void |
| 1037 #if GTK_CHECK_VERSION(2,4,0) |
1037 #if GTK_CHECK_VERSION(2,6,0) |
| 1038 menu_view_log_cb(GtkAction *action, gpointer data) |
1038 menu_view_log_cb(GtkAction *action, gpointer data) |
| 1039 #else |
1039 #else |
| 1040 menu_view_log_cb(gpointer data, guint action, GtkWidget *widget) |
1040 menu_view_log_cb(gpointer data, guint action, GtkWidget *widget) |
| 1041 #endif |
1041 #endif |
| 1042 { |
1042 { |
| 1063 |
1063 |
| 1064 cursor = gdk_cursor_new(GDK_WATCH); |
1064 cursor = gdk_cursor_new(GDK_WATCH); |
| 1065 gdk_window_set_cursor(gtkblist->window->window, cursor); |
1065 gdk_window_set_cursor(gtkblist->window->window, cursor); |
| 1066 gdk_window_set_cursor(win->window->window, cursor); |
1066 gdk_window_set_cursor(win->window->window, cursor); |
| 1067 gdk_cursor_unref(cursor); |
1067 gdk_cursor_unref(cursor); |
| 1068 #if GTK_CHECK_VERSION(2,4,0) |
1068 #if GTK_CHECK_VERSION(2,4,0) && !GTK_CHECK_VERSION(2,6,0) //FIXME: What? |
| 1069 //FIXME: gdk_display_flush(gdk_drawable_get_display(GDK_DRAWABLE(widget->window))); |
1069 gdk_display_flush(gdk_drawable_get_display(GDK_DRAWABLE(widget->window))); |
| 1070 #else |
1070 #else |
| 1071 gdk_flush(); |
1071 gdk_flush(); |
| 1072 #endif |
1072 #endif |
| 1073 |
1073 |
| 1074 name = purple_conversation_get_name(conv); |
1074 name = purple_conversation_get_name(conv); |
| 1094 gdk_window_set_cursor(gtkblist->window->window, NULL); |
1094 gdk_window_set_cursor(gtkblist->window->window, NULL); |
| 1095 gdk_window_set_cursor(win->window->window, NULL); |
1095 gdk_window_set_cursor(win->window->window, NULL); |
| 1096 } |
1096 } |
| 1097 |
1097 |
| 1098 static void |
1098 static void |
| 1099 #if GTK_CHECK_VERSION(2,4,0) |
1099 #if GTK_CHECK_VERSION(2,6,0) |
| 1100 menu_clear_cb(GtkAction *action, gpointer data) |
1100 menu_clear_cb(GtkAction *action, gpointer data) |
| 1101 #else |
1101 #else |
| 1102 menu_clear_cb(gpointer data, guint action, GtkWidget *widget) |
1102 menu_clear_cb(gpointer data, guint action, GtkWidget *widget) |
| 1103 #endif |
1103 #endif |
| 1104 { |
1104 { |
| 1159 break; |
1159 break; |
| 1160 } |
1160 } |
| 1161 } |
1161 } |
| 1162 |
1162 |
| 1163 static void |
1163 static void |
| 1164 #if GTK_CHECK_VERSION(2,4,0) |
1164 #if GTK_CHECK_VERSION(2,6,0) |
| 1165 menu_find_cb(GtkAction *action, gpointer data) |
1165 menu_find_cb(GtkAction *action, gpointer data) |
| 1166 #else |
1166 #else |
| 1167 menu_find_cb(gpointer data, guint action, GtkWidget *widget) |
1167 menu_find_cb(gpointer data, guint action, GtkWidget *widget) |
| 1168 #endif |
1168 #endif |
| 1169 { |
1169 { |
| 1223 gtk_widget_grab_focus(s->entry); |
1223 gtk_widget_grab_focus(s->entry); |
| 1224 } |
1224 } |
| 1225 |
1225 |
| 1226 #ifdef USE_VV |
1226 #ifdef USE_VV |
| 1227 static void |
1227 static void |
| 1228 #if GTK_CHECK_VERSION(2,4,0) |
1228 #if GTK_CHECK_VERSION(2,6,0) |
| 1229 menu_initiate_media_call_cb(GtkAction *action, gpointer data) |
1229 menu_initiate_media_call_cb(GtkAction *action, gpointer data) |
| 1230 #else |
1230 #else |
| 1231 menu_initiate_media_call_cb(gpointer data, guint action, GtkWidget *widget) |
1231 menu_initiate_media_call_cb(gpointer data, guint action, GtkWidget *widget) |
| 1232 #endif |
1232 #endif |
| 1233 { |
1233 { |
| 1244 PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE); |
1244 PURPLE_MEDIA_VIDEO : PURPLE_MEDIA_NONE); |
| 1245 } |
1245 } |
| 1246 #endif |
1246 #endif |
| 1247 |
1247 |
| 1248 static void |
1248 static void |
| 1249 #if GTK_CHECK_VERSION(2,4,0) |
1249 #if GTK_CHECK_VERSION(2,6,0) |
| 1250 menu_send_file_cb(GtkAction *action, gpointer data) |
1250 menu_send_file_cb(GtkAction *action, gpointer data) |
| 1251 #else |
1251 #else |
| 1252 menu_send_file_cb(gpointer data, guint action, GtkWidget *widget) |
1252 menu_send_file_cb(gpointer data, guint action, GtkWidget *widget) |
| 1253 #endif |
1253 #endif |
| 1254 { |
1254 { |
| 1260 } |
1260 } |
| 1261 |
1261 |
| 1262 } |
1262 } |
| 1263 |
1263 |
| 1264 static void |
1264 static void |
| 1265 #if GTK_CHECK_VERSION(2,4,0) |
1265 #if GTK_CHECK_VERSION(2,6,0) |
| 1266 menu_add_pounce_cb(GtkAction *action, gpointer data) |
1266 menu_add_pounce_cb(GtkAction *action, gpointer data) |
| 1267 #else |
1267 #else |
| 1268 menu_add_pounce_cb(gpointer data, guint action, GtkWidget *widget) |
1268 menu_add_pounce_cb(gpointer data, guint action, GtkWidget *widget) |
| 1269 #endif |
1269 #endif |
| 1270 { |
1270 { |
| 1276 pidgin_pounce_editor_show(purple_conversation_get_account(conv), |
1276 pidgin_pounce_editor_show(purple_conversation_get_account(conv), |
| 1277 purple_conversation_get_name(conv), NULL); |
1277 purple_conversation_get_name(conv), NULL); |
| 1278 } |
1278 } |
| 1279 |
1279 |
| 1280 static void |
1280 static void |
| 1281 #if GTK_CHECK_VERSION(2,4,0) |
1281 #if GTK_CHECK_VERSION(2,6,0) |
| 1282 menu_insert_link_cb(GtkAction *action, gpointer data) |
1282 menu_insert_link_cb(GtkAction *action, gpointer data) |
| 1283 #else |
1283 #else |
| 1284 menu_insert_link_cb(gpointer data, guint action, GtkWidget *widget) |
1284 menu_insert_link_cb(gpointer data, guint action, GtkWidget *widget) |
| 1285 #endif |
1285 #endif |
| 1286 { |
1286 { |
| 1294 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->link), |
1294 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->link), |
| 1295 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->link))); |
1295 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->link))); |
| 1296 } |
1296 } |
| 1297 |
1297 |
| 1298 static void |
1298 static void |
| 1299 #if GTK_CHECK_VERSION(2,4,0) |
1299 #if GTK_CHECK_VERSION(2,6,0) |
| 1300 menu_insert_image_cb(GtkAction *action, gpointer data) |
1300 menu_insert_image_cb(GtkAction *action, gpointer data) |
| 1301 #else |
1301 #else |
| 1302 menu_insert_image_cb(gpointer data, guint action, GtkWidget *widget) |
1302 menu_insert_image_cb(gpointer data, guint action, GtkWidget *widget) |
| 1303 #endif |
1303 #endif |
| 1304 { |
1304 { |
| 1315 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->image))); |
1315 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->image))); |
| 1316 } |
1316 } |
| 1317 |
1317 |
| 1318 |
1318 |
| 1319 static void |
1319 static void |
| 1320 #if GTK_CHECK_VERSION(2,4,0) |
1320 #if GTK_CHECK_VERSION(2,6,0) |
| 1321 menu_alias_cb(GtkAction *action, gpointer data) |
1321 menu_alias_cb(GtkAction *action, gpointer data) |
| 1322 #else |
1322 #else |
| 1323 menu_alias_cb(gpointer data, guint action, GtkWidget *widget) |
1323 menu_alias_cb(gpointer data, guint action, GtkWidget *widget) |
| 1324 #endif |
1324 #endif |
| 1325 { |
1325 { |
| 1346 pidgin_dialogs_alias_chat(c); |
1346 pidgin_dialogs_alias_chat(c); |
| 1347 } |
1347 } |
| 1348 } |
1348 } |
| 1349 |
1349 |
| 1350 static void |
1350 static void |
| 1351 #if GTK_CHECK_VERSION(2,4,0) |
1351 #if GTK_CHECK_VERSION(2,6,0) |
| 1352 menu_get_info_cb(GtkAction *action, gpointer data) |
1352 menu_get_info_cb(GtkAction *action, gpointer data) |
| 1353 #else |
1353 #else |
| 1354 menu_get_info_cb(gpointer data, guint action, GtkWidget *widget) |
1354 menu_get_info_cb(gpointer data, guint action, GtkWidget *widget) |
| 1355 #endif |
1355 #endif |
| 1356 { |
1356 { |
| 1361 |
1361 |
| 1362 info_cb(NULL, PIDGIN_CONVERSATION(conv)); |
1362 info_cb(NULL, PIDGIN_CONVERSATION(conv)); |
| 1363 } |
1363 } |
| 1364 |
1364 |
| 1365 static void |
1365 static void |
| 1366 #if GTK_CHECK_VERSION(2,4,0) |
1366 #if GTK_CHECK_VERSION(2,6,0) |
| 1367 menu_invite_cb(GtkAction *action, gpointer data) |
1367 menu_invite_cb(GtkAction *action, gpointer data) |
| 1368 #else |
1368 #else |
| 1369 menu_invite_cb(gpointer data, guint action, GtkWidget *widget) |
1369 menu_invite_cb(gpointer data, guint action, GtkWidget *widget) |
| 1370 #endif |
1370 #endif |
| 1371 { |
1371 { |
| 1376 |
1376 |
| 1377 invite_cb(NULL, PIDGIN_CONVERSATION(conv)); |
1377 invite_cb(NULL, PIDGIN_CONVERSATION(conv)); |
| 1378 } |
1378 } |
| 1379 |
1379 |
| 1380 static void |
1380 static void |
| 1381 #if GTK_CHECK_VERSION(2,4,0) |
1381 #if GTK_CHECK_VERSION(2,6,0) |
| 1382 menu_block_cb(GtkAction *action, gpointer data) |
1382 menu_block_cb(GtkAction *action, gpointer data) |
| 1383 #else |
1383 #else |
| 1384 menu_block_cb(gpointer data, guint action, GtkWidget *widget) |
1384 menu_block_cb(gpointer data, guint action, GtkWidget *widget) |
| 1385 #endif |
1385 #endif |
| 1386 { |
1386 { |
| 1391 |
1391 |
| 1392 block_cb(NULL, PIDGIN_CONVERSATION(conv)); |
1392 block_cb(NULL, PIDGIN_CONVERSATION(conv)); |
| 1393 } |
1393 } |
| 1394 |
1394 |
| 1395 static void |
1395 static void |
| 1396 #if GTK_CHECK_VERSION(2,4,0) |
1396 #if GTK_CHECK_VERSION(2,6,0) |
| 1397 menu_unblock_cb(GtkAction *action, gpointer data) |
1397 menu_unblock_cb(GtkAction *action, gpointer data) |
| 1398 #else |
1398 #else |
| 1399 menu_unblock_cb(gpointer data, guint action, GtkWidget *widget) |
1399 menu_unblock_cb(gpointer data, guint action, GtkWidget *widget) |
| 1400 #endif |
1400 #endif |
| 1401 { |
1401 { |
| 1406 |
1406 |
| 1407 unblock_cb(NULL, PIDGIN_CONVERSATION(conv)); |
1407 unblock_cb(NULL, PIDGIN_CONVERSATION(conv)); |
| 1408 } |
1408 } |
| 1409 |
1409 |
| 1410 static void |
1410 static void |
| 1411 #if GTK_CHECK_VERSION(2,4,0) |
1411 #if GTK_CHECK_VERSION(2,6,0) |
| 1412 menu_add_remove_cb(GtkAction *action, gpointer data) |
1412 menu_add_remove_cb(GtkAction *action, gpointer data) |
| 1413 #else |
1413 #else |
| 1414 menu_add_remove_cb(gpointer data, guint action, GtkWidget *widget) |
1414 menu_add_remove_cb(gpointer data, guint action, GtkWidget *widget) |
| 1415 #endif |
1415 #endif |
| 1416 { |
1416 { |
| 1455 #endif |
1455 #endif |
| 1456 } |
1456 } |
| 1457 } |
1457 } |
| 1458 |
1458 |
| 1459 static void |
1459 static void |
| 1460 #if GTK_CHECK_VERSION(2,4,0) |
1460 #if GTK_CHECK_VERSION(2,6,0) |
| 1461 menu_close_conv_cb(GtkAction *action, gpointer data) |
1461 menu_close_conv_cb(GtkAction *action, gpointer data) |
| 1462 #else |
1462 #else |
| 1463 menu_close_conv_cb(gpointer data, guint action, GtkWidget *widget) |
1463 menu_close_conv_cb(gpointer data, guint action, GtkWidget *widget) |
| 1464 #endif |
1464 #endif |
| 1465 { |
1465 { |
| 1467 |
1467 |
| 1468 close_conv_cb(NULL, NULL, PIDGIN_CONVERSATION(pidgin_conv_window_get_active_conversation(win))); |
1468 close_conv_cb(NULL, NULL, PIDGIN_CONVERSATION(pidgin_conv_window_get_active_conversation(win))); |
| 1469 } |
1469 } |
| 1470 |
1470 |
| 1471 static void |
1471 static void |
| 1472 #if GTK_CHECK_VERSION(2,4,0) |
1472 #if GTK_CHECK_VERSION(2,6,0) |
| 1473 menu_logging_cb(GtkAction *action, gpointer data) |
1473 menu_logging_cb(GtkAction *action, gpointer data) |
| 1474 #else |
1474 #else |
| 1475 menu_logging_cb(gpointer data, guint action, GtkWidget *widget) |
1475 menu_logging_cb(gpointer data, guint action, GtkWidget *widget) |
| 1476 #endif |
1476 #endif |
| 1477 { |
1477 { |
| 1483 conv = pidgin_conv_window_get_active_conversation(win); |
1483 conv = pidgin_conv_window_get_active_conversation(win); |
| 1484 |
1484 |
| 1485 if (conv == NULL) |
1485 if (conv == NULL) |
| 1486 return; |
1486 return; |
| 1487 |
1487 |
| 1488 #if GTK_CHECK_VERSION(2,4,0) |
1488 #if GTK_CHECK_VERSION(2,6,0) |
| 1489 logging = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); |
1489 logging = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); |
| 1490 #else |
1490 #else |
| 1491 logging = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
1491 logging = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
| 1492 #endif |
1492 #endif |
| 1493 |
1493 |
| 1540 break; |
1540 break; |
| 1541 } |
1541 } |
| 1542 } |
1542 } |
| 1543 |
1543 |
| 1544 static void |
1544 static void |
| 1545 #if GTK_CHECK_VERSION(2,4,0) |
1545 #if GTK_CHECK_VERSION(2,6,0) |
| 1546 menu_toolbar_cb(GtkAction *action, gpointer data) |
1546 menu_toolbar_cb(GtkAction *action, gpointer data) |
| 1547 { |
1547 { |
| 1548 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar", |
1548 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/show_formatting_toolbar", |
| 1549 gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))); |
1549 gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))); |
| 1550 } |
1550 } |
| 1555 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))); |
1555 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))); |
| 1556 } |
1556 } |
| 1557 #endif |
1557 #endif |
| 1558 |
1558 |
| 1559 static void |
1559 static void |
| 1560 #if GTK_CHECK_VERSION(2,4,0) |
1560 #if GTK_CHECK_VERSION(2,6,0) |
| 1561 menu_sounds_cb(GtkAction *action, gpointer data) |
1561 menu_sounds_cb(GtkAction *action, gpointer data) |
| 1562 #else |
1562 #else |
| 1563 menu_sounds_cb(gpointer data, guint action, GtkWidget *widget) |
1563 menu_sounds_cb(gpointer data, guint action, GtkWidget *widget) |
| 1564 #endif |
1564 #endif |
| 1565 { |
1565 { |
| 1574 return; |
1574 return; |
| 1575 |
1575 |
| 1576 gtkconv = PIDGIN_CONVERSATION(conv); |
1576 gtkconv = PIDGIN_CONVERSATION(conv); |
| 1577 |
1577 |
| 1578 gtkconv->make_sound = |
1578 gtkconv->make_sound = |
| 1579 #if GTK_CHECK_VERSION(2,4,0) |
1579 #if GTK_CHECK_VERSION(2,6,0) |
| 1580 gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); |
1580 gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); |
| 1581 #else |
1581 #else |
| 1582 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
1582 gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)); |
| 1583 #endif |
1583 #endif |
| 1584 node = get_conversation_blist_node(conv); |
1584 node = get_conversation_blist_node(conv); |
| 1585 if (node) |
1585 if (node) |
| 1586 purple_blist_node_set_bool(node, "gtk-mute-sound", !gtkconv->make_sound); |
1586 purple_blist_node_set_bool(node, "gtk-mute-sound", !gtkconv->make_sound); |
| 1587 } |
1587 } |
| 1588 |
1588 |
| 1589 static void |
1589 static void |
| 1590 #if GTK_CHECK_VERSION(2,4,0) |
1590 #if GTK_CHECK_VERSION(2,6,0) |
| 1591 menu_timestamps_cb(GtkAction *action, gpointer data) |
1591 menu_timestamps_cb(GtkAction *action, gpointer data) |
| 1592 { |
1592 { |
| 1593 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps", |
1593 purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/conversations/show_timestamps", |
| 1594 gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))); |
1594 gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))); |
| 1595 } |
1595 } |
| 3232 { |
3232 { |
| 3233 g_return_val_if_fail(gtkconv != NULL, NULL); |
3233 g_return_val_if_fail(gtkconv != NULL, NULL); |
| 3234 return gtkconv->win; |
3234 return gtkconv->win; |
| 3235 } |
3235 } |
| 3236 |
3236 |
| 3237 #if GTK_CHECK_VERSION(2,4,0) |
3237 #if GTK_CHECK_VERSION(2,6,0) |
| 3238 |
3238 |
| 3239 static GtkActionEntry menu_entries[] = |
3239 static GtkActionEntry menu_entries[] = |
| 3240 /* TODO: fill out tooltips... */ |
3240 /* TODO: fill out tooltips... */ |
| 3241 { |
3241 { |
| 3242 /* Conversation menu */ |
3242 /* Conversation menu */ |
| 3626 } |
3626 } |
| 3627 g_object_set_data(G_OBJECT(win->window), "plugin-actions", action_items); |
3627 g_object_set_data(G_OBJECT(win->window), "plugin-actions", action_items); |
| 3628 #endif |
3628 #endif |
| 3629 } |
3629 } |
| 3630 |
3630 |
| 3631 #if !GTK_CHECK_VERSION(2,4,0) |
3631 #if !GTK_CHECK_VERSION(2,6,0) |
| 3632 static void menubar_activated(GtkWidget *item, gpointer data) |
3632 static void menubar_activated(GtkWidget *item, gpointer data) |
| 3633 { |
3633 { |
| 3634 PidginWindow *win = data; |
3634 PidginWindow *win = data; |
| 3635 regenerate_options_items(win); |
3635 regenerate_options_items(win); |
| 3636 regenerate_plugins_items(win); |
3636 regenerate_plugins_items(win); |
| 3657 setup_menubar(PidginWindow *win) |
3657 setup_menubar(PidginWindow *win) |
| 3658 { |
3658 { |
| 3659 GtkAccelGroup *accel_group; |
3659 GtkAccelGroup *accel_group; |
| 3660 const char *method; |
3660 const char *method; |
| 3661 |
3661 |
| 3662 #if GTK_CHECK_VERSION(2,4,0) |
3662 #if GTK_CHECK_VERSION(2,6,0) |
| 3663 GtkActionGroup *action_group; |
3663 GtkActionGroup *action_group; |
| 3664 GError *error; |
3664 GError *error; |
| 3665 |
3665 |
| 3666 action_group = gtk_action_group_new("ConversationActions"); |
3666 action_group = gtk_action_group_new("ConversationActions"); |
| 3667 gtk_action_group_add_actions(action_group, |
3667 gtk_action_group_add_actions(action_group, |
| 4093 return FALSE; |
4093 return FALSE; |
| 4094 |
4094 |
| 4095 if (!(b = purple_find_buddy(account, conv->name))) |
4095 if (!(b = purple_find_buddy(account, conv->name))) |
| 4096 return FALSE; |
4096 return FALSE; |
| 4097 |
4097 |
| 4098 #if GTK_CHECK_VERSION(2,4,0) |
4098 #if GTK_CHECK_VERSION(2,6,0) |
| 4099 #else |
4099 #else |
| 4100 gtk_widget_show(win->menu.send_to); |
4100 gtk_widget_show(win->menu.send_to); |
| 4101 |
4101 |
| 4102 menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(win->menu.send_to)); |
4102 menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(win->menu.send_to)); |
| 4103 |
4103 |
| 4227 } |
4227 } |
| 4228 |
4228 |
| 4229 static void |
4229 static void |
| 4230 generate_send_to_items(PidginWindow *win) |
4230 generate_send_to_items(PidginWindow *win) |
| 4231 { |
4231 { |
| 4232 #if GTK_CHECK_VERSION(2,4,0) |
4232 #if GTK_CHECK_VERSION(2,6,0) |
| 4233 #else |
4233 #else |
| 4234 GtkWidget *menu; |
4234 GtkWidget *menu; |
| 4235 GSList *group = NULL; |
4235 GSList *group = NULL; |
| 4236 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
4236 GtkSizeGroup *sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); |
| 4237 PidginConversation *gtkconv; |
4237 PidginConversation *gtkconv; |
| 8936 |
8936 |
| 8937 if (e->button == 3) { |
8937 if (e->button == 3) { |
| 8938 /* Right click was pressed. Popup the context menu. */ |
8938 /* Right click was pressed. Popup the context menu. */ |
| 8939 GtkWidget *menu = gtk_menu_new(), *sub; |
8939 GtkWidget *menu = gtk_menu_new(), *sub; |
| 8940 gboolean populated = populate_menu_with_options(menu, gtkconv, TRUE); |
8940 gboolean populated = populate_menu_with_options(menu, gtkconv, TRUE); |
| 8941 #if GTK_CHECK_VERSION(2,4,0) |
8941 #if GTK_CHECK_VERSION(2,6,0) |
| 8942 #else |
8942 #else |
| 8943 sub = gtk_menu_item_get_submenu(GTK_MENU_ITEM(gtkconv->win->menu.send_to)); |
8943 sub = gtk_menu_item_get_submenu(GTK_MENU_ITEM(gtkconv->win->menu.send_to)); |
| 8944 |
8944 |
| 8945 if (sub && GTK_WIDGET_IS_SENSITIVE(gtkconv->win->menu.send_to)) { |
8945 if (sub && GTK_WIDGET_IS_SENSITIVE(gtkconv->win->menu.send_to)) { |
| 8946 GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("S_end To")); |
8946 GtkWidget *item = gtk_menu_item_new_with_mnemonic(_("S_end To")); |