diff options
author | Michael McConville <mmcconville@mykolab.com> | 2015-08-15 19:09:49 -0400 |
---|---|---|
committer | Michael McConville <mmcconville@mykolab.com> | 2015-08-15 19:09:49 -0400 |
commit | 452f88d6451d825e9201dd5dbd16a932411a6ea9 (patch) | |
tree | 7c5833c8117c0ca294f16fe32f49884097fe7c5e | |
parent | e14f3eeca3317be39d2019f513c01c484329c58c (diff) | |
download | pidgin-452f88d6451d825e9201dd5dbd16a932411a6ea9.tar.gz |
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.
-rw-r--r-- | pidgin/gtkconv.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c index 32abe17ea3..cd7e32ff64 100644 --- a/pidgin/gtkconv.c +++ b/pidgin/gtkconv.c @@ -4940,6 +4940,8 @@ resize_webview_cb(PidginConversation *gtkconv) 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 *gtkconv) 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; } |