Fix display of pixmaps.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8737 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2003-06-26 06:28:16 +00:00
parent fdca1f8ea3
commit 3c367262a5
4 changed files with 38 additions and 13 deletions

View File

@@ -1,3 +1,16 @@
2003-06-25 David Hampton <hampton@employees.org>
* src/report/report-system/html-document.scm:
* src/report/report-system/html-text.scm: Correctly quote
attribute values. #115244
* src/gnome-utils/dialog-options.c: Display selected pixmap when
opening an options window.
* src/gnome-utils/dialog-commodity.c:
* src/gnome-utils/dialog-utils.[ch]: Consolidate a couple of
functions into the only file where they areused.
2003-06-25 Derek Atkins <derek@ihtfp.com>
* src/report/standard-reports/balance-sheet.scm: Add a "retained

View File

@@ -1000,9 +1000,13 @@ gnc_option_set_ui_widget(GNCOption *option,
char *type;
GNCOptionDef_t *option_def;
ENTER("option %p(%s), box %p, tips %p",
option, gnc_option_name(option), page_box, tooltips);
type = gnc_option_type(option);
if (type == NULL)
if (type == NULL) {
LEAVE("bad type");
return;
}
raw_name = gnc_option_name(option);
if (raw_name != NULL)
@@ -1040,6 +1044,7 @@ gnc_option_set_ui_widget(GNCOption *option,
if (raw_documentation != NULL)
free(raw_documentation);
free(type);
LEAVE(" ");
}
static void
@@ -2113,6 +2118,7 @@ gnc_option_set_ui_widget_pixmap (GNCOption *option, GtkBox *page_box,
GtkWidget *label;
gchar *colon_name;
ENTER("option %p(%s), name %s", option, gnc_option_name(option), name);
colon_name = g_strconcat(name, ":", NULL);
label = gtk_label_new(colon_name);
gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
@@ -2138,6 +2144,7 @@ gnc_option_set_ui_widget_pixmap (GNCOption *option, GtkBox *page_box,
gtk_widget_show(value);
gtk_widget_show(label);
gtk_widget_show(*enclosing);
LEAVE("new widget = %p", value);
return value;
}
@@ -2503,22 +2510,25 @@ static gboolean
gnc_option_set_ui_value_pixmap (GNCOption *option, gboolean use_default,
GtkWidget *widget, SCM value)
{
ENTER("option %p(%s)", option, gnc_option_name(option));
if (SCM_STRINGP(value))
{
char * string = gh_scm2newstr(value, NULL);
if (string && *string)
{
GnomeFileEntry *fentry =
GNOME_FILE_ENTRY(gnome_pixmap_entry_gnome_file_entry
(GNOME_PIXMAP_ENTRY(widget)));
gnome_file_entry_set_default_path(fentry, string);
DEBUG("string = %s", string);
GtkEntry *entry =
GTK_ENTRY(gnome_pixmap_entry_gtk_entry(GNOME_PIXMAP_ENTRY(widget)));
gtk_entry_set_text(entry, string);
}
if(string)
free(string);
LEAVE("FALSE");
return FALSE;
}
else
LEAVE("TRUE");
return TRUE;
}

View File

@@ -240,9 +240,11 @@
(push (lambda (l) (set! retval (cons l retval))))
(add-internal-tag (lambda (tag) (push "<") (push tag) (push ">")))
(add-attribute
(lambda (key value prior) (push " ") (push key)
(if value (begin (push "=")
(push value)))
(lambda (key value prior)
(push " ") (push key)
(if value (begin (push "=\"")
(push value)
(push "\"")))
#t))
(addextraatt
(lambda (attr)

View File

@@ -191,14 +191,14 @@
"img"
(with-output-to-string
(lambda ()
(display "src=") (display src)
(display "src=\"") (display src) (display"\"")
(display " ")
(for-each
(lambda (kvp)
(display (car kvp))
(display "=")
(display "=\"")
(display (cadr kvp))
(display " "))
(display "\" "))
rest)))))
(define (gnc:html-text-render p doc)