Mercurial > pidgin
changeset 17993:4eb9d6649df0
merge of '0363c65306e84bb0a015d8ae8d6667701252c3c4'
and '2ad8703a579d72666763a6ba6e150ed8d68357e9'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 02 Jun 2007 13:55:58 +0000 |
parents | 5e34cd288a98 (current diff) 4d53ccae32b0 (diff) |
children | 13c5e45862bd |
files | |
diffstat | 1 files changed, 23 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkimhtmltoolbar.c Sat Jun 02 06:43:53 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Sat Jun 02 13:55:58 2007 +0000 @@ -857,19 +857,19 @@ * Copyright (C) 2003 Ricardo Fernandez Pascual * Copyright (C) 2004 Paolo Borelli */ +static void menu_position_func (GtkMenu *menu, int *x, int *y, gboolean *push_in, - GtkWidget *widget) + gpointer data) { - GtkRequisition req; GtkRequisition menu_req; - GtkOrientation orientation; GtkTextDirection direction; GdkRectangle monitor; gint monitor_num; GdkScreen *screen; + GtkWidget *widget = data; gtk_widget_size_request (GTK_WIDGET (widget), &menu_req); @@ -902,7 +902,7 @@ } static void pidgin_menu_clicked(GtkWidget *button, GtkMenu *menu) { - gtk_widget_show_all(menu); + gtk_widget_show_all(GTK_WIDGET(menu)); gtk_menu_popup(menu, NULL, NULL, menu_position_func, button, 0, gtk_get_current_event_time()); } @@ -1070,43 +1070,43 @@ gtk_widget_show_all(font_button); font_menu = gtk_menu_new(); - + button = gtk_check_menu_item_new_with_mnemonic(_("_Bold")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->bold); - gtk_menu_shell_append(font_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); button = gtk_check_menu_item_new_with_mnemonic(_("_Italic")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->italic); - gtk_menu_shell_append(font_menu, button); - + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); + button = gtk_check_menu_item_new_with_mnemonic(_("_Underline")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->underline); - gtk_menu_shell_append(font_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); button = gtk_menu_item_new_with_mnemonic(_("_Larger")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->larger_size); - gtk_menu_shell_append(font_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); button = gtk_menu_item_new_with_mnemonic(_("_Normal")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->normal_size); - gtk_menu_shell_append(font_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); button = gtk_menu_item_new_with_mnemonic(_("_Smaller")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->smaller_size); - gtk_menu_shell_append(font_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); button = gtk_menu_item_new_with_mnemonic(_("_Font face")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->font); - gtk_menu_shell_append(font_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); button = gtk_menu_item_new_with_mnemonic(_("_Foreground color")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->fgcolor); - gtk_menu_shell_append(font_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); button = gtk_menu_item_new_with_mnemonic(_("_Background color")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->bgcolor); - gtk_menu_shell_append(font_menu, button); - + gtk_menu_shell_append(GTK_MENU_SHELL(font_menu), button); + g_signal_connect(G_OBJECT(font_button), "clicked", G_CALLBACK(pidgin_menu_clicked), font_menu); g_signal_connect(G_OBJECT(font_menu), "deactivate", G_CALLBACK(pidgin_menu_deactivate), font_button); @@ -1148,21 +1148,21 @@ gtk_widget_show_all(insert_button); insert_menu = gtk_menu_new(); - + button = gtk_menu_item_new_with_mnemonic(_("_Smiley")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->smiley); - gtk_menu_shell_append(insert_menu, button); - + gtk_menu_shell_append(GTK_MENU_SHELL(insert_menu), button); + button = gtk_menu_item_new_with_mnemonic(_("_Image")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->image); - gtk_menu_shell_append(insert_menu, button); + gtk_menu_shell_append(GTK_MENU_SHELL(insert_menu), button); button = gtk_menu_item_new_with_mnemonic(_("_Link")); g_signal_connect_swapped(G_OBJECT(button), "activate", G_CALLBACK(gtk_button_clicked), toolbar->link); - gtk_menu_shell_append(insert_menu, button); - + gtk_menu_shell_append(GTK_MENU_SHELL(insert_menu), button); + g_signal_connect(G_OBJECT(insert_button), "clicked", G_CALLBACK(pidgin_menu_clicked), insert_menu); - g_signal_connect(G_OBJECT(insert_menu), "deactivate", G_CALLBACK(pidgin_menu_deactivate), insert_button); + g_signal_connect(G_OBJECT(insert_menu), "deactivate", G_CALLBACK(pidgin_menu_deactivate), insert_button); toolbar->sml = NULL; }