diff --git a/config.h.in b/config.h.in index fd9f1e66c17f6c8b2ba11cbac488d4e130b5b3fc..58985bf9f5b5c9136d4c762716d53af3482e21bb 100644 --- a/config.h.in +++ b/config.h.in @@ -27,6 +27,9 @@ /* Define to 1 if licensed under terms of the GNU General Public License. */ #undef GPL_LICENSED +/* Define to 1 if using gtk+-2.14.0 or higher */ +#undef GTK2_USE_GET_FOCUS + /* Define to 1 if using gtk+-2.10.0 or higher */ #undef GTK2_USE_RADIO_SET diff --git a/configure b/configure index b720279a0149068b0309ae03584c089438f4e59c..29ff293010af497c0905e1430ee6549bbe22e771 100755 --- a/configure +++ b/configure @@ -18646,6 +18646,12 @@ if test ${gtk_config_minor_version=0} -gt 12 ; then $as_echo "#define GTK2_USE_TOOLTIP 1" >>confdefs.h +fi + +if test ${gtk_config_minor_version=0} -gt 14 ; then + +$as_echo "#define GTK2_USE_GET_FOCUS 1" >>confdefs.h + fi diff --git a/configure.ac b/configure.ac index daa1d647ab9a1af1bb38d43302f7b12bd0f623f9..737f909cb158e81ef49eea1f696640f1c7cbe90d 100644 --- a/configure.ac +++ b/configure.ac @@ -189,6 +189,10 @@ if test ${gtk_config_minor_version=0} -gt 12 ; then AC_DEFINE([GTK2_USE_TOOLTIP], 1, [Define to 1 if using gtk+-2.12.0 or higher]) fi +if test ${gtk_config_minor_version=0} -gt 14 ; then + AC_DEFINE([GTK2_USE_GET_FOCUS], 1, [Define to 1 if using gtk+-2.14.0 or higher]) +fi + X_AC_DATABASES diff --git a/src/common/hostlist.c b/src/common/hostlist.c index f52ca3a4e68bf50ecc8c35fadc3cc462add8f485..2aeefcc3930c75745fabca203729108aad036530 100644 --- a/src/common/hostlist.c +++ b/src/common/hostlist.c @@ -2587,6 +2587,11 @@ void hostlist_parse_int_to_array(int in, int *out, int dims, int hostlist_base) my_pow = my_pow_minus; my_pow_minus /= hostlist_base; } + if(out[a] < 0) { + fatal("Dim %d returned negitive %d from %d %d %d", + a, out[a], in, my_pow, my_pow_minus); + out[a] = 0; + } } } diff --git a/src/sview/sview.c b/src/sview/sview.c index fccc66b4b967aa591fb9d363b42dfd0079ddce94..733bd616684947386ed3c07e16e5a3daa8df917f 100644 --- a/src/sview/sview.c +++ b/src/sview/sview.c @@ -930,12 +930,16 @@ extern void _change_cluster_main(GtkComboBox *combo, gpointer extra) GTK_NOTEBOOK(main_notebook), NODE_PAGE); node_tab = gtk_notebook_get_tab_label(GTK_NOTEBOOK(main_notebook), node_tab); + +#ifdef GTK2_USE_GET_FOCUS /* ok, now we have a table which we have set up to contain an * event_box which contains the label we are interested. We * setup this label to be the focus child of the table, so all * we have to do is grab that and we are set. */ node_tab = gtk_container_get_focus_child(GTK_CONTAINER(node_tab)); - +#else + g_object_get(node_tab, "child", &node_tab, NULL); +#endif if(node_tab) gtk_label_set_text(GTK_LABEL(node_tab), main_display_data[NODE_PAGE].name);