Mercurial > pidgin
changeset 19471:217c4b1d3a09
merge of 'b6c53eca73f8f22b0d8fafd412b2570c631455be'
and 'db850ab42d8f30eaba15fafaa3dc5ec1137141e7'
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Mon, 27 Aug 2007 17:22:16 +0000 |
parents | 286438542b24 (current diff) fb69c4dd757e (diff) |
children | bb5ec4f1e25b |
files | |
diffstat | 5 files changed, 37 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Mon Aug 27 17:21:35 2007 +0000 +++ b/pidgin/gtkconv.c Mon Aug 27 17:22:16 2007 +0000 @@ -2271,7 +2271,7 @@ const char *name = NULL; GdkPixbuf *status = NULL; PurpleBlistUiOps *ops = purple_blist_get_ui_ops(); - const char *icon_size = small_icon ? "pidgin-icon-size-tango-microscopic" : PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL; + const char *icon_size = small_icon ? PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC : PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL; g_return_val_if_fail(conv != NULL, NULL); account = purple_conversation_get_account(conv);
--- a/pidgin/gtkimhtmltoolbar.c Mon Aug 27 17:21:35 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Mon Aug 27 17:22:16 2007 +0000 @@ -70,6 +70,14 @@ } static void +do_strikethrough(GtkWidget *strikethrough, GtkIMHtmlToolbar *toolbar) +{ + g_return_if_fail(toolbar != NULL); + gtk_imhtml_toggle_strike(GTK_IMHTML(toolbar->imhtml)); + gtk_widget_grab_focus(toolbar->imhtml); +} + +static void do_small(GtkWidget *smalltb, GtkIMHtmlToolbar *toolbar) { g_return_if_fail(toolbar != NULL); @@ -433,6 +441,17 @@ gtk_widget_grab_focus(toolbar->imhtml); } +static void insert_hr_cb(GtkWidget *widget, GtkIMHtmlToolbar *toolbar) +{ + GtkTextIter iter; + GtkTextMark *ins; + GtkIMHtmlScalable *hr; + + ins = gtk_text_buffer_get_insert(gtk_text_view_get_buffer(GTK_TEXT_VIEW(toolbar->imhtml))); + gtk_text_buffer_get_iter_at_mark(gtk_text_view_get_buffer(GTK_TEXT_VIEW(toolbar->imhtml)), &iter, ins); + hr = gtk_imhtml_hr_new(); + gtk_imhtml_hr_add_to(hr, GTK_IMHTML(toolbar->imhtml), &iter); +} static void do_insert_image_cb(GtkWidget *widget, int response, GtkIMHtmlToolbar *toolbar) @@ -1027,6 +1046,13 @@ G_CALLBACK(do_underline), toolbar); toolbar->underline = button; + + /* Strikethrough */ + button = pidgin_pixbuf_toolbar_button_from_stock(GTK_STOCK_STRIKETHROUGH); + g_signal_connect(G_OBJECT(button), "clicked", + G_CALLBACK(do_strikethrough), toolbar); + toolbar->strikethrough = button; + /* Increase font size */ button = pidgin_pixbuf_toolbar_button_from_stock(PIDGIN_STOCK_TOOLBAR_TEXT_LARGER); g_signal_connect(G_OBJECT(button), "clicked", @@ -1124,6 +1150,7 @@ {_("<b>_Bold</b>"), &toolbar->bold, TRUE}, {_("<i>_Italic</i>"), &toolbar->italic, TRUE}, {_("<u>_Underline</u>"), &toolbar->underline, TRUE}, + {_("<span strikethrough='true'>Strikethrough</span>"), &toolbar->strikethrough, TRUE}, {_("<span size='larger'>_Larger</span>"), &toolbar->larger_size, TRUE}, #if 0 {_("_Normal"), &toolbar->normal_size, TRUE}, @@ -1230,6 +1257,11 @@ g_signal_connect(G_OBJECT(toolbar->link), "notify::sensitive", G_CALLBACK(button_sensitiveness_changed), menuitem); + menuitem = gtk_menu_item_new_with_mnemonic(_("_Horizontal rule")); + g_signal_connect(G_OBJECT(menuitem), "activate" , G_CALLBACK(insert_hr_cb), toolbar); + gtk_menu_shell_append(GTK_MENU_SHELL(insert_menu), menuitem); + toolbar->insert_hr = menuitem; + g_signal_connect_swapped(G_OBJECT(insert_button), "button-press-event", G_CALLBACK(gtk_widget_activate), insert_button); g_signal_connect(G_OBJECT(insert_button), "activate", G_CALLBACK(pidgin_menu_clicked), insert_menu); g_signal_connect(G_OBJECT(insert_menu), "deactivate", G_CALLBACK(pidgin_menu_deactivate), insert_button);
--- a/pidgin/gtkimhtmltoolbar.h Mon Aug 27 17:21:35 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.h Mon Aug 27 17:22:16 2007 +0000 @@ -74,6 +74,8 @@ GtkWidget *image_dialog; char *sml; + GtkWidget *strikethrough; + GtkWidget *insert_hr; }; struct _GtkIMHtmlToolbarClass {
--- a/pidgin/pidginstock.c Mon Aug 27 17:21:35 2007 +0000 +++ b/pidgin/pidginstock.c Mon Aug 27 17:22:16 2007 +0000 @@ -396,7 +396,7 @@ /* register custom icon sizes */ - microscopic = gtk_icon_size_register("pidgin-icon-size-tango-microscopic", 11, 11); + microscopic = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC, 11, 11); extra_small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL, 16, 16); small = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_SMALL, 22, 22); medium = gtk_icon_size_register(PIDGIN_ICON_SIZE_TANGO_MEDIUM, 32, 32);
--- a/pidgin/pidginstock.h Mon Aug 27 17:21:35 2007 +0000 +++ b/pidgin/pidginstock.h Mon Aug 27 17:22:16 2007 +0000 @@ -145,6 +145,7 @@ /** * For using icons that aren't one of the default GTK_ICON_SIZEs */ +#define PIDGIN_ICON_SIZE_TANGO_MICROSCOPIC "pidgin-icon-size-tango-microscopic" #define PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL "pidgin-icon-size-tango-extra-small" #define PIDGIN_ICON_SIZE_TANGO_SMALL "pidgin-icon-size-tango-small" #define PIDGIN_ICON_SIZE_TANGO_MEDIUM "pidgin-icon-size-tango-medium"