changeset 21453:93e69f29bc5f

merge of '45a353a8a7978312260680050564b3a32f0d07aa' and 'c7f6969f2405aa75f2e945cb239e6bf9ff0d6372'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 12 Nov 2007 16:53:54 +0000
parents b068b2d146d1 (current diff) 14f06265d134 (diff)
children d78e440584e0
files pidgin/pixmaps/dialogs/16/Makefile.am pidgin/pixmaps/dialogs/16/Makefile.mingw pidgin/pixmaps/dialogs/64/Makefile.am pidgin/pixmaps/dialogs/64/Makefile.mingw pidgin/pixmaps/emblems/16/Makefile.am pidgin/pixmaps/emblems/16/Makefile.mingw pidgin/pixmaps/emotes/default/Makefile.mingw pidgin/pixmaps/icons/16/Makefile.am pidgin/pixmaps/icons/16/pidgin.png pidgin/pixmaps/icons/16/scalable/pidgin.svg pidgin/pixmaps/icons/22/Makefile.am pidgin/pixmaps/icons/22/pidgin.png pidgin/pixmaps/icons/22/scalable/pidgin.svg pidgin/pixmaps/icons/24/Makefile.am pidgin/pixmaps/icons/24/pidgin.png pidgin/pixmaps/icons/24/scalable/pidgin.svg pidgin/pixmaps/icons/32/Makefile.am pidgin/pixmaps/icons/32/pidgin.png pidgin/pixmaps/icons/32/scalable/pidgin.svg pidgin/pixmaps/icons/48/Makefile.am pidgin/pixmaps/icons/48/pidgin.png pidgin/pixmaps/icons/48/scalable/pidgin.svg pidgin/pixmaps/protocols/16/Makefile.am pidgin/pixmaps/protocols/16/Makefile.mingw pidgin/pixmaps/protocols/22/Makefile.am pidgin/pixmaps/protocols/22/Makefile.mingw pidgin/pixmaps/protocols/48/Makefile.am pidgin/pixmaps/protocols/48/Makefile.mingw pidgin/pixmaps/status/11/Makefile.am pidgin/pixmaps/status/11/Makefile.mingw pidgin/pixmaps/status/11/rtl/Makefile.am pidgin/pixmaps/status/11/rtl/Makefile.mingw pidgin/pixmaps/status/16/Makefile.am pidgin/pixmaps/status/16/Makefile.mingw pidgin/pixmaps/status/16/rtl/Makefile.am pidgin/pixmaps/status/16/rtl/Makefile.mingw pidgin/pixmaps/status/22/Makefile.am pidgin/pixmaps/status/22/Makefile.mingw pidgin/pixmaps/status/22/rtl/Makefile.am pidgin/pixmaps/status/22/rtl/Makefile.mingw pidgin/pixmaps/status/32/Makefile.am pidgin/pixmaps/status/32/Makefile.mingw pidgin/pixmaps/status/32/rtl/Makefile.am pidgin/pixmaps/status/32/rtl/Makefile.mingw pidgin/pixmaps/status/48/Makefile.am pidgin/pixmaps/status/48/Makefile.mingw pidgin/pixmaps/status/48/rtl/Makefile.am pidgin/pixmaps/status/48/rtl/Makefile.mingw pidgin/pixmaps/toolbar/16/Makefile.am pidgin/pixmaps/toolbar/16/Makefile.mingw pidgin/pixmaps/toolbar/22/Makefile.am pidgin/pixmaps/toolbar/22/Makefile.mingw pidgin/pixmaps/tray/16/Makefile.am pidgin/pixmaps/tray/16/Makefile.mingw pidgin/pixmaps/tray/16/scalable/Makefile.am pidgin/pixmaps/tray/22/Makefile.am pidgin/pixmaps/tray/22/Makefile.mingw pidgin/pixmaps/tray/22/scalable/Makefile.am pidgin/pixmaps/tray/32/Makefile.am pidgin/pixmaps/tray/32/Makefile.mingw pidgin/pixmaps/tray/48/Makefile.am pidgin/pixmaps/tray/48/Makefile.mingw share/Makefile.am share/Makefile.mingw
diffstat 4 files changed, 25 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntblist.c	Mon Nov 12 08:58:25 2007 +0000
+++ b/finch/gntblist.c	Mon Nov 12 16:53:54 2007 +0000
@@ -1506,6 +1506,8 @@
 {
 	if (text[0] == 27 && text[1] == 0) {
 		/* Escape was pressed */
+		if (gnt_tree_is_searching(GNT_TREE(ggblist->tree)))
+			gnt_bindable_perform_action_named(GNT_BINDABLE(ggblist->tree), "end-search", NULL);
 		remove_peripherals(ggblist);
 	} else if (strcmp(text, GNT_KEY_CTRL_O) == 0) {
 		purple_prefs_set_bool(PREF_ROOT "/showoffline",
--- a/finch/libgnt/gnttextview.c	Mon Nov 12 08:58:25 2007 +0000
+++ b/finch/libgnt/gnttextview.c	Mon Nov 12 16:53:54 2007 +0000
@@ -61,6 +61,8 @@
 static gchar *select_end;
 static gboolean double_click;
 
+static void reset_text_view(GntTextView *view);
+
 static void
 gnt_text_view_draw(GntWidget *widget)
 {
@@ -370,7 +372,7 @@
 
 	string = view->string;
 	view->string = NULL;
-	gnt_text_view_clear(view);
+	reset_text_view(view);
 
 	view->string = g_string_set_size(view->string, string->len);
 	view->string->len = 0;
@@ -654,7 +656,7 @@
 	return fl;
 }
 
-void gnt_text_view_clear(GntTextView *view)
+static void reset_text_view(GntTextView *view)
 {
 	GntTextLine *line;
 
@@ -667,6 +669,14 @@
 	if (view->string)
 		g_string_free(view->string, TRUE);
 	view->string = g_string_new(NULL);
+}
+
+void gnt_text_view_clear(GntTextView *view)
+{
+	reset_text_view(view);
+
+	g_list_foreach(view->tags, free_tag, NULL);
+	view->tags = NULL;
 
 	if (GNT_WIDGET(view)->window)
 		gnt_widget_draw(GNT_WIDGET(view));
@@ -833,7 +843,7 @@
 	if (status == 0) {
 		char *text = NULL;
 		if (g_file_get_contents(pageditor.file, &text, NULL, NULL)) {
-			gnt_text_view_clear(pageditor.tv);
+			reset_text_view(pageditor.tv);
 			gnt_text_view_append_text_with_flags(pageditor.tv, text, GNT_TEXT_FLAG_NORMAL);
 			gnt_text_view_scroll(GNT_TEXT_VIEW(pageditor.tv), 0);
 			g_free(text);
--- a/finch/libgnt/gntwidget.c	Mon Nov 12 08:58:25 2007 +0000
+++ b/finch/libgnt/gntwidget.c	Mon Nov 12 16:53:54 2007 +0000
@@ -466,7 +466,6 @@
 		*width = wid->priv.width + shadow;
 	if (height)
 		*height = wid->priv.height + shadow;
-	
 }
 
 static void
--- a/finch/libgnt/gntwm.c	Mon Nov 12 08:58:25 2007 +0000
+++ b/finch/libgnt/gntwm.c	Mon Nov 12 16:53:54 2007 +0000
@@ -109,12 +109,10 @@
 gnt_wm_copy_win(GntWidget *widget, GntNode *node)
 {
 	WINDOW *src, *dst;
-	int shadow;
 	if (!node)
 		return;
 	src = widget->window;
 	dst = node->window;
-	shadow = gnt_widget_has_shadow(widget) ? 1 : 0;
 	copywin(src, dst, node->scroll, 0, 0, 0, getmaxy(dst) - 1, getmaxx(dst) - 1, 0);
 }
 
@@ -1004,9 +1002,9 @@
 	GntWM *wm = GNT_WM(bindable);
 
 	endwin();
+	refresh();
 
-	g_hash_table_foreach(wm->nodes, (GHFunc)refresh_node, NULL);
-	refresh();
+	g_hash_table_foreach(wm->nodes, (GHFunc)refresh_node, GINT_TO_POINTER(TRUE));
 	g_signal_emit(wm, signals[SIG_TERMINAL_REFRESH], 0);
 	update_screen(wm);
 	gnt_ws_draw_taskbar(wm->cws, TRUE);
@@ -1622,13 +1620,11 @@
 			shadow = FALSE;
 		x = widget->priv.x;
 		y = widget->priv.y;
-		w = widget->priv.width;
-		h = widget->priv.height;
+		w = widget->priv.width + shadow;
+		h = widget->priv.height + shadow;
 
-		getmaxyx(stdscr, maxy, maxx);
-		maxy -= 1;              /* room for the taskbar */
-		maxy -= shadow;
-		maxx -= shadow;
+		maxx = getmaxx(stdscr);
+		maxy = getmaxy(stdscr) - 1;              /* room for the taskbar */
 
 		x = MAX(0, x);
 		y = MAX(0, y);
@@ -1639,7 +1635,7 @@
 
 		w = MIN(w, maxx);
 		h = MIN(h, maxy);
-		node->window = newwin(h + shadow, w + shadow, y, x);
+		node->window = newwin(h, w, y, x);
 		gnt_wm_copy_win(widget, node);
 	}
 #endif
@@ -1884,9 +1880,8 @@
 {
 	gboolean ret = TRUE;
 	GntNode *node;
-	int shadow;
 	int maxx, maxy;
-	
+
 	while (widget->parent)
 		widget = widget->parent;
 	node = g_hash_table_lookup(wm->nodes, widget);
@@ -1900,9 +1895,8 @@
 	gnt_widget_set_size(widget, width, height);
 	gnt_widget_draw(widget);
 
-	shadow = gnt_widget_has_shadow(widget) ? 1 : 0;
-	maxx = getmaxx(stdscr) - shadow;
-	maxy = getmaxy(stdscr) - 1 - shadow;
+	maxx = getmaxx(stdscr);
+	maxy = getmaxy(stdscr) - 1;
 	height = MIN(height, maxy);
 	width = MIN(width, maxx);
 	wresize(node->window, height, width);