diff options
author | cinamod <cinamod> | 2003-10-01 20:49:44 +0000 |
---|---|---|
committer | cinamod <cinamod> | 2003-10-01 20:49:44 +0000 |
commit | c0addc2e40c1d494aa587d6b4268bd03675c4483 (patch) | |
tree | e49d0a1a26f87e54a2d3b80401e3a2301114af95 | |
parent | da293525875f046ba2a42ade4ec7985ff751fb82 (diff) | |
download | gdk-pixbuf-c0addc2e40c1d494aa587d6b4268bd03675c4483.tar.gz |
be more protective about when we install properties
-rwxr-xr-x | modules/engines/ms-windows/ChangeLog.old | 5 | ||||
-rwxr-xr-x | modules/engines/ms-windows/wimp_style.c | 23 |
2 files changed, 22 insertions, 6 deletions
diff --git a/modules/engines/ms-windows/ChangeLog.old b/modules/engines/ms-windows/ChangeLog.old index 87017ad61..dce1818e1 100755 --- a/modules/engines/ms-windows/ChangeLog.old +++ b/modules/engines/ms-windows/ChangeLog.old @@ -1,3 +1,8 @@ +2003-10-01 Dom Lachowicz <cinamod@hotmail.com>
+
+ * src/wimp_style.c: Only set the delays if the param is installed. Silly gtk -
+ installing those 3 params only in the menus...
+
2003-09-25 Dom Lachowicz <cinamod@hotmail.com>
* src/wimp_style.c: Set a delay on popdown menus
diff --git a/modules/engines/ms-windows/wimp_style.c b/modules/engines/ms-windows/wimp_style.c index 277be9973..f60b227fa 100755 --- a/modules/engines/ms-windows/wimp_style.c +++ b/modules/engines/ms-windows/wimp_style.c @@ -252,12 +252,22 @@ setup_system_settings (GtkStyle * style) if (!win95) { if (SystemParametersInfo (SPI_GETMENUSHOWDELAY, 0, &menu_delay, 0)) { - g_object_set (G_OBJECT (settings), "gtk-menu-popup-delay", - 0, NULL); - g_object_set (G_OBJECT (settings), "gtk-menu-popdown-delay", - menu_delay, NULL); - g_object_set (G_OBJECT (settings), "gtk-menu-popup-delay", - menu_delay, NULL); + GObjectClass * klazz = G_OBJECT_GET_CLASS(G_OBJECT(settings)); + + if (klazz) { + if (g_object_class_find_property (klazz, "gtk-menu-bar-popup-delay")) { + g_object_set (G_OBJECT (settings), "gtk-menu-bar-popup-delay", + 0, NULL); + } + if (g_object_class_find_property (klazz, "gtk-menu-popup-delay")) { + g_object_set (G_OBJECT (settings), "gtk-menu-popup-delay", + menu_delay, NULL); + } + if (g_object_class_find_property (klazz, "gtk-menu-popdown-delay")) { + g_object_set (G_OBJECT (settings), "gtk-menu-popdown-delay", + menu_delay, NULL); + } + } } } @@ -268,6 +278,7 @@ setup_system_settings (GtkStyle * style) g_object_set (G_OBJECT (settings), "gtk-icon-sizes", "gtk-menu=10,10 : gtk-button=16,16 : gtk-small-toolbar=16,16 : gtk-large-toolbar=16,16 : gtk-dialog=32,32 : gtk-dnd=32,32", NULL); + #endif /* |