Mercurial > pidgin
changeset 19470:fb69c4dd757e
merge of '1e84e66f6954510525d3db02bb2899bca1caacdb'
and 'd47f20dcdb0fc5877e4e74981796382067cbd2a6'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 27 Aug 2007 17:17:04 +0000 |
parents | 11c727b19201 (current diff) 42ee8f13c917 (diff) |
children | 217c4b1d3a09 |
files | |
diffstat | 5 files changed, 37 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Mon Aug 27 07:03:28 2007 +0000 +++ b/pidgin/gtkconv.c Mon Aug 27 17:17:04 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 07:03:28 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Mon Aug 27 17:17:04 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 07:03:28 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.h Mon Aug 27 17:17:04 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 07:03:28 2007 +0000 +++ b/pidgin/pidginstock.c Mon Aug 27 17:17:04 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 07:03:28 2007 +0000 +++ b/pidgin/pidginstock.h Mon Aug 27 17:17:04 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"