Mercurial > vim
comparison src/gui_motif.c @ 1604:3acbcd0d3fd3 v7.1.317
updated for version 7.1-317
author | vimboss |
---|---|
date | Fri, 20 Jun 2008 09:40:11 +0000 |
parents | 710b52d02c4a |
children | fc89a4f98a8b |
comparison
equal
deleted
inserted
replaced
1603:694e8715dce6 | 1604:3acbcd0d3fd3 |
---|---|
684 int x, y, win_x, win_y, maxX, maxY; | 684 int x, y, win_x, win_y, maxX, maxY; |
685 Boolean mappedWhenManaged; | 685 Boolean mappedWhenManaged; |
686 | 686 |
687 /* Temporarily set value of XmNmappedWhenManaged | 687 /* Temporarily set value of XmNmappedWhenManaged |
688 to stop the dialog from popping up right away */ | 688 to stop the dialog from popping up right away */ |
689 XtVaGetValues(shell, XmNmappedWhenManaged, &mappedWhenManaged, 0); | 689 XtVaGetValues(shell, XmNmappedWhenManaged, &mappedWhenManaged, NULL); |
690 XtVaSetValues(shell, XmNmappedWhenManaged, False, 0); | 690 XtVaSetValues(shell, XmNmappedWhenManaged, False, NULL); |
691 | 691 |
692 XtManageChild(dialog_child); | 692 XtManageChild(dialog_child); |
693 | 693 |
694 /* Get the pointer position (x, y) */ | 694 /* Get the pointer position (x, y) */ |
695 XQueryPointer(XtDisplay(shell), XtWindow(shell), &root, &child, | 695 XQueryPointer(XtDisplay(shell), XtWindow(shell), &root, &child, |
721 | 721 |
722 /* Map the widget */ | 722 /* Map the widget */ |
723 XtMapWidget(shell); | 723 XtMapWidget(shell); |
724 | 724 |
725 /* Restore the value of XmNmappedWhenManaged */ | 725 /* Restore the value of XmNmappedWhenManaged */ |
726 XtVaSetValues(shell, XmNmappedWhenManaged, mappedWhenManaged, 0); | 726 XtVaSetValues(shell, XmNmappedWhenManaged, mappedWhenManaged, NULL); |
727 } | 727 } |
728 | 728 |
729 #if defined(FEAT_MENU) || defined(FEAT_SUN_WORKSHOP) \ | 729 #if defined(FEAT_MENU) || defined(FEAT_SUN_WORKSHOP) \ |
730 || defined(FEAT_GUI_DIALOG) || defined(PROTO) | 730 || defined(FEAT_GUI_DIALOG) || defined(PROTO) |
731 | 731 |
1991 | 1991 |
1992 if (XtIsComposite(w)) | 1992 if (XtIsComposite(w)) |
1993 { | 1993 { |
1994 if (XtClass(w) == xmRowColumnWidgetClass) | 1994 if (XtClass(w) == xmRowColumnWidgetClass) |
1995 { | 1995 { |
1996 XtVaGetValues(w, XmNrowColumnType, &rowColType, 0); | 1996 XtVaGetValues(w, XmNrowColumnType, &rowColType, NULL); |
1997 isMenu = (rowColType != (unsigned char)XmWORK_AREA); | 1997 isMenu = (rowColType != (unsigned char)XmWORK_AREA); |
1998 } | 1998 } |
1999 else | 1999 else |
2000 isMenu = False; | 2000 isMenu = False; |
2001 if (!isMenu) | 2001 if (!isMenu) |
2002 { | 2002 { |
2003 XtVaGetValues(w, XmNchildren, &children, XmNnumChildren, | 2003 XtVaGetValues(w, XmNchildren, &children, XmNnumChildren, |
2004 &numChildren, 0); | 2004 &numChildren, NULL); |
2005 for (i = 0; i < numChildren; i++) | 2005 for (i = 0; i < numChildren; i++) |
2006 do_mnemonic(children[i], keycode); | 2006 do_mnemonic(children[i], keycode); |
2007 } | 2007 } |
2008 } | 2008 } |
2009 else | 2009 else |
2010 { | 2010 { |
2011 XtVaGetValues(w, XmNmnemonic, &mnemonic, 0); | 2011 XtVaGetValues(w, XmNmnemonic, &mnemonic, NULL); |
2012 if (mnemonic != '\0') | 2012 if (mnemonic != '\0') |
2013 { | 2013 { |
2014 mneString[0] = mnemonic; | 2014 mneString[0] = mnemonic; |
2015 mneString[1] = '\0'; | 2015 mneString[1] = '\0'; |
2016 if (XKeysymToKeycode(XtDisplay(XtParent(w)), | 2016 if (XKeysymToKeycode(XtDisplay(XtParent(w)), |
2017 XStringToKeysym(mneString)) == keycode) | 2017 XStringToKeysym(mneString)) == keycode) |
2018 { | 2018 { |
2019 if (XtClass(w) == xmLabelWidgetClass | 2019 if (XtClass(w) == xmLabelWidgetClass |
2020 || XtClass(w) == xmLabelGadgetClass) | 2020 || XtClass(w) == xmLabelGadgetClass) |
2021 { | 2021 { |
2022 XtVaGetValues(w, XmNuserData, &userData, 0); | 2022 XtVaGetValues(w, XmNuserData, &userData, NULL); |
2023 if (userData != NULL && XtIsWidget(userData)) | 2023 if (userData != NULL && XtIsWidget(userData)) |
2024 XmProcessTraversal(userData, XmTRAVERSE_CURRENT); | 2024 XmProcessTraversal(userData, XmTRAVERSE_CURRENT); |
2025 } | 2025 } |
2026 else | 2026 else |
2027 { | 2027 { |
2071 | 2071 |
2072 if (XtIsComposite(w)) | 2072 if (XtIsComposite(w)) |
2073 { | 2073 { |
2074 if (XtClass(w) == xmRowColumnWidgetClass) | 2074 if (XtClass(w) == xmRowColumnWidgetClass) |
2075 { | 2075 { |
2076 XtVaGetValues(w, XmNrowColumnType, &rowColType, 0); | 2076 XtVaGetValues(w, XmNrowColumnType, &rowColType, NULL); |
2077 isMenu = (rowColType != (unsigned char)XmWORK_AREA); | 2077 isMenu = (rowColType != (unsigned char)XmWORK_AREA); |
2078 } | 2078 } |
2079 else | 2079 else |
2080 isMenu = False; | 2080 isMenu = False; |
2081 if (!isMenu) | 2081 if (!isMenu) |
2082 { | 2082 { |
2083 XtVaGetValues(w, XmNchildren, &children, XmNnumChildren, | 2083 XtVaGetValues(w, XmNchildren, &children, XmNnumChildren, |
2084 &numChildren, 0); | 2084 &numChildren, NULL); |
2085 for (i = 0; i < numChildren; i++) | 2085 for (i = 0; i < numChildren; i++) |
2086 add_mnemonic_grabs(dialog, children[i]); | 2086 add_mnemonic_grabs(dialog, children[i]); |
2087 } | 2087 } |
2088 } | 2088 } |
2089 else | 2089 else |
2090 { | 2090 { |
2091 XtVaGetValues(w, XmNmnemonic, &mnemonic, 0); | 2091 XtVaGetValues(w, XmNmnemonic, &mnemonic, NULL); |
2092 if (mnemonic != '\0') | 2092 if (mnemonic != '\0') |
2093 { | 2093 { |
2094 mneString[0] = mnemonic; | 2094 mneString[0] = mnemonic; |
2095 mneString[1] = '\0'; | 2095 mneString[1] = '\0'; |
2096 XtGrabKey(dialog, XKeysymToKeycode(XtDisplay(dialog), | 2096 XtGrabKey(dialog, XKeysymToKeycode(XtDisplay(dialog), |