/pidgin/main: fcecd6bd11e0: Only update the chat input box size ...
Michael McConville <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: fcecd6bd11e0e600e720377b20c527e83bce0f79 Author: Michael McConville <[email protected]> Date: 2015-08-15 19:09 -0400 Branch: default URL: https://hg.pidgin.im/pidgin/main/rev/fcecd6bd11e0 Description: Only update the chat input box size and print debug info when the size actually changes. Otherwise, the debug log gets spammed with an entry on every keystroke. Discussed with grim. diffstat: pidgin/gtkconv.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diffs (26 lines): diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c --- a/pidgin/gtkconv.c +++ b/pidgin/gtkconv.c @@ -4940,6 +4940,8 @@ resize_webview_cb(PidginConversation *gt gint total_height; gint height; gint toolbar_size; + gint old_w; + gint old_h; GtkAllocation webview_allocation; GtkAllocation entry_allocation; @@ -4977,8 +4979,11 @@ resize_webview_cb(PidginConversation *gt height += toolbar_size; /* Actually set the size of the gtkconv entry widget. */ - gtk_widget_set_size_request(gtkconv->lower_hbox, -1, height); - purple_debug_info("pidgin", "resizing to %d, %d lines\n", height, min_lines); + gtk_widget_get_size_request(gtkconv->lower_hbox, &old_w, &old_h); + if (old_w != -1 || old_h != height) { + gtk_widget_set_size_request(gtkconv->lower_hbox, -1, height); + purple_debug_info("pidgin", "resizing to %d, %d lines\n", height, min_lines); + } return FALSE; } _______________________________________________ Commits mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/commits