dia r3939 - in trunk: . lib
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r3939 - in trunk: . lib
- Date: Sun, 13 Apr 2008 16:30:56 +0100 (BST)
Author: hans
Date: Sun Apr 13 16:30:56 2008
New Revision: 3939
URL: http://svn.gnome.org/viewvc/dia?rev=3939&view=rev
Log:
2008-04-13 Hans Breuer <hans breuer org>
* lib/propdialogs.c : if there are more than a dozen properties
make the dialog scrollable
* lib/propdesc.c(prop_desc_lists_union) : even the union of properties
must not contain properties maked by PROP_FLAG_DONT_MERGE
* lib/prop_widgets.c : fixed long-standing bug of MULTICOL properties
not being in the expected order
Modified:
trunk/ChangeLog
trunk/lib/prop_widgets.c
trunk/lib/propdesc.c
trunk/lib/propdialogs.c
Modified: trunk/lib/prop_widgets.c
==============================================================================
--- trunk/lib/prop_widgets.c (original)
+++ trunk/lib/prop_widgets.c Sun Apr 13 16:30:56 2008
@@ -226,7 +226,7 @@
prop_dialog_container_pop(dialog); /* NULL or the previous column */
- gtk_box_pack_end_defaults(GTK_BOX(dialog->lastcont),col);
+ gtk_box_pack_start_defaults(GTK_BOX(dialog->lastcont),col);
prop_dialog_add_raw(dialog,NULL); /* to reset the internal table system */
prop_dialog_container_push(dialog,col);
Modified: trunk/lib/propdesc.c
==============================================================================
--- trunk/lib/propdesc.c (original)
+++ trunk/lib/propdesc.c Sun Apr 13 16:30:56 2008
@@ -137,6 +137,10 @@
for (i = 0; plist[i].name != NULL; i++) {
int j;
+#if 1
+ if (plist[i].flags & PROP_FLAG_DONT_MERGE)
+ continue; /* even union must not conatin anything which can't be merged */
+#endif
for (j = 0; j < arr->len; j++)
if (g_array_index(arr, PropDescription, j).quark == plist[i].quark)
break;
Modified: trunk/lib/propdialogs.c
==============================================================================
--- trunk/lib/propdialogs.c (original)
+++ trunk/lib/propdialogs.c Sun Apr 13 16:30:56 2008
@@ -254,8 +254,10 @@
prop->self.self = prop;
prop->self.my_index = dialog->prop_widgets->len;
- if (prop->ops->get_widget) widget = prop->ops->get_widget(prop,dialog);
- if (!widget) return; /* either property has no widget or it's a container */
+ if (prop->ops->get_widget)
+ widget = prop->ops->get_widget(prop,dialog);
+ if (!widget)
+ return; /* either property has no widget or it's a container */
prop->self.widget = widget;
if (prop->ops->reset_widget) prop->ops->reset_widget(prop,widget);
@@ -275,11 +277,30 @@
prop_dialog_add_properties(PropDialog *dialog, GPtrArray *props)
{
guint i;
+ gboolean scrollable = (props->len > 12);
+
+ if (scrollable) {
+ GtkWidget *swin = gtk_scrolled_window_new (NULL, NULL);
+ GtkWidget *vbox = gtk_vbox_new(FALSE,0);
+ gtk_box_pack_start(GTK_BOX (dialog->widget), swin, TRUE, TRUE, 0);
+ gtk_widget_show (swin);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), vbox);
+ /* I'd say default size calculation for scrollable is quite broken */
+ gtk_widget_set_size_request (swin, -1, 400);
+ gtk_widget_show (vbox);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ prop_dialog_container_push (dialog, swin);
+ prop_dialog_container_push (dialog, vbox);
+ }
+
for (i = 0; i < props->len; i++) {
Property *prop = (Property*)g_ptr_array_index(props,i);
prop_dialog_add_property(dialog, prop);
}
+
+ if (scrollable) {
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]