# HG changeset patch # User Mark Doliner # Date 1135225290 0 # Node ID dc995f73c101e0fa78d2d85da7c5e98ce17ce3d4 # Parent 204bd8fac61f5db1651c87c6b94c9b64b187573c [gaim-migrate @ 14955] Remove the gtkimhtmltoolbar from the gtkstatusbox. It's used by few (any?) protocols other than AIM, and it takes up a lot of room and makes my buddy list be wider than it needs to be (or the gtkimhtml has a horizontal scroll bar). I think I like it best without it. But I'd be ok with having a short version of this. I also wouldn't mind having a keyboard shortcut to insert a link. Or maybe auto-linkifying HTMLable away messages. committer: Tailor Script diff -r 204bd8fac61f -r dc995f73c101 src/gtkstatusbox.c --- a/src/gtkstatusbox.c Thu Dec 22 04:07:21 2005 +0000 +++ b/src/gtkstatusbox.c Thu Dec 22 04:21:30 2005 +0000 @@ -32,7 +32,6 @@ #include "debug.h" #include "gtkgaim.h" -#include "gtkimhtmltoolbar.h" #include "gtksavedstatuses.h" #include "gtkstock.h" #include "gtkstatusbox.h" @@ -162,8 +161,6 @@ gtk_imhtml_clear(GTK_IMHTML(status_box->imhtml)); gtk_imhtml_clear_formatting(GTK_IMHTML(status_box->imhtml)); gtk_imhtml_append_text(GTK_IMHTML(status_box->imhtml), message, 0); - gtk_widget_hide(status_box->toolbar); - gtk_widget_hide(status_box->hsep); } gtk_widget_set_sensitive(GTK_WIDGET(status_box), TRUE); gtk_gaim_status_box_refresh(status_box); @@ -406,8 +403,6 @@ gtk_imhtml_clear(GTK_IMHTML(status_box->imhtml)); gtk_imhtml_clear_formatting(GTK_IMHTML(status_box->imhtml)); gtk_imhtml_append_text(GTK_IMHTML(status_box->imhtml), message, 0); - gtk_widget_hide(status_box->toolbar); - gtk_widget_hide(status_box->hsep); gtk_widget_set_sensitive(GTK_WIDGET(status_box->imhtml), TRUE); } @@ -687,9 +682,6 @@ status_box->vbox = gtk_vbox_new(0, FALSE); vbox = gtk_vbox_new(0,FALSE); status_box->imhtml = gtk_imhtml_new(NULL, NULL); - status_box->toolbar = gtk_imhtmltoolbar_new(); - gtk_imhtmltoolbar_attach(GTK_IMHTMLTOOLBAR(status_box->toolbar), status_box->imhtml); - status_box->hsep = gtk_hseparator_new(); buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); #if 0 @@ -714,8 +706,6 @@ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(status_box->sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(status_box->sw), GTK_SHADOW_IN); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(status_box->sw), vbox); - gtk_box_pack_start(GTK_BOX(vbox), status_box->toolbar, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(vbox), status_box->hsep, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), status_box->imhtml, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(status_box->vbox), status_box->sw, TRUE, TRUE, 0); @@ -749,11 +739,6 @@ if (box_req.height > 1) requisition->height = requisition->height + box_req.height + 3; - if (GTK_GAIM_STATUS_BOX(widget)->typing) { - gtk_widget_size_request(GTK_GAIM_STATUS_BOX(widget)->toolbar, &box_req); - requisition->height = requisition->height + box_req.height; - } - requisition->width = 1; } @@ -1073,13 +1058,6 @@ height = (oneline.height + pad_top + pad_bottom) * lines; height += (oneline.height + pad_inside) * (wrapped_lines - lines); - if (status_box->typing) { - GtkRequisition requisition; - - gtk_widget_size_request(status_box->toolbar, &requisition); - height += requisition.height; - } - gtk_widget_set_size_request(status_box->vbox, -1, height); } @@ -1122,8 +1100,6 @@ if (status_box->typing) g_source_remove(status_box->typing); status_box->typing = 0; - gtk_widget_hide(status_box->hsep); - gtk_widget_hide(status_box->toolbar); if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box))) { @@ -1175,11 +1151,8 @@ gtk_widget_show_all(status_box->vbox); if (GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(status_box))) { status_box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box); - } else { - gtk_widget_hide(status_box->toolbar); - gtk_widget_hide(status_box->hsep); } - gtk_widget_grab_focus(status_box->imhtml); + gtk_widget_grab_focus(status_box->imhtml); buf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(status_box->imhtml)); gtk_text_buffer_get_start_iter(buf, &start); gtk_text_buffer_get_end_iter(buf, &end); @@ -1205,8 +1178,6 @@ g_source_remove(box->typing); } box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, box); - gtk_widget_show(box->hsep); - gtk_widget_show(box->toolbar); } gtk_gaim_status_box_refresh(box); } diff -r 204bd8fac61f -r dc995f73c101 src/gtkstatusbox.h --- a/src/gtkstatusbox.h Thu Dec 22 04:07:21 2005 +0000 +++ b/src/gtkstatusbox.h Thu Dec 22 04:21:30 2005 +0000 @@ -108,15 +108,12 @@ char *error; gulong status_changed_signal; - + /* Widgets for renderin' */ GtkWidget *hbox; GtkWidget *toggle_button; GtkWidget *vsep; GtkWidget *arrow; - - GtkWidget *toolbar; - GtkWidget *hsep; }; struct _GtkGaimStatusBoxClass