[evolution-patches] Fixes for Lists in HTML Forms
- From: Rodney Dawes <dobey ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Fixes for Lists in HTML Forms
- Date: 01 Jun 2003 11:56:44 -0400
This patch fixes 2 bugs in HTML form list widgets. Firstly, the treeview
lists are getting the data from the wrong column. This spews out a bunch
of errors about how the column is invalid and you should end the list of
columns with -1. The second bug is that the value set for drop-downs, is
not being selected by default. Unfortunately, to do this, I had to
remove the GTK_DISABLE_DEPRECATED define from Makefile.am as GtkCombo is
still using GtkList. But this makes forms work much more properly.
-- dobey
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/Makefile.am,v
retrieving revision 1.136
diff -u -r1.136 Makefile.am
--- Makefile.am 5 May 2003 20:39:19 -0000 1.136
+++ Makefile.am 1 Jun 2003 15:42:02 -0000
@@ -12,7 +12,6 @@
AM_CFLAGS = \
-DICONDIR=\"$(datadir)/gtkhtml- GTKHTML_RELEASE@/icons\" \
- -DGTK_DISABLE_DEPRECATED=1 \
-DGDK_DISABLE_DEPRECATED=1 \
-DG_DISABLE_DEPRECATED=1 \
-DGNOME_DISABLE_DEPRECATED=1
Index: htmlselect.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlselect.c,v
retrieving revision 1.22
diff -u -r1.22 htmlselect.c
--- htmlselect.c 17 Apr 2003 15:10:19 -0000 1.22
+++ htmlselect.c 1 Jun 2003 15:42:02 -0000
@@ -21,9 +21,9 @@
*/
#include <config.h>
-#include <gtk/gtkclist.h>
#include <gtk/gtkcombo.h>
#include <gtk/gtkentry.h>
+#include <gtk/gtklist.h>
#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtktreeview.h>
#include <gtk/gtktreeselection.h>
@@ -98,8 +98,10 @@
HTMLSelect *select = HTML_SELECT (o);
if (select->needs_update) {
- if (GTK_IS_COMBO (HTML_EMBEDDED (select)->widget))
+ if (GTK_IS_COMBO (HTML_EMBEDDED (select)->widget)) {
gtk_combo_set_popdown_strings (GTK_COMBO (HTML_EMBEDDED (o)->widget), select->strings);
+ gtk_list_select_item (GTK_LIST (GTK_COMBO (HTML_EMBEDDED (o)->widget)->list), select->default_selected);
+ }
}
select->needs_update = FALSE;
@@ -160,7 +162,7 @@
struct EmbeddedSelectionInfo *info = data;
gchar *value, *ptr;
- gtk_tree_model_get (model, iter, 1, &value, -1);
+ gtk_tree_model_get (model, iter, 0, &value, -1);
if (info->str->len)
info->str = g_string_append_c (info->str, '&');
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]