[evolution-patches] frame fixes



This fixes frame margins and sets the scroll frame shadow type properly.

--Larry


Index: htmlengine.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlengine.c,v
retrieving revision 1.539
diff -u -p -r1.539 htmlengine.c
--- htmlengine.c	1 May 2003 20:53:23 -0000	1.539
+++ htmlengine.c	18 May 2003 07:52:16 -0000
@@ -1740,9 +1740,9 @@ parse_iframe (HTMLEngine *e, const gchar
 	if (src) {
 		iframe = html_iframe_new (GTK_WIDGET (e->widget),
 					  src, width, height, border);
-		if (margin_height > 0)
+		if (margin_height >= 0)
 			html_iframe_set_margin_height (HTML_IFRAME (iframe), margin_height);
-		if (margin_width > 0)
+		if (margin_width >= 0)
 			html_iframe_set_margin_width (HTML_IFRAME (iframe), margin_width);
 		if (scroll != GTK_POLICY_AUTOMATIC)
 			html_iframe_set_scrolling (HTML_IFRAME (iframe), scroll);
Index: htmlframe.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlframe.c,v
retrieving revision 1.28
diff -u -p -r1.28 htmlframe.c
--- htmlframe.c	5 Nov 2002 22:54:13 -0000	1.28
+++ htmlframe.c	18 May 2003 07:52:16 -0000
@@ -36,11 +36,6 @@
 #include "htmlselection.h"
 #include "htmlsettings.h"
 
-#define USE_SCROLLED_WINDOW 1
-#ifndef USE_SCROLLED_WINDOW
-#include <gal/widgets/e-scroll-frame.h>
-#endif
-
 HTMLFrameClass html_frame_class;
 static HTMLEmbeddedClass *parent_class = NULL;
 static gboolean calc_size (HTMLObject *o, HTMLPainter *painter, GList **changed_objs);
@@ -433,13 +428,9 @@ html_frame_set_margin_height (HTMLFrame 
 void
 html_frame_set_scrolling (HTMLFrame *frame, GtkPolicyType scroll)
 {
-#if USE_SCROLLED_WINDOW
+
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (frame->scroll),
 					scroll, scroll);
-#else
-	e_scroll_frame_set_policy (E_SCROLL_FRAME (frame->scroll),
-				   scroll, scroll);
-#endif					
 }
 
 void
@@ -480,14 +471,9 @@ html_frame_init (HTMLFrame *frame,
 	html_embedded_init (em, HTML_EMBEDDED_CLASS (klass),
 			    parent, NULL, NULL);
 	
-#if USE_SCROLLED_WINDOW
 	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
-#else
-	scrolled_window = e_scroll_frame_new (NULL, NULL);
-	e_scroll_frame_set_shadow_type (E_SCROLL_FRAME (scrolled_window), 
-					border ? GTK_SHADOW_IN : GTK_SHADOW_NONE);
-
-#endif
+	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
+					     border ? GTK_SHADOW_IN : GTK_SHADOW_NONE);
 
 	new_widget = gtk_html_new ();
 	new_html = GTK_HTML (new_widget);
Index: htmliframe.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmliframe.c,v
retrieving revision 1.73
diff -u -p -r1.73 htmliframe.c
--- htmliframe.c	15 Apr 2003 06:40:06 -0000	1.73
+++ htmliframe.c	18 May 2003 07:52:16 -0000
@@ -37,10 +37,6 @@
 #include "htmltokenizer.h"
 #include "htmlembedded.h"
 
-#define USE_SCROLLED_WINDOW 1
-#ifndef USE_SCROLLED_WINDOW
-#include <gal/widgets/e-scroll-frame.h>
-#endif
 
 HTMLIFrameClass html_iframe_class;
 static HTMLEmbeddedClass *parent_class = NULL;
@@ -310,13 +306,8 @@ html_iframe_set_margin_height (HTMLIFram
 void
 html_iframe_set_scrolling (HTMLIFrame *iframe, GtkPolicyType scroll)
 {
-#if USE_SCROLLED_WINDOW
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (iframe->scroll),
 					scroll, scroll);
-#else
-	e_scroll_frame_set_policy (E_SCROLL_FRAME (iframe->scroll),
-				   scroll, scroll);
-#endif					
 }
 
 static gboolean
@@ -587,14 +578,9 @@ html_iframe_init (HTMLIFrame *iframe,
 	html_embedded_init (em, HTML_EMBEDDED_CLASS (klass),
 			    parent, NULL, NULL);
 	
-#if USE_SCROLLED_WINDOW
 	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
-#else
-	scrolled_window = e_scroll_frame_new (NULL, NULL);
-	e_scroll_frame_set_shadow_type (E_SCROLL_FRAME (scrolled_window), 
-					border ? GTK_SHADOW_IN : GTK_SHADOW_NONE);
-
-#endif
+	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
+					     border ? GTK_SHADOW_IN : GTK_SHADOW_NONE);
 	/*
 	 * FIXME
 	 * are we missing:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]